Page 3 of 3

Re: Change BACKCOLOR of SPLITCHILD Window

Posted: Sat Jun 01, 2013 5:19 pm
by srvet_claudio
Pablo César wrote:Hi dear Claudio,

In MAIN ON INIT it is calling InstallEventHandler with just one parameter. It is a interesting new function you have created at h_windows.prg. And I wish to add at least one parameter and if possible: two.

Because in your SplitChildWindow_ON_PAINT function, forms parameters ("Win1" and "SplitChild_1") are fixed and I would like to let it in variables way. The most strange (at least for me), this SplitChildWindow_ON_PAINT function received these arguments:

SplitChildWindow_ON_PAINT(hWnd, nMsg, wParam, lParam)

So I would like to understand this function call and I would like your help to adapt with forms variables (if is it possible, of course).

Thanks, Dr. Soto for your attention.
Hi Pablo.

1) InstallEventHandler is a native function of HMG that accepts only one paramatro: the name of the function to call.

2) The function registered with InstallEventHandler should always have the following parameters: ( hWnd, nMsg, wParam, lParam )
These parameters are the same with that the system communicates with the procedures that manipulate the windows.
In this function you process the system message.

3) I developed a way more easy:

Code: Select all

SPLITCHILD WINDOW <cForm> OF <cParent> ON PAINT <OnPaintProcedure>
see demo.

Change BACKCOLOR of SPLITCHILD Window

Posted: Sat Jun 01, 2013 6:28 pm
by Pablo César
Thank you, Dr. Claudio !

Re: Change BACKCOLOR of SPLITCHILD Window

Posted: Sun Jun 02, 2013 7:15 am
by serge_girard
Great !

Thx, Serge