0

So I'm practicing with Windows Apps and I've created a 2048 version in WinApi coded in C++. Added a simple icon created in Paint just to see how it works, now few mins ago I've created a better looking one to update the game and add few features, I've successfully changed the icon but if I resize or better to say, enlarge the icons to see how it looks it changes back to the old one. I've even deleted all references of the old icon from the .cpp, .h and .rc files but the problem is still there.

Here's what's going on (upper icons are before I enlarged them a bit with (ctrl+scroll)): http://postimg.org/image/aqw52jdtp/ Icon is 32x32, 24bit.

This is what my code looks like:

WndClass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON2));
WndClass.hIconSm = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON2));

IDI_ICON2 has the value from .rc file, no other references exist regarding icons or bitmaps. Any1 know why this is happening?

Survaf93
  • 162
  • 1
  • 11
  • I don't really understand your description of the problem. You are modifying the original ICO file, saving your changes, rebuilding the application, and yet you're still getting the old icon? What does `IDI_ICON2` map to in the resource (RC) file? – Cody Gray - on strike May 18 '14 at 23:38
  • No,no,no, I get the new icon but when I go into folder to see how .exe icon looks, it's fine but if I try to enlarge my icons ( ctrl + scroll up ) then at some point it switches back to the old one. – Survaf93 May 19 '14 at 07:12
  • and when I zoom out then it goes back to normal, like it can't handle the larger resolution and it swaps icons. – Survaf93 May 19 '14 at 07:42
  • What size icons are you providing in the ICO file? When you change the size of the icons displayed in Windows Explorer, it goes and hunts for a more appropriately-sized icon. It may also be simply an issue of stale icons in the icon cache; try clearing it. – Cody Gray - on strike May 19 '14 at 12:48
  • As I edited in the question, icon is 32x32 – Survaf93 May 19 '14 at 13:33

0 Answers0