Bonjour,
je continue ma découverte de MASM et j'ai encore une question...
Voici un extrait du code que j'ai placé dan DlgProc proc :
...
.if dx==BN_CLICKED
invoke GetDlgItemText,hWin, IDC_EDT1, ADDR tempo, 512
.if ax==IDC_BTN1
invoke SetDlgItemText,hWin, IDC_EDT2, ADDR tempo
.elseif ax==IDC_BTN2
invoke MessageBox,hWin, ADDR tempo, ADDR tempo, MB_OK
.endif
.endif
...
Cela ne fonctionne pas, alors que le code ci-dessous fonctionne :
...
.if dx==BN_CLICKED
.if ax==IDC_BTN1
invoke GetDlgItemText,hWin, IDC_EDT1, ADDR tempo, 512
invoke SetDlgItemText,hWin, IDC_EDT2, ADDR tempo
.elseif ax==IDC_BTN2
invoke GetDlgItemText,hWin, IDC_EDT1, ADDR tempo, 512
invoke MessageBox,hWin, ADDR tempo, ADDR tempo, MB_OK
.endif
.endif
...
Je ne comprends pas du tout pourquoi le premier code ne fonctionne pas. Il semble pourtant correct, non ?