Here is an example:

Code:
dialog test {
  size -1 -1 200 200
}
alias test_dialog {
  dialog -dm test test
  noop $dll(cwnd.dll,subclass,mysubclass $dialog(test).hwnd 1 mysubclass) $dll(cwnd.dll,block,mysubclass 1 SYSCOMMAND) $& 
  $dll(cwnd.dll,ignore,mysubclass 1 *) $dll(cwnd.dll,ignore,mysubclass 0 SYSCOMMAND)
}

alias mysubclass if ($2 == SYSCOMMAND) && ($3 != CLOSE) noop $dll(cwnd.dll,callWindowProc,mysubclass $2 $5 $6) 
alias test_dialog_close noop $dll(cwnd.dll,callWindowProc,mysubclass WM_CLOSE 0 0 0) $dll(cwnd,sfree,mysubclass) | dialog -x test
Use /test_dialog to try this example, do not call /dialog -x to close the dialog, use the /test_dialog_close alias, which will clean up stuff before calling /dialog -x

Dll is available here, documentation (in french) available here

Last edited by Wims; 15/01/16 09:42 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel