I have registered two window classes. One main window and one childwindow. Not MDI windows. Do anybody know why the child not is showing up?
Here is the code.

;Main window
mov  wc.cbSize,SIZEOF WNDCLASSEX
mov  wc.style, CS_BYTEALIGNWINDOW
mov  wc.lpfnWndProc, offset WndProc
mov  wc.cbClsExtra,NULL
mov  wc.cbWndExtra,NULL
push  hInstance
pop  wc.hInstance
mov  wc.hbrBackground,COLOR_WINDOW+1
mov  wc.lpszMenuName,IDC_MAINMENU
mov  wc.lpszClassName,offset szMainClass

invoke LoadIcon,NULL,IDI_APPLICATION
mov  wc.hIcon,eax
mov  wc.hIconSm,eax

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

invoke RegisterClassEx, addr wc
invoke CreateWindowEx,WS_EX_CLIENTEDGE,addr szClassName,addr szAppName,\
WS_OVERLAPPEDWINDOW or WS_CLIPSIBLINGS or WS_CLIPCHILDREN,\
      CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,hInst,NULL
mov hwnd,eax

;Child window
mov  wc.cbSize,SIZEOF WNDCLASSEX
mov  wc.style, CS_HREDRAW
mov  wc.lpfnWndProc, offset ChildProc
mov  wc.cbClsExtra,NULL
mov  wc.cbWndExtra,NULL
push  hInstance
pop  wc.hInstance
mov  wc.hbrBackground,COLOR_BTNFACE+1
mov  wc.lpszMenuName,NULL
mov  wc.lpszClassName,offset szChildClass

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

invoke RegisterClassEx, addr wc


This is the main window process

.if uMsg==WM_CREATE
invoke CreateWindowEx,NULL,addr szChildClass,0,\
          WS_VISIBLE or WS_CHILD or WS_CLIPCHILDREN,0,0,500,300,hWnd,NULL,hInstance,NULL

Posted on 2006-10-23 14:05:50 by minor28
I find the solution. I moved CreateWindowEx to the WinMain process.
Posted on 2006-10-23 16:16:23 by minor28