Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Set EXE Data...

Posted on 2003-11-21
7
Medium Priority
?
246 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 5

Accepted Solution

by:
Gwena earned 500 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

773 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