Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Поиск окна
|
|||
|---|---|---|---|
|
#18+
Нужно найти DOS-овское окно. Использую FindWindow(Classname, WindowTitle); WindowTitle - не известно. Вопрос какой Classname у DOS-овского окна? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.03.2003, 16:22 |
|
||
|
Поиск окна
|
|||
|---|---|---|---|
|
#18+
Using FindWindow won't necessarily get you a window that belongs to the process you created. A more reliable method would be to use EnumWindows, using the return value from GetWindowThreadProcessId to check for a match with the values set in your TProcessInfo record above. Try this: type PFindProcessWindowStruct = ^TFindProcessWindowStruct; TFindProcessWindowStruct = record Process: DWord; Title: PChar; Window: hWnd; end; function fpwCallback(wnd: hWnd; Param: lParam): Bool; stdcall; var fpws: PFindProcessWindowStruct; ProcID: DWord; len: Integer; ptitle: PChar; begin Result := True; fpws := PFindProcessWindowStruct(Param); GetWindowThreadProcessId(wnd, @ProcID); if ProcID = fpws.Process then begin if Assigned(fpws.Title) then begin len := GetWindowTextLength(wnd) + 1; ptitle := StrAlloc(len); try GetWindowText(wnd, ptitle, len); if StrComp(ptitle, fpws.Title) <> 0 then exit; finally StrDispose(ptitle); end; end; Result := False; fpws.Window := wnd; end; end; // AProcess: The process ID for the window you're looking for // ATitle: The title of the window you're looking for. Specify nil to search for any name // Result: Handle to the window or 0 if the window wasn't found. function FindProcessWindow(const AProcess: DWord; const ATitle: PChar): hWnd; var fpws: TFindProcessWindowStruct; begin fpws.Process := AProcess; fpws.Title := ATitle; fpws.Window := 0; EnumWindows(fpwCallback, lParam(@fpws)); Result := fpws.Window; end; code by Rob Kennedy (rkennedy@cs.wisc.edu) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.03.2003, 11:35 |
|
||
|
|

start [/forum/topic.php?fid=58&fpage=2061&tid=2118996]: |
0ms |
get settings: |
9ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
39ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
34ms |
get tp. blocked users: |
1ms |
| others: | 215ms |
| total: | 332ms |

| 0 / 0 |
