Change BACKCOLOR of SPLITCHILD Window

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 1958
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 32 times
Been thanked: 125 times
Contact:

Re: Change BACKCOLOR of SPLITCHILD Window

Post by srvet_claudio » Sat Jun 01, 2013 5:19 pm

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 134 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
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Sat Jun 01, 2013 6:28 pm

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: 1907
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 318 times
Been thanked: 74 times
Contact:

Post by serge_girard » Sun Jun 02, 2013 7:15 am

Great !

Thx, Serge

Post Reply