Window won't open on button command?
I can't get a window to display on a button command.....here is my WM_COMMAND code:
Code:
case WM_COMMAND:
WORD wID,wNotify;
HINSTANCE hInstance;
HWND BrushWin;
wID=LOWORD(wparam);
wNotify=HIWORD(wparam);
if (lparam)
{
//if a button was clicked
if (wNotify==BN_CLICKED)
{
//if a buttons id was clicked
if (wID==10)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==20)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==30)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==40)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==50)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==60)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==70)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==80)
{
MessageBox (NULL, "it works" , ":)", 0);
}
if (wID==90)
{
BrushWin = CreateWindow(
"ModelWin", "Model Preview",
WS_CHILD | WS_DLGFRAME | WS_VISIBLE,
64, 64, 400, 300,
hWnd, NULL, hInstance, NULL );
}
if (wID==100)
{
MessageBox (NULL, "it works" , ":)", 0);
}
}
}
break;
it's probably somthing simple that i have done wrong....but i can't seem to figure it out :)
Also please not that the 'it works' message boxs are so can tell if button command is at least being processed.
any help will be appreciated
-psychopath