Solved

Set EXE Data...

Posted on 2003-11-21
7
241 Views
Last Modified: 2010-04-05
Hello,

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 =)
0
Comment
Question by:-Karamja-
  • 3
  • 2
  • 2
7 Comments
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9798255
WM_SETTEXT
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.

SendMessage(
  (HWND) hWnd,              // handle to destination window
  WM_SETTEXT,               // message to send
  (WPARAM) wParam,          // not used; must be zero
  (LPARAM) lParam           // window-text string (LPCTSTR)
);
Parameters
wParam
This parameter is not used.
lParam
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.

Remarks
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.

0
 
LVL 2

Author Comment

by:-Karamja-
ID: 9798453
What?
0
 
LVL 5

Expert Comment

by:Gwena
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.


0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Author Comment

by:-Karamja-
ID: 9799140
Yea,

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

Expert Comment

by:GloomyFriar
ID: 9799401
0
 
LVL 5

Accepted Solution

by:
Gwena earned 125 total points
ID: 9801221
Ok...


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

http://www.geocities.com/gacarpenter386/change-label.zip

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.
0
 
LVL 2

Author Comment

by:-Karamja-
ID: 9802521
Thanks, works fine! =)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

837 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