set_application_title() not implimented [u524]

Reporter: time-killer-games  |  Status: open  |  Last Modified: September 11, 2016, 09:37:27 AM

Considering this should be quick and easy to add to the core engine,
I figured, "hey, why not?" So I posted this here tracker ticket.

GameMaker 8.0 introduced set_application_title(). Both GameMaker 8.0
and 8.1 releases included this function. GameMaker:Studio dropped it
as obsolete in favor of window_set_caption(). Prior to GMStudio, the
function window_set_caption() didn't set the taskbar caption, it only
set the titlebar caption. GMStudio made it so window_set_caption()
sets both the titlebar and taskbar captions.

Added a function set_application_title(title) to set the title of the application (which is shown in the taskbar).
http://gamemaker.info/en/manual/new
RobertBColton  
What's the Win32 function for this? I believe this one was not added simply because I couldn't find a Win32 function that changes only the taskbar. Also do not forget that GMS removed room_caption in favor of a Global Game Setting for it.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms633546(v=vs.85).aspx

Second, I don't see any need for two functions. I don't know why anybody would want the taskbar to say something different than the window title does. So I kind of see why they decided to just simplify it for GMS. However, in this particular case I think it will be ok to just add the function for setting the taskbar only. If somebody could just find the Win32 function that it should call we can add it immediately.

Edit: Scratch that, I see now why they did not do that.
http://stackoverflow.com/questions/6665535/changing-the-taskbar-text-without-using-setwindowtext
http://stackoverflow.com/questions/4627772/set-a-taskbar-text-different-from-the-window-title-in-wpf

You have to use ugly hacks to do it, mainly having a hidden window. This really isn't anything anyone should be doing. I don't even think it would be possible to get this to work on any Linux window manager.

fundies  

No need to support this function. None of my linux apps do this...

cher-nov  

@RobertBColton, set_application_title() was possible in GM because it is Delphi-based. And every Delphi program that uses VCL and Application class doesn't have main windows as it's understood by WinAPI. So it's began possible to set one taskbar title (it is the Application.Title property) and different captions for windows (Caption property that every form has).

RobertBColton  

@cher-nov Thank you that is really helpful to understand that side of it. So my question then is, how does Delphi's Application.Title work? I ask this assuming that somewhere it must be calling Win32 code to do it. Would its solution be similar to the SO posts I linked above? I wonder if it is possible to do it in Delphi for a console/terminal program.

cher-nov  

@RobertBColton

Application.Title uses WinAPI SetWindowText() function. Application class has an invisible window (CreateWindow() with WS_POPUP style and width/height set to 0), on which this function is used.

Setting Caption property of a form directly sends WM_SETTEXT, and afterwards CM_TEXTCHANGED, messages. This is quite similar to SetWindowText().

Please sign in to post comments, or you can view this issue on GitHub.