News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how define the buffer in a child window.

Started by six_L, May 02, 2005, 06:38:38 AM

Previous topic - Next topic

six_L

Hello, all

;=================================================================
....
   INVOKE WinMain, hInstance,NULL,SW_SHOWDEFAULT
....
;=================================================================
WinMain proc hInst0:HINSTANCE,hPrevInst:HINSTANCE,CmdShow:SDWORD
   INVOKE DialogBoxParam, hInst0, OFFSET MainDlgName,NULL,addr DlgProc,NULL
   RET
WinMain endp
;=================================================================
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.........
   MOV EAX,OFFSET ChildDlgProc1
   INVOKE CreateDialogParam,hInstance,OFFSET Child1Name,hwndTab,EAX,0
   MOV Child1hWnd,EAX
.........

   ret
DlgProc endp
;=================================================================
ChildDlgProc1 PROC SmallhWnd:HWND, uMsg1:UINT, wParam1:WPARAM, lParam1:LPARAM
   
   Local showbuf[4096]:BYTE,showbuf1[2048]:BYTE,showbuf2[2048]:BYTE,showbuf3[512]:BYTE

..........

   RET
ChildDlgProc1   ENDP
;=================================================================

in the above code,
if I modified " Local showbuf[4096]:BYTE,showbuf1[2048]:BYTE,showbuf2[2048]:BYTE,showbuf3[512]:BYTE"--->"Local showbuf[8192]:BYTE,showbuf1[2048]:BYTE,showbuf2[2048]:BYTE,showbuf3[512]:BYTE"
the exe file can't starup.
if I didn't modified the code, when the child windows open, howwhere I click, the exe will closed.

That's why?


regards


regards

roticv

There are some issues about allocating too much stack memory. Solution to that includes probing the stack before using it if I am not wrong. You would need to search the win32asmcommunity for more information...

six_L

hello, roticv.
Thanks you for help.
i'll done.

regards.
regards