How to add an extra button to the WindowTitle?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

W000t!? :!:

The Peek / Poke commands have format flags? Didn't know that! :roll:

Thanks for pointing this out ts-soft!

PS: I should read the version changes from time to time damn it...
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Just a side note: the Space(12) is not enough for an unicode string of 6 length; because of the double null char at the end (here you have 12 + 1, instead of 12 + 2). Use Space(13) instead.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

indeed!

Code: Select all

( Len(string) + 1 ) * SizeOf(Character)
...the "+1" for the terminating zero should be within the multiplication...

(sorry for stating redundant information)
oh... and have a nice day.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Any new progress netmaestro?

I tried very hard the last days to acomplish this but it seems to be impossible. :evil:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Yes, I have a version that is working for XP. It looks at the current theme and creates a button that fits in, then applies a programmer-specified graphic to it. From there the button is handled with code very similar to what I've already posted. But it won't work for Vista and when I have that solved I'll post the lib with the source, either in Tips & Tricks or Announcements.
BERESHEIT
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

netmaestro wrote:Yes, I have a version that is working for XP. It looks at the current theme and creates a button that fits in, then applies a programmer-specified graphic to it. From there the button is handled with code very similar to what I've already posted. But it won't work for Vista and when I have that solved I'll post the lib with the source, either in Tips & Tricks or Announcements.
Sounds very promising!

I'm very interested in how you have done it since I don't seem to be capable of doing it...
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

You can open the .msttyles file as a dll and use findresource_() or something on it.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

You can open the .msttyles file as a dll and use findresource_() or something on it.
Been there, done that. I extract the raw image from a resource named "*_CAPTIONBUTTON_BMP" and then try to draw it but I have clipping problems.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Well, it's been some time again...

Has anyone found a solution yet?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

netmaestro wrote:Yes, I have a version that is working for XP. It looks at the current theme and creates a button that fits in, then applies a programmer-specified graphic to it.
Any chance we can take a look it? At least it would be nice if you could explain how you done it.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Sorry, that particular code and the project it lives in aren't for release here.
BERESHEIT
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Sorry to hear that but I can understand it. One last question though. Have you done it all alone or is there some kind of reference you could point me to?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Post Reply