error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT? - visual-c++

what is this Error, and how to resolve it?
I am using Visual studio 2005 for Smart device MFC developement,
Is upgrading to 2008 can solve my problem.
Error 85 error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT
Thanks

this might help you:
http://www.axialis.com/tutorials/vistaicons.html
It looks like vista icons now use PNG headers. The error is slightly false though as its not an old DIB its just a header it doesn't recognize, PNG.
How was that icon created? Long ago Visual C++ 6.0 had its own little way of creating icon .ico files. Probably not using PNG so this might be the way to go is to find some program to emulate that and create an icon using the old DIB way. Or upgrading to 2008 :)

Actually there is another way not mentioned here in the other answers.
If you would install and integrate a more recent (same or later release date than VS 2008) SDK with VS 2005, that also resolves it. You can also go to C:\Program Files\Microsoft Visual Studio 8\VC\bin (or your equivalent of the path) and replace the files rcdll.dll and rc.exe with the ones from a more recent VS, WDK or SDK.
Side-note: the version of rcdll.dll and rc.exe must match, that is you need to copy both at once from your source (be it VS, WDK or SDK). For me any version starting with 6.0 or 6.1 worked. That's any version starting from the compilers that accompanied the Vista SDKs and VS versions or later.

There are actually 2 situations I've encountered that lead to this error RC2176.
As you probably know, a Windows .ICO file can contain multiple images for different sizes and color depth. VS2005 throws this error in at least two situations (unrelated to DIB)
.PNG images in the icon (as described in Codejoy's answer)
256x256 or larger images in the icon
By using GIMP to shrink the largest image size to 128x128, and avoiding .PNG, the problem is resolved with VS2005. Or, upgrade to a newer VS ;)

I had this problem in VS2012 for which I googled but didn't find anything else but this link to a MSDN site which talked about opening it up with sdk-paint , so in my project I doubleclicked the icon that was responsible for the error and deleted the PNG format and voila program started.
Greetz
Richard

The compressed/packed 256x256 was the problem for me. Once I unchecked the option to save as compressed (for Vista) in my icon editor app, the problem went away.

There is another situation I encountered which triggered the error, that is a corrupted PNG file. I've used the sed command to globally replace some strings in the project folder, and it just replaced the (looks liked) windows line ending to UNIX one, which caused my image files corrupted.
So, maybe there are some bugs in the PNG parser of MFC library, which cannot handle malformed input files.

Best resolution I have come across is from Axialis where they offer guidance of saving the ICO file in uncompressed PNG format.
https://www.axialis.com/docs/iw/How_to_use_a_Windows_Vista_Compressed_Icon_in_a_Software_Project.htm

Related

How can I fix Microsoft Visual C++ 2017 X64 Minimum Runtime error during installing Redistributable packages (VC_redist.x64.exe, VC_redist.x86.exe)?

During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.

Text corruption in LLVM 7.0.1 installer

I have tried install llvm 7.0.1 on Windows 10.
But the installer has text corruption like below.
It make so harder to install.
How do I fix it?
I using Windows 10 1809, chcp is 65001.
I using Japanese.
I have enabled "Use Unicode UTF-8 for worldwide language support" in Region settings".
Is this change cause of the error?
But A installer of other application does not be text curruption.
Update:
The Picture of installer with compatibility mode (Windows XP SP3)
That LLVM installer is not a Unicode NSIS installer. The LLVM team can fix it by adding Unicode True to their NSIS script.
That LLVM installer looks like it supports multiple languages (I could not find it's source, it might be using CMake/Ninja) and NSIS does try to guess the correct language but this is based on the return value of GetUserDefaultUILanguage() and not the active codepage.
I could not replicate your issue on build 18290 (after changing to UTF-8 and rebooting I verified that GetACP() returns 65001) but this is probably because my system is detected as English by NSIS.
Based on the (N) in your Next button in your screenshot I'm going to guess that your UI language is detected as Chinese or Japanese?
Without more information about your system it is hard to guess if this is a bug in NSIS or Windows. NSIS is a relatively normal application and does not call MultiByteToWideChar on its interface strings (IIRC).
Edit:
By forcing a installer to pick Japanese I can replicate your issue. The solution for this issue is to switch your "language for non-Unicode programs" back to Japanese if you wish to install this application using Japanese as the display language. Another solution you can try is to set the locale for a single application. AppLocale was Microsoft's solution to this but it is not supported on Windows 10 but there are other alternatives out there.
When building a NSIS installer without Unicode support the program stores the text internally as raw bytes encoded with the codepage of the specific language. At run time it uses functions like SetWindowTextA to set the text of UI elements. This is how non-Unicode applications have worked since the dawn of time on Windows. All non-Unicode programs that display text outside the ASCII range will have the same issue unless they have been specifically written to support UTF-8 as the active codepage (which is unlikely since it is a new feature). This feature is only useful for console applications and ported POSIX applications that assume that the narrow string is UTF-8 encoded.
Too long for a comment.
UPDATE: Looking at this a little, I am wondering if the problem is a font corruption issue. There is a description of rebuilding the font cache here: http://www.trishtech.com/2013/11/rebuild-fonts-cache-windows-8/. I think you must install a good copy of the font file first though? You do that by copying the font files into the Fonts folders I believe. I will check with Anders what font NSIS uses.
Similar issue with an MSI file: Windows Installer ugly font rendering.
Compatibility Mode: Pretty sure that UTF8-setting would cause it. I don't think it would work, but the first thing I would try would be to run the executable in compatibility mode.
Locate the setup.exe in question.
Right click the EXE, hold right mouse button down, now drag to empty desktop area and release mouse button. Click "Create Shortcut Here".
Right click Shortcut => Properties => Compatibilty tab.
Try various combinations of "Run program in compatibility mode for..."
I would try "Windows XP" highest service pack first. Click OK when done.
Now double click the shortcut to launch the executable and see what happens.

visual studio 2015 c++ editor broken, solution?

After an install in VS2015 (intel mkl library with vs integration) the c/c++ editor fails to show anything except the tab on top. No window, no text, nothing.
I dug a bit deeper: a .txt file displays fine, .cs as well. When I set in options that filetype .txt needs editing in C/C++ editor, .txt stopped displaying too.
I have compared every option in tools->options, including the environment options, to a normal working rig, found nothing.
Resetting to default options did not help, nor did changing the color scheme.
Removed the Intel directory from common7/IDE/extensions, no improvement.
I do not know where more secrets are kept, tried a registry search, but found no clues. Everything appears to match, up to the dll for language specialization in vxpackages.
Anyone, before I try to repair the installation?
Thanks in advance,
Jan
Edit: I got the editor back on track by disabling Productivity Power Tools 2015. This took me half a day. Any connection to the Intel install is doubtful!

Programming with GDCM in Windows and changing pixel data with VTK?

I have two questions.
First: I haven't got any definite documentation on how to use the GDCM library in Windows. Is it at all possible to use GDCM library in Visual Studio in windows? If so, could you please provide me any instruction how to install the library in Visual studio? I want to change or add something to the way the GDCM command "gdcmimg" functions.
Second: I have some multiframe dicom images where I need to modify the pixels and keep all the tags(private or non-private) intact. I have tried with Matlab, GDCM and Dcmtk. But in each case there is some problem. Matlab can't change multiframe images as it runs out of memory. GDCM can't keep the tags intact(I use the "gdcmimg" command) and I don't know yet how to change this functionality, dcmtk(I use the "dcmodify" command for that purpose) can only change the single frame dicom images and mysteriously it fails to do so in case of multi-frame dicom images when the images are provided by some vendors. What I mean is that, I tried with the multi-frame dicom images made by myself using matlab and I could change their pixel data in using "dcmodify", but when I try to do so with vendor provided multi-frame dicom image it fails to change the pixel data. So, now I want to try with VTK. Could you please say me whether or not VTK can change the pixel data of a Multi-frame dicom image while keeping all the tags, private or non-private, intact?
Thanks
You can work with GDCM on windows in Visual Studio.
Download the GDCM source.
Download CMake
User CMake to generate a visual studio solution for GDCM
Build the Visual Studio Solution
Use the built library in your own projects.
GDCM has very little documentation.
In regards to the private tags. The general practice is that when you modify/derive an image you do not keep the private tags. The only private tags should be the ones you add.
When all else fails, read the documentation:Configuring and Building With VS .NET 2003. Of course this works with any newer Visual Studio, thanks to the use of CMake.

Where can I locate themes for VS2012

Okay, the lack of color on VS2012 is gross.
Is there someplace I can get a theme pack or something for it so that it actually looks reasonable? I really liked the look of VS2010. However, the new one reminds me way too much of 1984.
While we are at it, is there anyway to have it stop shouting at me? ALL CAPS menus are pretty hard to read. [ note: caps was resolved, thanks Konamiman]
Yes, luckily you can revert the Visual Studio 2012 ALL CAPS menus to normal menus by hacking the registry:
Launch regedit and navigate to
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General
Create a DWORD value named SuppressUppercaseConversion with value 1.
NOTE: As explained in the answer pointed by Yahoo Serious, the VisualStudio part on the registry key name should be changed to VSWinExpress for Visual Studio Express, and to VWDExpress for Visual Studio Express for Web.
UPDATE:
I have applied this hack in another machine and at first it did not work. It turned out that I had selected the key name from this response by double clicking it, then copied it, then pasted it in regedit. Well, by doing so I had inadvertently created the key with a trailing space in the name! And hence it did not work.
So, if you apply this hack and it seems to not work, ensure that there are no trailing spaces in the key name.
New Theme editor Specifically for 2012:
http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05
Comes w/ VS 2010 style blue and a few others...
Here is a shot of my VS2012 install that almost looks like the familiar 2010 we are all used to. It makes me feel normal again!
Here is exactly how I did this, step-by-step:
1) Close all instances of Visual Studio
2) Download vsip and extract it to a temp directory. (as of 1/3/2013 the current version is 1.5.2)
3) Open up a command prompt with "Run as administrator"
4) Go to the temp directory and run VSIP.exe - This will run an interactive program that accepts commands.
4a) Type "backup --version=2012" - This will backup all of your VS2012 UI dlls, just in case something gets messed up and you want to uninstall VSIP.
4b) Type "extract" - This will extract all of the old icons from your installation of VS2010 (per VS2010 license VSIP can not distribute those icons so we have to have a local install to pull them from).
4c) Type "inject" - This will inject all of the old 2010 icons from the previous step into the VS2012 DLLs.
4d) Type "menus -n" - This will change the menus so they are NOT ALL CAPITALIZED!
5) Download and install NiceVS - do not download the one dated 10/14 or you will be missing icons. As of 1/3/2013 I downloaded the file named "NiceVS.0.8.1.1 Beta.Full.vsix".
6) Download and install VS2012 Color Theme Editor - The next time you start VS2012 select the "Blue" theme from the color select window.
Now you should have a nice install of VS2012 that looks like my screen shot above! It takes three different applications to patch that hideous UI but it's certainly workable now! If you don't have VS2010 installed on the same machine as VS2012 then you will have to run 4b on a machine with VS2010 and then copy the VSIP Images directory to your 2012 development machine.
Update: If you install "VS 2012 Update 1" after running these steps you will need to re-run step 4c from the VSIP admin prompt (or all of step 4 if you didn't keep the extract of the VS2010 images). The file menu icons and color scheme stay as they are but the update reverts the icons in the solution explorer back to the ugly ones. Re-running the VSIP inject fixes it right up!
I feel your pain, and have been checking daily for a solution. I've now discovered this site, which includes a theme editor, as well as drumroll a VS2010 theme for VS2012!
http://bchavez.bitarmory.com/archive/2012/08/27/modify-visual-studio-2012-dark-and-light-themes.aspx
Edit - I just noticed that Brian Chavez already posted the same link as me. However, I don't think it included a premade 2010 theme until today.
Edit 2 - Another theme editor - http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05
AND ICONS!!! - http://vsip.codeplex.com/
http://studiostyl.es/
The themes for 2010 work for 2012 as well
This extension was just released a couple of days ago:
Visual Studio 2012 Color Theme Editor
If you want to change the VS shell environment themes in Visual Studio 2012, try this utility:
Modify Visual Studio 2012 Dark (and Light) Themes
Source Code
The quick option to look is VSColorOutput extension for VS2012. Just look at Tools->Extensions and NUGet package will help you to locate it asap.
Another option would be downloading and Visual Studio Color Schemes. http://studiostyles.info/ . Here is a link to Scott Gu's blog which describes how to apply your preferred schema.

Resources