Assembly and Child window

Windows specific forum
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

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]
Post Reply