09-05-2007, 06:09 PM
Ok, I know this is very easy. But I canno't seem to figure it out, I've got most of it done. Just one simple mistake most likely. If anyone could help , I would appreciate it. Here is the code:
The problem is, that I can't get the "Close Yahoo! Messenger" button to actually close Yahoo when I press it. I don't know what I'm doing wrong.
function# hDlg message wParam lParam
if(hDlg) goto messages
str a=".exe"
str b="YahooMessenger"
str sf=
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 221 133 "Yahoo! Messenger"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032000 0x0 120 83 98 29 "Close Yahoo Messenger"
;5 Static 0x54000010 0x20000 116 113 117 1 ""
;4 Button 0x54020007 0x0 116 75 108 100 ""
;END DIALOG
str controls="3"
str e3
if(!ShowDialog(sf 0 &controls 0 2)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,ShutDownProcess a.from(b) 2
,case IDOK
,case IDCANCEL
ret 1
The problem is, that I can't get the "Close Yahoo! Messenger" button to actually close Yahoo when I press it. I don't know what I'm doing wrong.