%include "\lab\vasm\inc\nagoa.inc"

bss32

hInstance resd 1

data32

ID_DIALOG equ 100
IDC_TRB1 equ 1001
IDC_EDT1 equ 1002
ID_close_button equ 2

code32

..start:

invoke GetModuleHandle,NULL
mov ,eax
invoke InitCommonControls
invoke DialogBoxParam,,ID_DIALOG,NULL,DlgProc,NULL
invoke ExitProcess,0

proc DlgProc , hdlg , uMsg , wParam , lParam

if dword ,e,WM_INITDIALOG
invoke SendDlgItemMessage,,IDC_TRB1,TBM_SETRANGEMIN,FALSE,0
invoke SendDlgItemMessage,,IDC_TRB1,TBM_SETRANGEMAX,FALSE,20
return TRUE
endif

if dword ,e,WM_COMMAND
if dword ,e,ID_close_button
invoke SendMessage,,WM_CLOSE,0,0
endif
return TRUE
endif

if dword ,e,WM_HSCROLL
invoke SendDlgItemMessage,,IDC_TRB1,TBM_GETPOS,0,0
invoke SetDlgItemInt,,IDC_EDT1,eax,FALSE
return TRUE
endif

if dword ,e,WM_CLOSE
invoke EndDialog,,0
return TRUE
endif

return FALSE

endproc DlgProc





made in NAGOA

update yesterday i think
Posted on 2004-02-29 15:48:42 by ZobySound
%include "\lab\vasm\inc\nagoa.inc"

bss32

iccex resb INITCOMMONCONTROLSEX_size
hInstance resd 1

data32

iccex.dwSize equ iccex + 0
iccex.dwICC equ iccex + 4
IDD_DLG equ 1000

code32

..start:

invoke GetModuleHandle,NULL
mov ,eax
invoke InitCommonControls
mov dword ,INITCOMMONCONTROLSEX_size
mov dword ,ICC_DATE_CLASSES
invoke InitCommonControlsEx,iccex
invoke DialogBoxParam,,IDD_DLG,NULL,DlgProc,NULL
invoke ExitProcess,0



proc DlgProc , hWin , uMsg , wParam , lParam

if dword ,e,WM_INITDIALOG
return TRUE
endif
if dword ,e,WM_COMMAND
return TRUE
endif
if dword ,e,WM_CLOSE
invoke EndDialog,,0
endif

return FALSE
endproc DlgProc
Posted on 2004-02-29 17:41:29 by ZobySound
and the point of this is?
Posted on 2004-02-29 19:24:16 by evlncrn8
Hi ZobySound,

Are you having a problem or was it just to show that you can use a DlgProc. If it is just to demonstrate the DlgProc I think most people here are capable of using one. Like evlncrn8, I have to ask what the point of this was. If it was a code demonstration it should be in the Algorithms and source code section, but it is fairly simple code so I doubt it would be useful to many.
Posted on 2004-02-29 19:33:57 by donkey
You failed to mention it should be in
 tags as well
Posted on 2004-02-29 20:10:39 by comrade