Recently I've been trying to make a small program that contains a bitmap, but whenever i try to add the bitmap file to the bitmap control when the dialog is initialized, it doesn't show when compiled.
Here is my code:
The bitmap control id is IDC_IMG1 and the bitmap hook is HBITMAP.
hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON, 32, 32, 0);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
hBitmap = LoadBitmap(hInstance,MAKEINTRESOURCE(IDI_MYIMAGE));
SendDlgItemMessage(hWnd, IDC_IMG1, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
Does anyone know how to fix this? If I've forgotten any important code please tell me and ill add it.
Thanks in advanced.