Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here I'm trying to simulate the operations on a program written by delphi/pascal.After looking the spy++ message and windows styles and window class , I find out the target program was written by delphi ,using a lot VCL. the control class and the wm_ messages are not standard win32 WM_ messages.
Some one told me to use delphi IDE to write the simulate code,which I have no idea.
Is there any other method to operate the target program using windows standard WM_ messsages? better using C/C++

What I have tried:

The VCL controls like TBitBtns / TEdit / TComboBox and other data access controls working together with database,these controls can only accept the simple WM_CHAR WM_CLICK , I can only get the windows/controls capture / style / window class etc.
Standard win32 controls like Edit/listbox/treeview could be easily accessed,the text/column item info/note items. But the VCL use the sef-define WM_ msessages. Any method to access this info in vcl ?
Posted
Updated 19-Jun-18 22:05pm

Quote:
Is there any other method to operate the target program using windows standard WM_ messsages? better using C/C++

Of course there is. However you should possibly use SendInput function for that. See:
 
Share this answer
 
Comments
Yount_0701 20-Jun-18 3:59am    
In fact what I'm really concern is the access of the control info,standard win32 controls like listbox can easily get the column items info , also the row items. But not VCL.
I have used AutoHotkey to control Delphi applications. Autohotkey allows you to script most user interactions with a Delphi application. The input can be referenced using position or class names. The important point to remember is that Delphi creates an invisible Main Window to interact with the windows messaging system. This invisible main window is not the main application window. So if you want to interact with the Delphi app user interface it is best to study this application design so you can accomplish your objective.
Take a look at https://autohotkey.com/board/topic/49125-autohotkey-and-delphi/
"The displayed window of usual Delphi app is not the main window. Typically, the main window is 0x0 sized window with the class name TApplication. And the displayed window is just an owned window of it. So, if you want normal minimize, you should minimize the main window TApplication, not the displayed window. If you think it's cumbersome to do, you may try instead WM_SYSCOMMAND with SC_MINIMIZE to the displayed window, which is supposed to mimic the click on minimize button. "
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900