Click here to Skip to main content
15,888,301 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
NewsRe: Pointer Pin
dehseth2-Mar-09 7:29
dehseth2-Mar-09 7:29 
AnswerRe: Pointer Pin
Stephen Hewitt2-Mar-09 5:10
Stephen Hewitt2-Mar-09 5:10 
GeneralRe: Pointer Pin
dehseth2-Mar-09 7:30
dehseth2-Mar-09 7:30 
AnswerRe: Pointer Pin
Stuart Dootson2-Mar-09 7:13
professionalStuart Dootson2-Mar-09 7:13 
GeneralRe: Pointer Pin
dehseth2-Mar-09 7:31
dehseth2-Mar-09 7:31 
GeneralRe: Pointer Pin
Stuart Dootson2-Mar-09 8:07
professionalStuart Dootson2-Mar-09 8:07 
Questionhow to fill out fields in a third party program's GUI window Pin
Tanveer Ansari 12-Mar-09 3:17
Tanveer Ansari 12-Mar-09 3:17 
AnswerRe: how to fill out fields in a third party program's GUI window Pin
Perisic, Aleksandar2-Mar-09 6:02
Perisic, Aleksandar2-Mar-09 6:02 
What is the program you are dealing with? Does it have a window with text fields you want to fill in?

If so you do this:
Open the program and reach the top window you want to deal with. The top window is a window with text fields.
Using Spy++ from Visual Studio tools you read the ID for each text field (or other control) that you want to fill in and check what its relation to the top window is
Once you have relation and ID you are very close.

Now in order to get the top window you need its name and/or its relation with the main application window. And then using FindWindow EnumWindows EnumChildWindows... you can reach the top window of each control.

Now you need GetDlgItem to get actual control that you want to fill in. Once you have HWND for each control SetWindowText() is sufficient for most text control, however for radio button etc. you need to use other functions to set the value or state. If you are sure that HWND you've got is from the control you need you can always use CWnd::FromHandle and even better upgrade such CWnd* to CEdit* or whatever control you have.

However once the program is changed and any control ID, or their position is changed, you have to fix your code as well.

The above procedure is used for automated testing a dialog and filling it from another application, so I know Smile | :) it must work.

Without Spy++ or a similar application all this would be almost impossible to complete.
Questionquestion about structured storages Pin
rkata2-Mar-09 2:38
rkata2-Mar-09 2:38 
AnswerRe: question about structured storages Pin
led mike2-Mar-09 4:10
led mike2-Mar-09 4:10 
QuestionError message Pin
vanishaa2-Mar-09 2:26
vanishaa2-Mar-09 2:26 
AnswerRe: Error message Pin
CPallini2-Mar-09 2:54
mveCPallini2-Mar-09 2:54 
AnswerRe: Error message Pin
David Crow2-Mar-09 3:06
David Crow2-Mar-09 3:06 
GeneralRe: Error message Pin
vanishaa2-Mar-09 3:13
vanishaa2-Mar-09 3:13 
GeneralRe: Error message Pin
David Crow2-Mar-09 3:16
David Crow2-Mar-09 3:16 
GeneralRe: Error message Pin
vanishaa2-Mar-09 3:28
vanishaa2-Mar-09 3:28 
GeneralRe: Error message Pin
David Crow2-Mar-09 3:31
David Crow2-Mar-09 3:31 
Questionparellel mutithread problem Pin
JackPuppy2-Mar-09 1:53
JackPuppy2-Mar-09 1:53 
AnswerRe: parellel mutithread problem Pin
Code-o-mat2-Mar-09 2:15
Code-o-mat2-Mar-09 2:15 
GeneralRe: parellel mutithread problem Pin
JackPuppy2-Mar-09 2:31
JackPuppy2-Mar-09 2:31 
GeneralRe: parellel mutithread problem Pin
Code-o-mat2-Mar-09 2:36
Code-o-mat2-Mar-09 2:36 
Questionhow to include a paneld inside the client area in SDI architect? Pin
Joseph Marzbani2-Mar-09 1:25
Joseph Marzbani2-Mar-09 1:25 
AnswerRe: how to include a paneld inside the client area in SDI architect? Pin
Stuart Dootson2-Mar-09 3:32
professionalStuart Dootson2-Mar-09 3:32 
GeneralRe: how to include a paneld inside the client area in SDI architect? Pin
Joseph Marzbani2-Mar-09 6:59
Joseph Marzbani2-Mar-09 6:59 
QuestionHow C++ read one digit each time from a sequence of digits? Pin
followait2-Mar-09 0:28
followait2-Mar-09 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.