I want to make child window not bounded by my parent window.

so i can for example move this two window side by side,

BTW can u give me some good axample with Child window cuz mine bugged badly cuz its transparen (i set mov hbrBackground,COLOR_BTNFACE+1) and when i close my child W then my parent W is closing also. I think that problem lies in registering.
Posted on 2003-06-20 16:15:26 by AceEmbler
A child window is always restricted to its parent's window rectangle.
Posted on 2003-06-21 01:00:02 by japheth
Another qestion:



WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
LOCAL wc:WNDCLASSEX
LOCAL wcAddData:WNDCLASSEX
LOCAL msg:MSG
LOCAL hwnd:HWND
LOCAL hwndAddData:HWND

invoke LoadImage,hInst,addr BcgrBitmap,IMAGE_BITMAP,96,96,LR_LOADFROMFILE
mov hBcgrBitmap,eax

invoke CreatePatternBrush,eax
mov hBcgrBrush,eax
mov wc.cbSize,SIZEOF WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc
mov wc.cbClsExtra,NULL
mov wc.cbWndExtra,NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground,eax
mov wc.lpszMenuName,NULL
mov wc.lpszClassName,OFFSET WinClassName

invoke LoadIcon,hInst,500 ;ID in res
mov wc.hIcon,eax
mov wc.hIconSm,eax

invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor,eax

invoke RegisterClassEx, addr wc
INVOKE CreateWindowEx,NULL,ADDR WinClassName,ADDR AppName,\
WS_MINIMIZEBOX or WS_VISIBLE or WS_CAPTION or WS_SYSMENU,\
CW_USEDEFAULT,CW_USEDEFAULT,600,500,NULL,NULL,\
hInst,NULL

mov hwnd,eax

invoke ShowWindow, hwnd,SW_SHOWNORMAL
invoke UpdateWindow, hwnd

mov wcAddData.cbSize,SIZEOF WNDCLASSEX
mov wcAddData.style, CS_HREDRAW or CS_VREDRAW
mov wcAddData.lpfnWndProc, OFFSET WndProcAddData
mov wcAddData.cbClsExtra,NULL
mov wcAddData.cbWndExtra,NULL
push hInstance
pop wcAddData.hInstance
mov eax,hBcgrBrush
mov wcAddData.hbrBackground,eax;COLOR_BTNFACE+1
mov wcAddData.lpszMenuName,NULL
mov wcAddData.lpszClassName,OFFSET WinClassNameAddData

invoke LoadIcon,hInst,500 ;ID in res
mov wcAddData.hIcon,eax
mov wcAddData.hIconSm,eax

invoke LoadCursor,NULL,IDC_ARROW
mov wcAddData.hCursor,eax

invoke RegisterClassEx,addr wcAddData
INVOKE CreateWindowEx,WS_EX_ACCEPTFILES or WS_EX_TOPMOST ,ADDR WinClassNameAddData,ADDR AddDataName,\
WS_MINIMIZEBOX or WS_VISIBLE or WS_CAPTION or WS_SYSMENU,\
CW_USEDEFAULT,CW_USEDEFAULT,100,100,NULL,NULL,\
hInst,NULL

mov hwndAddData,eax

invoke ShowWindow, hwndAddData,SW_SHOWNORMAL
invoke UpdateWindow, hwndAddData

.WHILE TRUE
invoke PeekMessage, ADDR msg,NULL,0,0,PM_REMOVE
.IF eax!=0
.IF (msg.message==WM_QUIT)
.BREAK
.ENDIF
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.ELSE
;-------------------STUFFFFORPEEKMESSAGE------------
.ENDIF
.ENDW

mov eax,msg.wParam
ret
WinMain endp



This is my WinMain, I create 2 windows inside. When i close second window this window is closing and the previous one is still on my screen. But when i close this first one two windows are closing. WHY ????
Posted on 2003-06-21 04:56:54 by AceEmbler
When i close second window this window is closing and the previous one is still on my screen. But when i close this first one two windows are closing. WHY ????

Closing the first windows probably calls PostQuitMessage or similar somewhere in your code.
Posted on 2003-06-21 06:45:56 by Eóin

When i close second window this window is closing and the previous one is still on my screen. But when i close this first one two windows are closing. WHY ????

Closing the first windows probably calls PostQuitMessage or similar somewhere in your code.



heh u were right i was invoking PostQuitMessage during WM_DESTROY
Posted on 2003-06-21 07:23:26 by AceEmbler