It is currently Sat Jul 04, 2020 9:46 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject:
PostPosted: Thu Jan 03, 2002 10:52 am 
Offline
PureBasic Guru
PureBasic Guru

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 03, 2002 3:54 pm 
Offline
PureBasic Guru
PureBasic Guru

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 03, 2002 6:35 pm 
Offline
PureBasic Guru
PureBasic Guru

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jan 08, 2002 8:46 pm 
Offline
PureBasic Guru
PureBasic Guru

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye