Ввод в DialogBox->EditBox через другое приложение
От: Плотников Дмитрий Станиславович haven't
Дата: 12.06.01 14:23
Оценка:
Тут такой трабл случился.Мне нужно ввести в DialogBox->EditBox(какая-то запущенная прога-не моя) значения из моей проги и из неё же нажать кнопку.Я нахожу хендл окна(FindWindow(...)) и через прогу Ресурс Сепаратор нахожу ID кноки и EditBox'а ну и если кнопку мне "нажать" удаёться ,то через SetDlgItemInt(...) у меня меняется только Caption EditBox'а.
Что мне делать чтобы ввести значение в EditBox?
Или как по-другому найти ID EditBox'а?
Re: Ввод в DialogBox->EditBox через другое приложение
От: Корнилов Григорий Петрович http://kornilow.newmail.ru
Дата: 13.06.01 06:21
Оценка:
Здравствуйте Плотников Дмитрий Станиславович, вы писали:

ПДС>Тут такой трабл случился.Мне нужно ввести в DialogBox->EditBox(какая-то запущенная прога-не моя) значения из моей проги и из неё же нажать кнопку.Я нахожу хендл окна(FindWindow(...)) и через прогу Ресурс Сепаратор нахожу ID кноки и EditBox'а ну и если кнопку мне "нажать" удаёться ,то через SetDlgItemInt(...) у меня меняется только Caption EditBox'а.

ПДС> Что мне делать чтобы ввести значение в EditBox?
ПДС> Или как по-другому найти ID EditBox'а?
ПДС>

WM_SETTEXT
An application sends a WM_SETTEXT message to set the text of a window.

To send this message, call the SendMessage function with the following parameters.

SendMessage(
(HWND) hWnd, // handle to destination window
WM_SETTEXT, // message to send
(WPARAM) wParam, // not used; must be zero
(LPARAM) lParam // window-text string (LPCTSTR)
);
Parameters
wParam
This parameter is not used.
lParam
Pointer to a null-terminated string that is the window text.
Return Values
The return value is TRUE if the text is set. It is FALSE (for an edit control), LB_ERRSPACE (for a list box), or CB_ERRSPACE (for a combo box) if insufficient space is available to set the text in the edit control. It is CB_ERR if this message is sent to a combo box without an edit control.

Remarks
The DefWindowProc function sets and displays the window text. For an edit control, the text is the contents of the edit control. For a combo box, the text is the contents of the edit-control portion of the combo box. For a button, the text is the button name. For other windows, the text is the window title.

This message does not change the current selection in the list box of a combo box. An application should use the CB_SELECTSTRING message to select the item in a list box that matches the text in the edit control.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.