Office style

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
D0t
New User
New User
Posts: 1
Joined: Tue Apr 03, 2007 6:29 am

Office style

Post by D0t »

It would be very very nice If PureBasic supported Office and Office 2003 style.
A function like:
CreateOfficeTollbar
CreateOfficeMenu
..
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

this can't be done as purebasic goal is to be multi platform.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
GG
Enthusiast
Enthusiast
Posts: 266
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

It can be multi platform and also can propose those 2 functions, no ?
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post 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?
oh... and have a nice day.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

There is a snippet of code somewhere that demonstrates officeXp style menus in a PB program.
--Kale

Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Those are owner-drawn. I don't want this. But native icon support would be nice.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post 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.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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! :lol:
--Kale

Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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. :wink:
--Kale

Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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. :wink:
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.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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. :wink:
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.
--Kale

Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

And I'm trying to say that ownerdrawn controls doesn't have a hood.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Trond wrote:And I'm trying to say that ownerdrawn controls doesn't have a hood.
Then your code must be sloppy. :P
--Kale

Image
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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