Change BACKCOLOR of SPLITCHILD Window

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Change BACKCOLOR of SPLITCHILD Window

Post 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.
Attachments
BT_demo14_b.rar
(56.6 KiB) Downloaded 321 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Change BACKCOLOR of SPLITCHILD Window

Post by Pablo César »

Thank you, Dr. Claudio !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Change BACKCOLOR of SPLITCHILD Window

Post by serge_girard »

Great !

Thx, Serge
There's nothing you can do that can't be done...
Post Reply