Solved

String to WM_Message

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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…

747 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

9 Experts available now in Live!

Get 1:1 Help Now