Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

Change Taskbar Button Text

I'm a newb when it comes to C++ programming and Windows API functions. But I have a friend who wanted me to make a simple DLL for one of his programs (made with a program called GameMaker that can use DLLs). He just wanted something to change the text in the button for his program in the taskbar. I know exactly how to pass the window handle from GameMaker to my DLL, but I do not know the WinAPI function (if it exists) to change the text. Can anyone help, please?

-IMP2008
0
IceMetalPunk2008
Asked:
IceMetalPunk2008
  • 4
  • 4
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
you must obtain a windows handler of the application (HWND type), then use ::SetWindowText(theHandler, "some title");
0
 
IceMetalPunk2008Author Commented:
As I said, the window handle is no problem. However, I thought that changes the title in the titlebar of the window as well.... I need something that does not change the titlebar, but changes the taskbar button text....

-IMP ;) :)
0
 
Jaime OlivaresSoftware ArchitectCommented:
Ok, I can say this:
Windows and taskbar titles ARE ALWAYS the same, because Windows takes window caption to put into taskbar buttons. But some programs that show different captions are OWNER DRAWING the title bar of the window (with a new text) leaving taskbar button caption as regular.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
IceMetalPunk2008Author Commented:
Hmmm.... if that's always the case, then maybe GM does that as well, so your code would work.... I'll check it out and I'll post afterwards...

-IMP ;) :)
0
 
Jaime OlivaresSoftware ArchitectCommented:
Consider that the main program could have the ability to trap the SetWindowText message to avoid to be changed....
0
 
IceMetalPunk2008Author Commented:
OK, I don't know if that's the reason, but here's what happened when I tried to usethe code:

For a split second, the title bar changed, then changed back to what it was before the DLL function was called. The taskbar never changed at all.

So does this mean there is NO way to accomplish this?

-IMP ;) :)
0
 
Jaime OlivaresSoftware ArchitectCommented:
Well, appear to be that original developer is a smart guy. I think there is not a simple or intemediate way to do this, specially when you have not real control over main window....
0
 
IceMetalPunk2008Author Commented:
Nevermind, I got it. Apparently, GameMaker uses 2 windows, one of which remains invisible, so I was using the wrong handle.... thanks anyway.... I haven't been on ExpertsExchange for a while, so I forgot how to PAQ this.... anyone remind me?

-IMP ;) :)
0
 
DarthModCommented:
PAQed with points (245) refunded

DarthMod
Community Support Moderator
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now