Article View: borland.public.cppbuilder.nativeapi
Article #12229ShowWindow Function Problem
From: Martin C
Date: Wed, 17 Dec 2003 00:32
Date: Wed, 17 Dec 2003 00:32
56 lines
2443 bytes
2443 bytes
Hi,
I am trying to use ShowWindow function to Show/Hide IE windows, as shown
below. So far on resolution (800 * 600) everything is working more than
fine, but when I change my screen resolution to 1024 * 768 or 1280 * 1024,
I face a strange problem when I press on Hide and the windows are
maximized...I find the maximized windows first restore to a smaller size but
they don't hide, then when I press hide again windows are hidden...can
someone tell me please why I am facing such a problem ??
bool CALLBACK MyWindowsProc2(HWND hwnd, LPARAM lParam)
{ //Show Windows.
char buffer[16] = {0};
HWND MyWindowHandle;
GetClassName(hwnd, buffer, 16);
if((StrComp(buffer, "IEFrame")==0))
{ ShowWindow(hwnd, SW_SHOWNORMAL);
}
else { }
return true;
}
//--------------------------------------------------------------------------
-
bool CALLBACK MyWindowsProc1(HWND hwnd, LPARAM lParam)
{ //Hide Windows.
char buffer[16] = {0};
HWND MyWindowHandle;
GetClassName(hwnd, buffer, 16);
if((StrComp(buffer, "IEFrame")==0))
{ ShowWindow(hwnd, SW_HIDE);
}
else { }
return true;
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::GetWindowsInfo2()
{ //Show Windows
EnumWindows((WNDENUMPROC)MyWindowsProc2,0);
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::GetWindowsInfo1()
{ //Hide Windows
EnumWindows((WNDENUMPROC)MyWindowsProc1,0);
}
//--------------------------------------------------------------------------
-
Thanks
BR
Technical Details
Message-ID:
<3fdfa444@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,42bb88625a99e14,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-16 16:39:51 PST From: "Martin C" <martinc@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: ShowWindow Function Problem Date: Tue, 16 Dec 2003 16:32:54 -0800 Lines: 58 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.10.4.238 Message-ID: <3fdfa444@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071621188 81.10.4.238 (16 Dec 2003 16:33:08 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail