Hello
I have one more question.
How i can add my own message that the my gadget (from my lib) sends to the parent window of the lib?
I want send a message like WM_LBUTTONDBCLK to the callback of the parent window.
Thanks,
Nico
[SOLVED] how add own message?
Moderators: gnozal, ABBKlaus, lexvictory
You can either construct your own messages based upon #WM_USER or #WM_APP, or use RegisterWindowMessage_() to construct a system wide unique message.
Which method you use really depends on the nature of the parent window. Some pre-registered windows classes, e.g. ListView controls (LIstICons), make use of #WM_USER for certain private messages etc. If in doubt, use RegisterWindowMessage_().
**EDIT : if you are creating a custom gadget and wish to send notifications to the parent window, then you may be better off passing a #WM_NOTIFY message.
Which method you use really depends on the nature of the parent window. Some pre-registered windows classes, e.g. ListView controls (LIstICons), make use of #WM_USER for certain private messages etc. If in doubt, use RegisterWindowMessage_().
**EDIT : if you are creating a custom gadget and wish to send notifications to the parent window, then you may be better off passing a #WM_NOTIFY message.
I may look like a mule, but I'm not a complete ass.
Hm...
I test it so:
in the Res file of the lib i have a constante like this one:
Code inside the lib:
Code in the program
But if i run the programm with debug it dont show the debug message if i doppelclick in the gadget.
Is my way the right one?
I test it so:
in the Res file of the lib i have a constante like this one:
Code: Select all
#TLG_LBUTTONDBCLK = #WM_USER+1
Code: Select all
SendMessage_(*tgm\hWndParent,#TLG_LBUTTONDBCLK,*tgi,0)
Code: Select all
Procedure MyCallBack(wnd,msg,wParam,lParam)
Select message
Case #TLG_LBUTTONDBCLK
Debug "it works"
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
But if i run the programm with debug it dont show the debug message if i doppelclick in the gadget.
Is my way the right one?
my live space
ups you are right! i must go sleepABBKlaus wrote:if you replace message with msg it should work
my live space