Solved

String to WM_Message

Posted on 2006-07-22
4
478 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

27 Experts available now in Live!

Get 1:1 Help Now