Im trying to use a bitmap image as a button but when i click on the image it doesnt do anything
Code:
#include <windows.h>
#include "resource.h"
LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
switch (message)
{
case WM_CLOSE:
EndDialog(hwnd,true);
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case START_IMAGE:
MessageBox(NULL,"Message","Message",MB_OK);
break;
}
break;
}
return false;
}
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpCmdLine,int nCmdShow)
{
DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),NULL,DLGPROC(WndProc));
return true;
}
It compiles with no error's..... im using the Picture control wich comes with MFC