For some reason, this code does not load the icon that it should when the program runs, hope some1 can help, thanks in advance...
Any ideasCode://Main window set up... LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { MSG msg; HWND hwd; HINSTANCE g_hinst; static HBITMAP hbmp; static HICON hIcon; static HWND hIconBtn; static HWND hBmpBtn; switch (message) /* handle the messages */ { // ICON BUTTON hIconBtn = CreateWindowEx(0, TEXT("BUTTON"), TEXT(""), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, 220, 5, 150, 65, hwnd, NULL, g_hinst, NULL); // INSERT ICON hIcon=(HICON)LoadImage(NULL,IDI_EXCLAMATION,IMAGE_ICON,0,0,LR_SHARED); SendMessage(hIconBtn,BM_SETIMAGE,IMAGE_ICON,(LPARAM)hIcon); }![]()



LinkBack URL
About LinkBacks



