Hi, yes it is the CD opener example:
This is what it complains about ...
cmp dword [msg],WM_INITDIALOG
je wm_initdialog
cmp dword [msg],WM_COMMAND
je near wm_command
cmp dword [msg],WM_CLOSE
je near wm_close
Here is the full code listing:
;============================================================================
; Program name: Beer
; Author: Yeoh HS
; Date: 14 October 2003
; Compiler: NASM + RadAsm
; Purpose: To eject CDROM drive
; Also demonstrate how to include icon and version info in program.
;
;============================================================================
%include 'C:\Documents and Settings\Ian\Desktop\Programming\Common\nagoa.inc'
[segment code USE32]
..start:
call GetModuleHandleA, NULL
CONST hInst , dd 0
mov [hInst], eax
call DialogBoxParamA, [hInst],DIALOG_ID, 0,DialogProc, 0
call ExitProcess, [hInst]
; ============ [ MAIN DIALOLOG PROC ] =====================:
proc DialogProc,hdlg,msg,wParam,lParam
cmp dword [msg],WM_INITDIALOG
je wm_initdialog
cmp dword [msg],WM_COMMAND
je near wm_command
cmp dword [msg],WM_CLOSE
je near wm_close
return FALSE
;---------------------------------------------
wm_initdialog:
call LoadIcon, [hInst], IDI_ICON
call mciSendString, cmd_open, NULL, 0,NULL
call mciSendString, cmd_eject, NULL, 0,NULL
call mciSendString, cmd_close, NULL, 0, NULL
call ExitProcess,0
return TRUE
wm_command:
;
return TRUE
wm_close:
call ExitProcess,0
return FALSE
endproc
; ============== [ MAIN DIALOGPROC END ] =============== :
[segment data USE32]
DIALOG_ID equ 1000
IDI_ICON equ 1
cmd_open db 'open cdaudio',0
cmd_eject db 'set cdaudio door open',0
cmd_close db 'close cdaudio',0
;-----------------------------------------------------------