first my code:
Code:
case WM_COMMAND:
WORD wID,wNotify;
wID=LOWORD(wparam);
wNotify=HIWORD(wparam);
case BN_CLICKED:
if(wID == 90)
{
WNDCLASS bw;
HINSTANCE hInst;
// register brush insert window class
memset(&bw,0,sizeof(WNDCLASS));
bw.style = CS_OWNDC;
bw.lpfnWndProc = (WNDPROC)WndProc;
bw.cbClsExtra = 0;
bw.cbWndExtra = 0;
bw.hInstance = hInst;
bw.hIcon = LoadIcon( NULL, IDI_APPLICATION );
bw.hCursor = LoadCursor( NULL, IDC_ARROW );
bw.hbrBackground = (HBRUSH)GetStockObject( LTGRAY_BRUSH );
bw.lpszMenuName = NULL;
bw.lpszClassName = "BrushWin";
if (RegisterClass( &bw ))
{
HWND BrushWin;
HWND button;
BrushWin = CreateWindow(
"BrushWin", "",
WS_CHILD | WS_POPUP | WS_VISIBLE | WS_CAPTION,
100, 100, 400, 300,
hWnd, NULL, hInst, NULL );
button = CreateWindow("BUTTON", "Cancel", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 330, 246, 64, 24, BrushWin,(HMENU) 210, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE), NULL);
if(wID == 210)
{
DestroyWindow(BrushWin);
}
}
}
return 0;
break;
anyway....when that button is pressed, the specified window will not close.
any help will be greatly appreciated
-psychopath