Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window dialog ready to receive input
#1
I am in need to signal when a window dialog is ready to receive some input. In other words I am looking for the proper WM_... message. I have already empirically tested WM_PAINT, it satisfies my needs well. Nevertheless, I am wondering whether it is the proper message. Any advice is mostly welcome. Many thanks in advance.
#2
dialog of your thread?

For a similar purpose is used WM_NULL (0), but I don't fully understand your question.
#3
Yes, it is about a dialog of my thread.

This is a simple example :

Function Dialog28
Code:
Copy      Help
\Dialog_Editor

def DTM_SETSYSTEMTIME (DTM_FIRST + 2)


str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 SysDateTimePick32 0x54030010 0x200 10 6 96 12 ""
;4 Edit 0x54030080 0x200 50 46 96 12 ""
;5 Button 0x54032000 0x0 74 76 48 14 "Set Date"
;6 SysDateTimePick32 0x54030010 0x204 54 96 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""

str controls = "4"
str e4
e4="Tamtiriri"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

;www.quickmacros.com/forum/viewtopic.php?p=18723"I {NowT}"
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
,case WM_SHOWWINDOW
,out F"S {NowT}"
,case WM_ACTIVATE
,out F"A {NowT}"
,case WM_ACTIVATEAPP
,out F"P {NowT}"
,case WM_CREATE
,out F"C {NowT}"
,case WM_PAINT
,out F"T {NowT}"

,
,
ret
;messages2
sel wParam
,case EN_KILLFOCUS<<16|3  
,out "3"

,
,case EN_KILLFOCUS<<16|4  
,out "4"
,
,case DTN_USERSTRING    
,out "haha"
,
,case [5]
,SYSTEMTIME- t_st ;;1 t_st2 t_st3
,DATE x="05-02-2014"
,x.tosystemtime(t_st)
,
;,SendMessage(id(3 hDlg)  DTM_SETSYSTEMTIME 0 "05-02-2014")    
,SendMessage(id(3 hDlg)  DTM_SETSYSTEMTIME 0 &t_st)
,
,case IDOK
,case IDCANCEL
ret 1

;messages3
NMHDR* nh=+lParam
;if(nh.code!=NM_CUSTOMDRAW) OutWinMsg message wParam lParam
;OutWinMsg message wParam lParam
sel nh.code
,case DTN_USERSTRING
,out "haha"
,
,case DTN_CLOSEUP
,out "hihi"
,
,case NM_KILLFOCUS
,out F"kill from {wParam}"
#4
When a window is shown, it receives several messages, and the last usually is WM_PAINT. Then ready.
#5
Many thanks indeed !


Forum Jump:


Users browsing this thread: 3 Guest(s)