![]() |
| | #1 |
| Registered User Join Date: May 2005
Posts: 39
| Automatically enter text in a dialog box Is there any API that will enable me to enter a string in the text area of a dialog box? As shown in the attached figure, I would like to enter the text c:\temp.ps in the text area as and when the dialog appears. I heard it is possible using SetText() but it doesn't seem very clear in MSDN if it really is possible that way. Is anybody aware of any possible method? Also, after the text is entered, I would like to enter the OK button in a similar manner Thanks |
| leojose is offline | |
| | #2 |
| Registered User Join Date: Jan 2005
Posts: 847
| SetDlgItemText or get a handle to the edit control and send WM_SETTEXT. |
| Quantum1024 is offline | |
| | #3 | |
| Registered User Join Date: May 2005
Posts: 39
| Quote:
| |
| leojose is offline | |
| | #4 |
| Registered User Join Date: Jan 2005
Posts: 847
| If you have the control ID of the edit box then you should still be able to use SendDlgItemText. You could aslo use FindWindowEx to get the edit control handle. |
| Quantum1024 is offline | |
| | #5 | |
| Registered User Join Date: May 2005
Posts: 39
| Quote:
| |
| leojose is offline | |
| | #6 |
| Registered User Join Date: Jan 2005
Posts: 847
| If you have the handle of the edit control then you can use SendMessage to send the WM_SETTEXT message. I don't know which function returns an ID from a handle value. |
| Quantum1024 is offline | |
| | #7 | |
| erstwhile Join Date: Jan 2002
Posts: 2,226
| Quote:
__________________ CProgramming FAQ Caution: this person may be a carrier of the misinformation virus. | |
| Ken Fitlike is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help With a BlackJack Program in C | Jp2009 | C Programming | 15 | 03-30-2009 10:06 AM |
| Display text in a Dialog Box | Dark_Phoenix | Windows Programming | 9 | 01-02-2009 06:30 AM |
| Set Printer Prior To Loading Print Dialog Box | Beaner | Windows Programming | 3 | 10-10-2008 01:02 PM |
| struct question | caduardo21 | Windows Programming | 5 | 01-31-2005 04:49 PM |
| New Theme | XSquared | A Brief History of Cprogramming.com | 160 | 04-01-2004 08:00 PM |