Modify Toolbar for MFC MS Visual Studio 2019 app with Gimp - visual-studio

I'm trying to modify a toolbar's BMP file with GIMP 2.10.24 (tried with 2.9, too) for a MFC application in Visual Studio 2019's resource editor.
Using these explanations, I can save the BMP file so that it opens in Visual Studio.
I also set the mode to RGB and made sure there is no alpha channel.
The title of the MS VS editor reads
0x0, 1 bit, BMP
just like before.
The app builds OK, but when I run it,
VERIFY(toolBar->LoadToolBar(nID));
fails with an exception.
Is there anything else I need to do to make my toolbar load again?
Thanks in advance!

I finally worked out a solution that works with recent versions of GIMP (thanks to everyone who contributed!):
Do NOT convert to RGB! The confusion comes from the fact that ‘Advanced options’ is only active if you convert to RGB, but you do not need the advanced options. Maybe that changed at one point in MSVS or in GIMP, because explanations on different forums are confusing about this point...
Image/Mode -> Indexed colors (DO NOT CHANGE THIS)
File/Export as ... :
Run-Length encoded : do not check
Compatibility options : do not write color space information : check
Advanced options : is not accessible, but that DOESN'T MATTER !
Additional trick: you can copy-paste the buttons of toolbars (not the entire toolbar) one by one from Gimp to VS (if the color settings in Gimp are as explained above ; if not, you loose / mix up the colors).
Tested with Microsoft Visual Studio 2019 enterprise edition and GIMP 2.10.

Related

Visual Studio 17.4 update changed font

The update for Visual Studio 17.4 has changed the font in the text editor, so that it is very thin and a bit of a strain on the eyes to the read. How can you change this back, short of rolling back the update?
Please note that I've searched a little bit for this, and I see the following setting:
But I have no idea what to set this to. People have mentioned the Consolas font on one or more other posts, but that doesn't seem to match what was there before. I've tried checking Bold. Etc.
I just need it back to the "normal Visual Studio font" that was there before the update to 17.4, which has enough thickness in the letters that it's not uncomfortable to read.
Happened to me too, and let me say that the "new" font is pretty ugly compared to the original one that was Cascadia Mono SemiBold. Also uncheck bold if was checked and the size should be to 10.
(Sadly, in my case, it is no more present in the fonts list. Maybe this is the reason why it was set back to default. But Cascadia Code SemiBold should be 99,9% similar)
In this case, you can download Cascadia Mono Releases and install it again (?) in your system.
I also had issues with the font, installing other fonts didn't help. I installed the Text Sharp addon and enabled ClearType rendering which seemed to fix the font trouble I was having.
Edit: After more investigation, Visual studio has settings for text rendering thus disabling the addon and setting the Text rendering method to ClearType gives me back the original font:
And it seems like changing the Text Formatting method to Display instead of Ideal gives me the original issue I had.
And I also had to download Cascadia Mono to get the Cascadia Code font but without the ligatures (i.e. not changing != to an = with a line through it)
Apparently there was a bug in the installer that incorrecly uninstalled the fonts during update (17.4.4 release notes)
"Addressed an issue when Cascadia Code and Cascadia Mono font gets
uninstalled during Visual Studio update process."
It is said to be fixed in 17.4.4
with the note that updating from previous version to 17.4.4 may experience the issue, but that it will not happen with future updates (e.g. 17.4.4 -> 17.4.5.)

How do I edit the ico file Visual Studio creates for me?

In Solution Explorer, Right click -> Add... Icon file.
The file gets created, but looking at it in Visual Studio, it is uneditable. It includes multiple mips. If you open in external editor, it opens paint. If you then make changes and save it, it asks to save it elsewhere and doesn't affect the original ico.
The thing is, I'm sure this has worked for me before. I'm just not sure what's happening now. Can anyone enlighten me?
The issue you're experiencing is that Visual Studio does NOT know how to edit PNG targets - even though it adds them to your ico by default.
You'll notice that if you have the image edit bar up, you can in-fact edit the BMP target ones (including pasting over from a more capable image editor 😀). Further oddness on visual studio's part, you don't appear to be able to add back the PNG targets, so if you delete them they're gone forever unless you have an external ICO editor (which I assume would mean you wouldn't be using the VS one anyway).
Your best bet if you're committed to continuing in VS (several free websites available that will do this for you given some images) is to clear out the unused versions, and add BMP targets for the sizes you care about. The max for BMP is 24 bit, so be aware, but you should be able to keep a fair amount of fidelity, and still keep your transparency (there is a transparent color, and if you paste in with transparency the editor will automatically fill that in for you) - all while keeping the same sizes as the PNG targets.
Hope that helps!

VS2019 Tools -> Options -> Font and Colors never saved

In Visual Studio 2019 CE I try to change the font size for Text Editor.
I go to Tools -> Options -> Envirounment -> Fonts and Colors, change font size and click OK.
Font size changed and I can work.
After I close and open VS2019 these settings lost and again set to defaults.
What can be the problem? How to permanently solve it?
This might be an issue in Visual Studio 2019 application, see a similar problem discussed here.
And here's a workaround from the same thread, but not an official fix from MS.
I was experiencing almost the same issues: everything was using the
"general" defaults rather than the c# defaults (which I wanted). I set
to the c# defaults but they wouldn’t save upon reopening vs. However,
any font changes remained after reopening and any colour changes
remained - for example, I set plaintext - background to "black" rather
than "default" - which saved. I then tried switching the font colour
to white, and all the default c# colour options saved.

How can I set my VIM color scheme to the same default color scheme in Visual Studio?

Very new to VIM so any explanation on how to configure would be very appreciated.
Find one here that is close to Visual Studio.
Download it and put colorscheme foo in your .vimrc (_vimrc on Windows) where foo is the name of the colorscheme.
My "Bandit" colour scheme was originally based on the highlighting from Visual Studio (version 6 I think) and Matlab. It's probably not a perfect match, but it may be of interest.
It's available here and, in case the screenshot below doesn't work, there's a screenshot here. Note that you'll need to do:
set background=light
before configuring the colour scheme as otherwise it will default to a dark background.
You need to search in the different color schemes. I don't know if there's one who is the same as in Visual Studio, but maybe you'll find a better one. :)
Type a little piece of code, then :colorscheme, a space, and press Tab to see every colorscheme.
You can download new colorschemes here : http://www.vim.org/search.php
The "VC" color scheme (found here) is very close to looking like the default Visual Studio color scheme.

Can't get VS2010 RC to print in color

Is it just me or will VS2010 RC not print code in color? I have tried everything I can think of to no avail, everything prints monochrome.
I have the latest drivers for my printer
VS2008 prints color just fine (As do other apps)
I tested printing in high quality color, normal and ink saver modes.
Class Diagrams DO print in color making me think it is not a driver issue.
Is there an option or something I am missing?
Apparently colour printing functionality will be absent in the VS 2010 release initially. I found this info on a msdn forum.
I found a workaround to print the specific file I wanted. I cannot be certain it would always work.
The solution was to open the .cs file (Not the whole solution) in VS 2008. I also tested a .xaml file and it printed fine as well.
While the answer has been accepted for this and it is linked via the MSDN forum post in the accepted answer I thought I'd post an update here as this is one of the top Google results for this question.
To enable colour printing in VS2010 you will need to download the Color Printing extension. Note that as this is an extension it means that you can not print in colour on VS2010 Express Edition.
For those still looking for this, Microsoft has released a patch to VS2010 Professional and up (sorry - no love for Express users).
The download is here:
http://visualstudiogallery.msdn.microsoft.com/00ec88c2-1553-47d2-8170-3c5baa0c6e44/
I've tested it, and it does work.

Resources