Solved

Set EXE Data...

Posted on 2003-11-21
7
238 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now