Smaller SystemMenu ?

Just starting out? Need help? Post your questions and find answers here.
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 skypa.

Hi,

is it possible to get a smaller window system-menu?

For example:
http://mitglied.lycos.de/gebskypa/littlesysmenu.GIF
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.

I think you can use WS_TOOLWINDOW in CreateWindowEx_ dwStyle parameter to achieve that (or was it WS_EX_TOOLWINDOW in dwExStyle?). Otherwise, system menu size depends on user settings.

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 Franco.

Hi Skypa,
take a look at:
All Forums -> Beginners -> Need a codesnipped with CreateWindowEx_

There you will find code that I did...
look at the code for:

Code: Select all

hWnd=CreateWindowEx_(0,"ownwindow",@"DEMO",#PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible,200,200,#WindowWidth,#WindowHeight,0,0,GetModuleHandle_(0),0)
 
and make a comment out of it with ';' at the beginning.

Then uncomment this line (delete ';' at the beginning):

Code: Select all

;hWnd=CreateWindowEx_(#WS_EX_TOOLWINDOW,"ownwindow",@"DEMO",#WS_POPUPWINDOW|#WS_DLGFRAME|#WS_CLIPSIBLINGS|#WS_VISIBLE|#DS_MODALFRAME|#DS_3DLOOK,200,200,320,240,0,0,GetModuleHandle_(0),0)
 
That's it.
Now you have a ToolWindow style. But you don't have a button in the taskbar anymore. That's the way it is under windows.

Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 05 April 2002 19:14:32
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 skypa.

Thx for the tipps.

@ Franco

Your Codesnippet doesn't compile here (Fullversion, PureBasic 3.0). And I also think thats its a little too uncomfortable to use, so I hope fred or someone else can modify the librarys so we can use #PB_TOOLBAR or something like this in the code.

thx though & greets

skypa
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 Franco.
Thx for the tipps.

@ Franco

Your Codesnippet doesn't compile here (Fullversion, PureBasic 3.0). And I also think thats its a little too uncomfortable to use, so I hope fred or someone else can modify the librarys so we can use #PB_TOOLBAR or something like this in the code.

thx though & greets

skypa

Yes you have right, this code doesn't work anymore the way it was.

With PureBasic v3 you need to change the parameters of 'Procedure ownwindowproc' to:

Procedure.l ownwindowproc(hWnd,Msg,wParam,lParam)

to make it work.



@Skypa, du you need a main window or a child window?


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - Franco on 05 April 2002 22:32:41
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 skypa.
@skypa, du you need a main window or a child window?
I need this for the main window. I code a lots of little different tools and I like the Tool-look. :)
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 Franco.
And I also think thats its a little too uncomfortable to use...
Well I put a stripped version of my code under Tips&Tricks and IMHO its now not more uncomfortable to use because OpenToolWindowEx acts like the normal OpenWindow command (with less parameters...)

Put your GadgetEvents in the right place and it will work
You also see a toolbar and a menu (tested on W98SE for now...)

Feel free to use it until...
I hope fred or someone else can modify the librarys so we can use #PB_TOOLBAR or something like this in the code.
Hope this helps...


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 06 April 2002 01:09:44
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 skypa.

What a Service Thanks for your work, I'll try it soon
Post Reply