Ok i got a dialog and whant to crae a status window to it at the WM_INITDIALOG message.
but when i create the window iy's attached to my dialog but to a button on it i don't understand if someome could tell me were i'm wrong i'll be so happy pleas help me thanks.

call DialogBoxParamA,MainProgHandle,IDD_DIALOG1,NULL,offset DlgProc,NULL
call GlobalFree,FileListMemH
call ExitProcess,0
DlgProc proc hWin:dword,uMsg:dword,wParam:dword,lParam:dword
mov eax,uMsg
.if eax==WM_INITDIALOG
mov eax,WS_CHILD
add eax,WS_VISIBLE
add eax,WS_BORDER
add eax,SBARS_SIZEGRIP
add eax,WS_DLGFRAME
call CreateWindowExA,0,offset SzStausBarClass,offset SZStatus,eax,108,130,60,12,hwin,0,MainProgHandle,0
mov HstatusWin,eax
.elseif eax==WM_COMMAND
mov eax,wParam
mov edx,eax
shr edx,16
and eax,0FFFFh
.if edx==BN_CLICKED
.if eax==ID_QUIT
Call EndDialog,hWin,0
.elseif eax==ID_LAUNCH

call PRocessList,FileListMemP,FileListSize,hwin
.endif
.elseif eax==ID_STATUSBAR


.endif
.elseif eax==WM_CLOSE
Call EndDialog,hWin,0
.else
xor eax,eax
ret
.endif
call DefWindowProcA,hWin,uMsg,wParam,lParam
ret
DlgProc ENDP
Posted on 2004-08-06 17:08:07 by Thor0Asgard
You are not using the window handle that is passed in the dialog proc...

call CreateWindowExA,0,offset SzStausBarClass,offset SZStatus,eax,108,130,60,12,hwin,0,MainProgHandle,0

Should be:

call CreateWindowExA,0,offset SzStausBarClass,offset SZStatus,eax,108,130,60,12,hWin,0,MainProgHandle,0

And why the heck are you doing all the styles in eax, it's sort of a waste when you can just have the assembler add them up at compile time.
Posted on 2004-08-06 17:11:32 by donkey
Thanks it's was This Big mistake when you search for it for 30 min after working on this project all the day you can't see anything.

Thank u again and go on you're doing a fantastic job here
Posted on 2004-08-06 17:35:36 by Thor0Asgard
Just another small detail for your consideration. When you are combining several flags, it's always safer to OR them instead of ADD them. The reason is that if one of the flags would not belong to the current category and would have the same bit as one of the other flags, ORing wil have no detrimental effect.

Raymond
Posted on 2004-08-06 22:24:08 by Raymond