PureBasic Forum
https://www.purebasic.fr/english/

Assembly and Child window
https://www.purebasic.fr/english/viewtopic.php?f=5&t=2909
Page 1 of 1

Author:  BackupUser [ Thu Jan 03, 2002 10:52 am ]
Post subject: 

Restored from previous forum. Originally posted by Danilo.

Hello !!

I want to make a child window in the
main window, but the child window
should have its own Window-Procedure.

How is this possible ??

I think i can register a new class
with its own Window-Procedure, and
open a window with that class.

But i´m not sure if i can make this
Window a child window in a Purebasic
main-window.

Hope you understood :wink:

short:
I need a childwindow (Toolbar for example,
so its class "ToolbarWindow32"), but with
its own Window-Procedure (own thread?) to
manage WM_SIZE etc. without user-input.

Thanks,
...Danilo
( /me is away.... cya tomorrow m8z )

Edited by - Danilo on 03 January 2002 10:53:49

Author:  BackupUser [ Thu Jan 03, 2002 3:54 pm ]
Post subject: 

Restored from previous forum. Originally posted by El_Choni.

Hi Danilo,

You now I'm no API guru, but I think this is called window subclassing, or superclassing, or nothing. What matters is that this is achieved by using SetClassLong, as far as I know.

Don't think this helped you too much... bye,

El_Choni

Author:  BackupUser [ Thu Jan 03, 2002 6:35 pm ]
Post subject: 

Restored from previous forum. Originally posted by fred.

I don't think you can change the WindowProcedure of a Windows registered class (like Button, ToolBar etc..). Try with SetWindowLong()...

Fred - AlphaSND

Author:  BackupUser [ Tue Jan 08, 2002 8:46 pm ]
Post subject: 

Restored from previous forum. Originally posted by preacher.

In case you haven't allready tried. This should work, atleast it did in VB.

procedure test(lParam,wParam,Msg,hWnd)
;I guess the reversed params is because how Purebasic passes procedure ;parameters.

endprocedure

new_proc=@test()
old_proc=SetWindowLong(hwnd,#GWL_WNDPROC, new_proc)


[Preacher]

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/