Reputation: 1066
I am trying to display a modeless dialog in Visual C++ with a bitmap image on it. I created the dialog using Visual Studio's Resource View and when previewed it shows up just fine. When trying to display it as a modeless dialog the image does not show up, just a blank dialog window. Here is the code I am using to show the dialog:
HWND g_splash = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SPLASH), NULL, NULL);
if(g_splash != NULL)
{
ShowWindow(g_splash, SW_SHOW);
}
Also, when opened as a modal dialog the image appears just fine, so I am thinking it is not an issue with the dialog itself. Any ideas on why this is happening would be appreciated, thanks in advance.
Upvotes: 2
Views: 783
Reputation: 23
I have tried it in VS2012 MFC, it works fine.
The modeless dialog with image is showed after calling CreateDialog
Maybe is something wrong else, not CreateDialog function, you may change a image to try. my image is bmp file and small size(7.08KB)
Upvotes: 0