Click to See Complete Forum and Search --> : Icon Display Problem


razor1021
January 21st, 2004, 03:04 PM
Hi all,

I'm experiencing an icon display problem in a window. Here's the code:

HICON hIcon;

hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));

SendDlgItemMessage(hWnd, IDC_TESTICON, STM_SETIMAGE, IMAGE_ICON, (LPARAM) (UINT) hIcon);

I've already physically created a picture control in the window and set the appropriate properties of that control. The icon still doesn't show up. Any help is appreciated. Thanks.

BorisKK
January 22nd, 2004, 03:38 AM
1) What is the value (NULL or not NULL) of hIcon after LoadIcon?
2) Is IDC_TESTICON a static control with SS_ICON style?