Office style
Office style
It would be very very nice If PureBasic supported Office and Office 2003 style.
A function like:
CreateOfficeTollbar
CreateOfficeMenu
..
A function like:
CreateOfficeTollbar
CreateOfficeMenu
..
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- Fluid Byte
- Addict
- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
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.Flype wrote:this can't be done as purebasic goal is to be multi platform.
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.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
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.Trond wrote:Those are owner-drawn. I don't want this.
Maybe we ought to write a .NET wrapper to do such things, LOL!

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.Kale wrote:Well all controls (under the hood) are owner drawn, you simply can't create custom controls or menus without drawing them yourself.Trond wrote:Those are owner-drawn. I don't want this.
All controls are drawn by programmers, they don't draw themselves.Trond wrote: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.Kale wrote:Well all controls (under the hood) are owner drawn, you simply can't create custom controls or menus without drawing them yourself.Trond wrote:Those are owner-drawn. I don't want this.

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.Kale wrote:All controls are drawn by programmers, they don't draw themselves.Trond wrote: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.Kale wrote:Well all controls (under the hood) are owner drawn, you simply can't create custom controls or menus without drawing them yourself.Trond wrote:Those are owner-drawn. I don't want this.
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.Trond wrote: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.Kale wrote:All controls are drawn by programmers, they don't draw themselves.Trond wrote: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.Kale wrote:Well all controls (under the hood) are owner drawn, you simply can't create custom controls or menus without drawing them yourself.Trond wrote:Those are owner-drawn. I don't want this.
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.
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.Kale wrote:I know what an owner-drawn control is
All controls are not owner-drawn, as I explained above.
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.the point i was making is that ALL controls are drawn via drawing commands of the WinAPI (or whatever API is used). period!
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.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.
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 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!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!