Message to the program from Excel

Message to the program from Excel

Postby Natter » Fri Jun 02, 2017 7:02 pm

I need to send a message to the program from Excel Run the macro
.................
hW=findwindow(Header_MtApp)
PostMessage(hW, WM_USER, 50000, 0)

The main window of my program - TDialog I'm trying to handle external messages through its Handleevent method (by Daniel)

CLASS TMyDialog FROM TDialog
...............................
ENDCLASS

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TMyDialog

if nMsg == 50000
MsgBeep()
endif
return Super:HandleEvent( nMsg, nWParam, nLParam )

Everything works, but message sending is not happening. What I am wrong ?
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 116 guests