I'm checking it in an Callback if the mousepointer is over the gadgets and the code know when I'm over the gadget. tried to set uMsg to 0, wParam to 0 and both to zero, but the window popupmenu still comes up.
Is #WM_RBUTTONDown the place to kill it of at all?
As of now, Its not doing anything with the clipboard except check it.
Code: Select all
Procedure.i WindowCallback(hWnd.i, uMsg.i, WParam.i, LParam.i)
Protected.i GadgetClicked
Protected.POINT pt
Protected.s sTemp
Protected.i x, i
Protected.w IsNumber
Protected.w Character
Select WParam
Case #WM_RBUTTONDOWN
sTemp = GetClipboardText()
i = Len(sTemp)
IsNumber = 1
While x < i
Character = PeekW(@sTemp+ (x * #SizeWord))
If character > #VK_9 Or character < #VK_0
isnumber = 0
Break
EndIf
x + 1
Wend
GetCursorPos_(@pt)
GadgetClicked = WindowFromPoint_(PeekQ(@pt))
Select GadgetClicked
Case HwndMinutesFromTheBeginning ;#TxtMinutesFromTheBeginning
Debug "MFTB"
;uMsg = 0
Case HwndHourInDay ;#TxtHourInDay
Debug "HID"
;uMsg = 0
Case HwndMinutesInHour ;#TxtMinutesInHour
Debug "MIAH"
;uMsg = 0
EndSelect
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure