FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Message to the program from Excel
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Message to the program from Excel
Posted: Fri Jun 02, 2017 07: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 ?

Continue the discussion