im still having a bit of trouble
without changing the rc file how do I change the caption at run time or is it possible?
thanks
%include "c:\nasm\ini\win32\WIN32N.INC"
IDD_DLG1 equ 1000
IDC_BTN1 equ 1001
MSGhWnd equ 0
MSGmsg equ 4
MSGwParam equ 8
MSGlParam equ 12
EXTERN GetModuleHandleA
IMPORT GetModuleHandleA Kernel32.dll
EXTERN DialogBoxParamA
IMPORT DialogBoxParamA user32.dll
EXTERN MessageBoxA
IMPORT MessageBoxA user32.dll
EXTERN ExitProcess
IMPORT ExitProcess kernel32.dll
section .code USE32
..start:
push dword 0
call [GetModuleHandleA]
mov [mywindowinstance], eax
push dword 0
push dword mydialog
push dword 0
push dword IDD_DLG1
push dword [mywindowinstance]
call [DialogBoxParamA]
mydialog:
cmp dword [esp+4+MSGwParam],1001
je exitout
cmp dword [esp+4+MSGmsg], WM_CLOSE
je exitout
jmp returnback
exitout:
push dword 0
call [ExitProcess]
jmp returnback
testout:
;;push dword MB_OK
;;push dword textinside
;;push dword textinside
;;push dword 0
;;call [MessageBoxA]
returnback:
mov eax, 0
ret 16
section .data USE32
mywindowinstance dd 0
#define IDD_DLG1 1000
#define IDC_BTN1 1001
IDD_DLG1 DIALOGEX 10,10,150,100
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_CAPTION
CAPTION "Test_dialog"
FONT 8,"Tahoma"
STYLE WS_VISIBLE|WS_OVERLAPPEDWINDOW
BEGIN
CONTROL "EXIT",IDC_BTN1,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,15,21,39,15
EDITTEXT 206,3,50,100,12,ES_AUTOHSCROLL
END