Originally Posted by
Cool-August
It looks like you'r printing the bitmap in the parent window's callback and HDC. You need to do it in the button's own callback and HDC. Give the button the style BS_FLAT too.
I'm sending a message directly to the button on the dialog with
Code:
SendDlgItemMessage(hDlg, IDC_OKAYBUTTON, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_OKAY)));
. The button is actually a button control, not a button done with CreateWindow. If I used GetDC and all that to draw within the button wouldn't it still be limited to the frame? Currently everything "works" so to speak, it's just that if I have an 80x20 pixel bitmap and an approx. 60x10 button then only 60x10 of the bitmap will be displayed.