Page 1 of 2
Office style
Posted: Tue Apr 03, 2007 6:38 am
by D0t
It would be very very nice If PureBasic supported Office and Office 2003 style.
A function like:
CreateOfficeTollbar
CreateOfficeMenu
..
Posted: Tue Apr 03, 2007 7:37 am
by Flype
this can't be done as purebasic goal is to be multi platform.
Posted: Thu Apr 05, 2007 12:38 pm
by GG
It can be multi platform and also can propose those 2 functions, no ?
Posted: Thu Apr 05, 2007 12:59 pm
by Kaeru Gaman
what is the difference between normal and OfficeStyle?
and how are they created generally?
is it a WinAPI-function, or a function of a DLL that comes with Office?
Posted: Thu Apr 05, 2007 2:28 pm
by Kale
There is a snippet of code somewhere that demonstrates officeXp style menus in a PB program.
Posted: Sun Apr 08, 2007 8:45 pm
by Trond
Those are owner-drawn. I don't want this. But native icon support would be nice.
Posted: Sun Apr 08, 2007 8:55 pm
by Fluid Byte
Flype wrote:this can't be done as purebasic goal is to be multi platform.
Well, this is a very weak argument. Take a look at various of PB's native commands like SetWindowCallback() for example. It's strictly Window$, so the concept of 100% cross-platfrom compatibility just doesn't apply at all.
I personally would think this would be a nice addition just like something Linux or MacOS specific but I can live without for the rest of my life.
Posted: Sun Apr 08, 2007 11:06 pm
by Kale
Trond wrote:Those are owner-drawn. I don't want this.
Well all controls (under the hood) are
owner drawn, you simply can't create custom controls or menus without drawing them yourself. AFAIK there isn't an easy way to do this cross platform, IIRC Freak had hell of a job doing it for the PB IDE.
Maybe we ought to write a .NET wrapper to do such things, LOL!

Posted: Mon Apr 09, 2007 8:12 am
by Trond
Kale wrote:Trond wrote:Those are owner-drawn. I don't want this.
Well all controls (under the hood) are
owner drawn, you simply can't create custom controls or menus without drawing them yourself.
No, all custom controls (of which PB has none) are owner-drawn. All other controls draw themselves. PB's menus are not owner-drawn either. But they would have to be if they had icons.
Posted: Sat Apr 14, 2007 12:05 pm
by Kale
Trond wrote:Kale wrote:Trond wrote:Those are owner-drawn. I don't want this.
Well all controls (under the hood) are
owner drawn, you simply can't create custom controls or menus without drawing them yourself.
No, all custom controls (of which PB has none) are owner-drawn. All other controls draw themselves. PB's menus are not owner-drawn either. But they would have to be if they had icons.
All controls are drawn by programmers, they don't draw themselves.

Posted: Sat Apr 14, 2007 2:06 pm
by Trond
Kale wrote:Trond wrote:Kale wrote:Trond wrote:Those are owner-drawn. I don't want this.
Well all controls (under the hood) are
owner drawn, you simply can't create custom controls or menus without drawing them yourself.
No, all custom controls (of which PB has none) are owner-drawn. All other controls draw themselves. PB's menus are not owner-drawn either. But they would have to be if they had icons.
All controls are drawn by programmers, they don't draw themselves.

An owner-drawn control is one with the #SS_OWNERDRAW/#BS_OWNERDRAW/#CBS_OWNERDRAWFIXED/#CBS_OWNERDRAWVARIABLE/#HDF_OWNERDRAW/other owner-drawn flag style set. That means the parent window ("owner") of the control is responsible for painting the control.
A normal button is painted from it's own paint procedure, not from its parent window's paint procedure. Thus it is NOT owner-drawn.
Posted: Sat Apr 14, 2007 5:53 pm
by Kale
Trond wrote:Kale wrote:Trond wrote:Kale wrote:Trond wrote:Those are owner-drawn. I don't want this.
Well all controls (under the hood) are
owner drawn, you simply can't create custom controls or menus without drawing them yourself.
No, all custom controls (of which PB has none) are owner-drawn. All other controls draw themselves. PB's menus are not owner-drawn either. But they would have to be if they had icons.
All controls are drawn by programmers, they don't draw themselves.

An owner-drawn control is one with the #SS_OWNERDRAW/#BS_OWNERDRAW/#CBS_OWNERDRAWFIXED/#CBS_OWNERDRAWVARIABLE/#HDF_OWNERDRAW/other owner-drawn flag style set. That means the parent window ("owner") of the control is responsible for painting the control.
A normal button is painted from it's own paint procedure, not from its parent window's paint procedure. Thus it is NOT owner-drawn.
You probably missed the italics. I know what an owner-drawn control is, the point i was making is that ALL controls are drawn via drawing commands of the WinAPI (or whatever API is used). period! The
native commands are probably drawn automatically by the OS but they are still drawn in exactly the same manner as any owner-drawn control. You were distinguishing between native and owner-drawn, i was saying they are both the same under the hood.
Posted: Sat Apr 14, 2007 8:35 pm
by Trond
And I'm trying to say that ownerdrawn controls doesn't have a hood.
Posted: Sat Apr 14, 2007 8:42 pm
by Kale
Trond wrote:And I'm trying to say that ownerdrawn controls doesn't have a hood.
Then your code must be sloppy.

Posted: Sat Apr 14, 2007 9:10 pm
by Trond
Kale wrote:I know what an owner-drawn control is
Well, you just said that "all controls (under the hood) are owner drawn", which is plain and simply wrong, which means that even if you knew what they were you weren't able to write it down.
All controls are not owner-drawn, as I explained above.
the point i was making is that ALL controls are drawn via drawing commands of the WinAPI (or whatever API is used). period!
Sure. That doesn't make them owner-drawn. Whether a control is owner-drawn does not depend on how it's drawn, it depends on where the code to draw it is placed.
You probably missed the italics. I know what an owner-drawn control is, the point i was making is that ALL controls are drawn via drawing commands of the WinAPI (or whatever API is used). period! The native commands are probably drawn automatically by the OS but they are still drawn in exactly the same manner as any owner-drawn control. You were distinguishing between native and owner-drawn, i was saying they are both the same under the hood.
Just because it's drawn in the samme manner as something doesn't make it that something. I can draw my breath in the same manner as a cat, but I'm still not a cat.
And, I still say: You are wrong. They aren't the same under the hood.
An owner-drawn control has a different flag set. This already is proof that they are different.
I know what an owner-drawn control is, the point i was making is that ALL controls are drawn via drawing commands of the WinAPI (or whatever API is used). period!
I don't want to spoil the fun, but the native controls are drawn using the theme API. This API can't be used to draw anything else than controls that looks exactly like native ones, so if you want your owner-drawn toolbar to look different from a normal one you must use the GDI API instead of the theme API. Which means that in practice, owner-drawn controls are drawn using a different API than native ones. Semi-colon!