I am working on a product update that is combining some legacy C++/MFC code with C#/WPF. It uses Visual Studio 2013, update 5. There is an existing MFC dialog that I am trying to modify. Moving elements around with the editor (Resource View->Dialogs, select by ID) worked fine. Changing LTEXT values shows up correctly on the Dialog editor (WYSIWYG you'd think), the changes appear properly in the .rc file (viewed but not edited with Notepad), but the built application shows the rearranged elements with the old labels. I have even went through setting up a clean build machine to ensure there wasn't some strange intermediate file, but no, it just doesn't want to change those labels. I have no idea where to look next.
There is nothing exotic about these labels, here is an abbreviated sample:
IDD_MY_DLG DIALOGEX 0, 0, 650, 375
STYLE DS_SETFONT | WS_CHILD
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
BEGIN
LTEXT "SE Limit",IDC_ISE_LIM_STATIC,457,82,59,8,0,WS_EX_RIGHT
LTEXT "NE Limit",IDC_INE_LIM_STATIC,457,112,59,8,0,WS_EX_RIGHT
END
The old labels had a colon at the end, that is seriously all I changed on them, but the colons won't go away.
Those colons had to be coming from somewhere, so I searched the project for them. I found some code that overrode what was set in the .rc file. Doh! I'd found similar before in this project (inherited) and didn't think to look.
Related
-- I'm using Visual Studio 2013 --
I have an icon with transparent background. It was created in Photoshop as an 8-bit RGB image and exported to .ico via the free telegraphics ICO Format plugin. I saved out 16, 24, 32, 40, 48, 64, 96, 128 and 256 resolutions versions and then used another free telegraphics plugin to bundle them into a single .ico file with all the resolutions.
When I use Windows 10 to apply this .ico file as the icon for a shortcut it looks great. But when I try to import this icon into a Visual Studio C++ project and embed it into my EXE it looks terrible. By "terrible" I mean it looks choppy/pixelated and there appear to be random colors in several pixels. It just looks awful.
To import into my VS project I right-clicked the project in the VS "Solution Explorer" and chose Add --> Resource. In the Add Resource window I selected "Icon" and then used "Import..." to bring in my .ico file. After the import, I can see all the different resolutions of the icon were found, but like I said - they look terrible. Most of the problems of random colored pixels appear to take place along transparent edges of the image. (I have text with transparent background).
And when I actually build the EXE, it appears Windows only shows the smallest resolution (16x16) version of icon no matter what my view thumbnail size is.
This is only a problem when trying to use my icon in Visual Studio and building the EXE. Like I said, if I wait until after building the EXE and then use Windows to manually assign this icon it looks fine.
I am struggling with visual studio editor, I've one WinForm (Visual Studio 2015 Comm) App that I am maintaining from last couple of years, after all the improvements and bug fixes the code behind reached to around 2000 lines.
Issue is If I am adding any new code inside that it places the code anywhere in middle of any other events like If I've added a radio button and want to have click event then if I generate it it places it on 1560th line. (Just an Example).
So Is there any setting for editor that if any new code is getting generated it should always put that on the ending of the existing code like on line 2001?
I am not aware of any such settings but suggestions are needed
Thanks.
Does anyone here happen to know if the flag that appears in the title bar of visual studio to alert users of new notifications (see the illustration below) is part of a font family (ie along the lines of wingdings) which gives it that blue roll over effect when one rolls one's mouse over it.
I have been experimenting with adding additional buttons to the Title Bar (I'm using Actipro's RibbonWindow and adjusting the WindowChrome) and I can see that using text with a certain style added will give the correct effect. Now I'm just trying to establish if the flag symbol that is used in visual studio is readily available and if so where. For example I know that using a capital o as the content of a button and setting the font to Wingdings will produce a flag, but not the one that Visual Studio uses.
No, it is a path. In VS 2015 it is defined as "F1M14,0L0,0 7,14 9,14 6,8 14,0 14,0z M11.586,1L5.293,7.293 4.94,7.645 1.618,1 11.586,1"
This is an IDE tools question.
I want to adhere to a specific style guide which wants me to have my code lines wrap to the next line if they exceed 80 characters on one line. When I select the word wrap option in Visual Studio 2013 text editor, it wraps the current window width of my project. How can I explicitly change my code editor window to be 80 characters in width without having to eyeball it?
Try this VS extension to add a visual guideline at the desired number of chars, then you can break your lines as needed when you approach the line. I'm reinstalling my laptop at the second so can't check, but I assume that the Visual Studio line-wrap option is only visually wrapping the text on your screen rather than actually breaking the line onto a subsequent line when it's over 80 (or width of screen in your case), which isn't really what the style guide you're following will be trying to get you to do.
If you had ReSharper installed, there is an option in that which allows the breaking of lines automatically at a given width.
I've been having problems with text being truncated from static controls when I run my app on Windows 7, even though it shows fine on my development machine which runs XP with Classic Look (Windows 98).
I decided to make an experiment, and loaded my project in Visual Studio on a Win7 machine, and when I clicked 'Size to content' on a static control, its width became bigger, even though I had used 'Size to content' on Visual Studio with Classic Look theme.
I know that the resource editor uses real window controls to show you the dialog, and they are painted with whatever theme is set on your machine.
Is it possible that 'Size to content' depends on what theme you have set? With what theme should I test to make sure text always fits in the static control?
Just off the cuff here, but it sounds like "size to content" occurs at design-time rather than run-time. So if you design on Windows 7, it will size to content there. Look in the .design. file and you should see the size of each control assigned as an integer, so the size does not change based on the run-time environment.
QUICK ANSWERS: Leave lots of extra space or move to WPF.