Please !! Stupid Icon !!

Started by
18 comments, last by Prozak 22 years, 8 months ago
Ok, I''ve had it !! Why can''t i get that small upper-left icon thingy to work well in my app? All windows apps have that icon, why doens''t mine work? Someone please point me some code or url... I''m out to shoot myself, thank you... Hugo Ferreira UniteK Future "My Name Is Jerry."[TheSphere]
Advertisement
Hi pentium3id. Me again...

Basically, (I''m pretty sure I remember you saying you use VC++) you need to make a 32x32 icon for your app. This is the large icon. Then, click the little thing to make a 16x16 icon. Make them both within the same file. In your application, you must define a WNDCLASSEX structure in the beginning of your program (you already have most likely). Add the line

//assuming your structure is named wndclassex
wndclassex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WHATEVER));
wndclassex.hIconSm = NULL;

This will automatically make the small icon set to the small icon within the file used for the large icon.
I wuz about to say that.

D.V.
D.V.Carpe Diem
im gonna try that, hold your breath...
Should work... works for me anyway.
What app do u use for icon editing? microangelo?


Hugo Ferreira
UniteK Future
"My Name Is Jerry."[TheSphere]
You can do it within Visual C++.
OK.
Im using Microangelo, and a DX icon.
This Direct X icon has 4 layers,
a 16x16x(16/256) and a 32x32(16/256)

so it has 4 icon version inside.
Im using it.
Why doesn it work?

Heres the code for the window:

  winclass.style			= CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_OWNDC;winclass.cbClsExtra		= 0;winclass.cbWndExtra		= 0;winclass.hbrBackground	= (HBRUSH)(COLOR_WINDOW); winclass.hIcon			= LoadIcon(NULL, MAKEINTRESOURCE(ID_ICON_DX));winclass.hIconSm		= NULL; //LoadIcon(NULL, MAKEINTRESOURCE(ID_ICON_DX)); winclass.hCursor		= LoadCursor(NULL, IDC_ARROW);winclass.lpszMenuName	= "MyMenu";  


is there interference from the window type with the icon displaying ability?


Hugo Ferreira
UniteK Future
"My Name Is Jerry."[TheSphere]
Try passing the application instance handle in LoadIcon instead of NULL.
Did you get it to work yet?

This topic is closed to new replies.

Advertisement