Edit "Close" Button?

Blitz3D Forums/Blitz3D Programming/Edit "Close" Button?

Guy Fawkes(Posted 2013) [#1]
Hi all. I am still working with my program and need to know if it's possible to change the original "X" close button's icon to a graphic image like in most MMORPGs' like World of Warcraft and some other games on the PC. If I have to remove the close button in order to do this, so be it but I really would like not to unless I absolutely have to.

You'll need the user32 constants to compile this code.

W32Consts.bb:



And without further delay, here is the code:

CloseButton.bb:



As you can see in the above, I tried to remove the "X" button first, but that didn't work. So I don't know what else to do.

Thank You!


_PJ_(Posted 2013) [#2]
Aren't these images etc. packed into the themeUX files by Windows versions 5.0+?

If so, you will likely need to make your own theme and install that along with the game.


Guy Fawkes(Posted 2013) [#3]
How would I do such a thing easily?

What would be the functions I need from the Windows API?

Thanks!


_PJ_(Posted 2013) [#4]
How would I do such a thing easily?


I don't think one can. Certainly not I.

What would be the functions I need from the Windows API?

I'm only speculating, but I don't believe it's possible with just API commands. You'd need to actually create/copy the theme file and replace the icon within it.


___

I don't know the details for earlier (i.e. XP) but this may be helpful:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb773190%28v=vs.85%29.aspx


Addi(Posted 2013) [#5]
Why do you want to change the close button
when it is also possible to hide the window frame?

Doing this will give you the possibility to use win api and also to use your own frame, close-, maximize- and minimize-buttons.


Guy Fawkes(Posted 2013) [#6]
Because I don't like that ugly windows style, I want my own graphic there.


Addi(Posted 2013) [#7]
No you missunderstood me :D.

This was meaned as a solution:

You can hide the frame of the window by using the win api.

Doing this will give you the possibility to use your own frame, close-, maximize- and minimize-buttons by only drawing the pics in you program using DrawImage


Guy Fawkes(Posted 2013) [#8]
O, ok! Nice idea, thanks Addi! =D


_PJ_(Posted 2013) [#9]
Good thinking, Addi!