Set EXE Data...

Posted on 2003-11-21
Last Modified: 2010-04-05

I need 2 apps here, One with a label, other to set the label caption to the exe of first app

Hope you know what im talking about =)
Question by:-Karamja-
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2

Expert Comment

ID: 9798255
An application sends a WM_SETTEXT message to set the text of a window.

To send this message, call the SendMessage function with the following parameters.

  (HWND) hWnd,              // handle to destination window
  WM_SETTEXT,               // message to send
  (WPARAM) wParam,          // not used; must be zero
  (LPARAM) lParam           // window-text string (LPCTSTR)
This parameter is not used.
Pointer to a null-terminated string that is the window text.
Return Values
The return value is TRUE if the text is set. It is FALSE (for an edit control), LB_ERRSPACE (for a list box), or CB_ERRSPACE (for a combo box) if insufficient space is available to set the text in the edit control. It is CB_ERR if this message is sent to a combo box without an edit control.

The DefWindowProc function sets and displays the window text. For an edit control, the text is the contents of the edit control. For a combo box, the text is the contents of the edit-control portion of the combo box. For a button, the text is the button name. For other windows, the text is the window title.

This message does not change the current selection in the list box of a combo box. An application should use the CB_SELECTSTRING message to select the item in a list box that matches the text in the edit control.


Author Comment

ID: 9798453

Expert Comment

ID: 9799087
I think you mean you want to be able to alter a label caption of a delphi exe
without re-compiling it....and without using the registry or ini files... but by actually
altering the exe itself.

If that is what you want I have demos that show how to do this... just ask and
I will send the demos.

A delphi exe can change the caption itself or you can use a 2nd app to do it...
it's easy eaither way.

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!


Author Comment

ID: 9799140

If you could upload them or somethink if they work you got the points

Accepted Solution

Gwena earned 125 total points
ID: 9801221

Right-click this link and choose 'save target as' because geocities won't allow remote links to files.

This has full source code and 2 compiled demos...

LabelChanger.exe  changes the label of ChangeMyLabel.exe

DON'T point LabelChanger.exe at any file other than a delphi app that has been compiled
with the unit ExeMod.pas in its uses clause!  or you will corrupt the file.... it is easy to make it so
it cannot alter any file other than the one you want but this is a quick demo and I had no time
for that :-)

Please read the comments in ExeMod.pas in the initialization section... you will probably
want to disable its cd handling code for an app like this one :-)

p.s. It is just as easy to have an exe change its own label... no real need for a 2nd app.

Author Comment

ID: 9802521
Thanks, works fine! =)

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question