Re: Find DesktopRegion in MFC VC++
- From: "andré m.a" <a.m.a@xxxxxxxxxxxx>
- Date: Sun, 1 May 2005 16:00:14 -0400
i dunno if this can help you or not.
its a routine i've used and always worked for me.
returns false if the APPBARDATA::uEdge is not set.
but even so you still get the desktop rectangle.
BOOL GetDeskTopRect(RECT &rect)
{
INT sw = GetDeviceCaps(::GetDC(0), HORZRES);
INT sh = GetDeviceCaps(::GetDC(0), VERTRES);
rect.left = 0;
rect.top = 0;
rect.right = sw;
rect.bottom = sh;
APPBARDATA barData = {0};
barData.cbSize = sizeof(APPBARDATA);
if( (BOOL)SHAppBarMessage(ABM_GETTASKBARPOS, &barData) == TRUE )
{
switch(barData.uEdge)
{
case ABE_LEFT:
rect.left = barData.rc.right;
break;
case ABE_RIGHT:
rect.right = barData.rc.left;
break;
case ABE_BOTTOM:
rect.bottom = barData.rc.top;
break;
case ABE_TOP:
rect.top = barData.rc.bottom;
break;
default :
return FALSE;
}
}
return TRUE;
}
.
- References:
- Re: Find DesktopRegion in MFC VC++
- From: Severian [MVP]
- Re: Find DesktopRegion in MFC VC++
- From: Burt Johnson
- Re: Find DesktopRegion in MFC VC++
- From: Severian [MVP]
- Re: Find DesktopRegion in MFC VC++
- From: Burt Johnson
- Re: Find DesktopRegion in MFC VC++
- Prev by Date: Re: #pragma lib buggers everything up
- Next by Date: Re: Get current process processor
- Previous by thread: Re: Find DesktopRegion in MFC VC++
- Next by thread: Off topic - looking for a good recruiter in Houston
- Index(es):