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
Solved

String to WM_Message

Posted on 2006-07-22
4
483 Views
Last Modified: 2010-04-05
Function Translate(Wm_Call: Longint): Boolean;
Begin
 Form1.Edit2.text:=IntToStr(Wm_Call);
 Form1.Edit3.Text:=IntTOHex(Wm_Call,2);
End;


Results

Translate(WM_PAINT);
[15     ]
[0F     ]


Translate(WM_CLOSE);
[16     ]
[10     ]


Easy, now let's suppose i wanted to do the same thing from external user input..

Translate(EditBox1.Text);  //wm_close


Errrrrrooooorrrrrrrrrrrrrrr.....


IS there anyway of doing a reverse lookup on an API call? without building a complete library of their values yourself?

0
Comment
Question by:tobjectpascal
4 Comments
 
LVL 14

Expert Comment

by:Hamidreza Vakilian
ID: 17159775
Hi!

I think it's not available under delphi, because wm_messages are constant values and for example whenever the compiler see wm_close, puts hexadecimal 10 in place of that... It doesn't know wm_close !!!

HRV
0
 
LVL 4

Author Comment

by:tobjectpascal
ID: 17163992
any mods reading this thread...

http://wiki.winehq.org/List_Of_Windows_Messages


I ended up writing a program to extract them for a look up system...

problem solved thanks anyway guys, i thought it was not possible to do this, but it would be great if it could....
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 17983758
PAQed with points refunded (125)

Computer101
EE Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

860 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