Custom PureBasic Window Class names instead of WindowClass_1

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Custom PureBasic Window Class names instead of WindowClass_1

Post by Rescator »

This may or may not be a silly idea, I'm no expert (sadly) and it is somewhat windows spesific so...

Fred any chance of letting us define a custom name for the window class
rather than WindowClass_1 ?

Several programs use the windowclass to find a program.
Like for example a shoutcast player I made, and trying to get the thing to work with Foxytunes (plugin for Firefox that fetches title etc and uses windowclass name to fetch it)

Unfortunately all PureBasic programs has WindowClass_1
so a reminder/notes program I got is mistaken for the player, etc etc.

The really cool thing with window classes is they are supposedly unique within the system.

And one could for example (from a external program) use FindWindow_("MyProgramClassName",#Null)
to fetch the handle to the programs main window.

Maybe a function like this could be added?
SetDefaultWindowClassName("MyProgramClassName")
Which PB would use when it does it's RegisterClass stuff later.

At the very least use something else than WindowClass_1
use PureBasic_1 or similar for some stealth promoting :P
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
BarryG
Addict
Addict
Posts: 3324
Joined: Thu Apr 18, 2019 8:17 am

Re: Custom PureBasic Window Class names instead of WindowCla

Post by BarryG »

Rescator wrote:Maybe a function like this could be added?
SetDefaultWindowClassName("MyProgramClassName")
Which PB would use when it does it's RegisterClass stuff later.
+1
Post Reply