Форум: "WinAPI";
Текущий архив: 2003.07.21;
Скачать: [xml.tar.bz2];
ВнизKak otlovit iconku ot application Найти похожие ветки
← →
jonni (2003-05-21 00:03) [0]voobschem problema vot kakaya ...perebirayu vse okna po
CurrentWnd:=GetWindow(Handle, GW_HWNDFIRST);
while CurrentWnd<>0 do
begin
<otbirayu mne nuznie okna>
CurrentWnd := GetWindow(CurrentWnd, GW_HWNDNEXT);
end;
zadacha stoit vot v chem: mne nuzno poluchit" ikonku dlya application... v C++ eto zvuchit vot kak....
----------
SendMessageTimeout(hwnd, WM_GETICON, 0, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD) &hIcon);
if (!hIcon) hIcon = (HICON) GetClassLong(hwnd, GCL_HICONSM);
if (!hIcon) SendMessageTimeout(hwnd, WM_GETICON, 1, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD) &hIcon);
if (!hIcon) hIcon = (HICON) GetClassLong(hwnd, GCL_HICON);
if (!hIcon) SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD) &hIcon);
if (!hIcon) hIcon = (HICON) LoadIcon(NULL, IDI_WINLOGO);
-----------------
ya perevel eto v delphi vot kak:
-----------------
var MyRes:DWORD;
SendMessageTimeout(TempTask[i].MainWindow, WM_GETICON, ICON_SMALL, 0,SMTO_ABORTIFHUNG or SMTO_BLOCK, 1000,MyRes);
if MyRes = 0 then MyRes:= GetClassLong(TempTask[i].MainWindow, GCL_HICONSM);
if MyRes = 0 then SendMessageTimeout(TempTask[i].MainWindow, WM_QUERYDRAGICON, 0, 0, SMTO_ABORTIFHUNG, 1000,MyRes);
if MyRes = 0 then MyRes:=LoadIcon(0, IDI_WINLOGO);
-------------------
eto rabotaet no ne vsegda.......cherez raz..........
chto ya zdelal ne tak??? mozet gde oshibka...... prichem cod na C++ 100% rabotaet
S uvazeniem...
← →
jonni (2003-05-21 00:06) [1]i esche vot problema......
ya kak videte hochu male"nkuyu ikonku
no LoadIcon(0, IDI_WINLOGO); vsegda vidaet bol"shuyu
chto delat"?? kak mne po LoadIcon vzyat" malen"kuyu iconcu
zaranee spasibo
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2003.07.21;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.007 c