Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

drawfrm.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

BOOL FAR BitBltSysBmp (HDC hdc, int x, int y, UINT i)
void xxxDrawWindowFrame (PWND pwnd, HDC hdc, BOOL fHungRedraw, BOOL fActive)
void xxxRedrawFrame (PWND pwnd)
void xxxRedrawFrameAndHook (PWND pwnd)


Function Documentation

BOOL FAR BitBltSysBmp HDC  hdc,
int  x,
int  y,
UINT  i
 

Definition at line 22 of file drawfrm.c.

References BOOL, tagOEMBITMAPINFO::cx, tagOEMBITMAPINFO::cy, FAR, gpsi, HDCBITS, HEBREW_UI_LANGID, NtUserBitBltSysBmp(), OBI_HELP, OBI_HELP_D, OBI_HELP_H, SYSMET, tagOEMBITMAPINFO::x, and tagOEMBITMAPINFO::y.

Referenced by DrawCaptionButtons(), DrawSize(), DrawStateW(), LoadBmp(), MNDrawArrow(), xxxDrawCaptionBar(), xxxDrawSB2(), xxxRealDrawMenuItem(), xxxTrackCaptionButton(), and zzzDrawInvertScrollArea().

00028 { 00029 BOOL bRet; 00030 POEMBITMAPINFO pOem = gpsi->oembmi + i; 00031 00032 bRet = GreBitBlt(hdc, 00033 x, 00034 y, 00035 pOem->cx, 00036 pOem->cy, 00037 HDCBITS(), 00038 pOem->x, 00039 pOem->y, 00040 SRCCOPY, 00041 0); 00042 #ifdef USE_MIRRORING 00043 /* 00044 * If the UI language is Hebrew we do not want to mirror the ? mark only 00045 * Then redraw ? with out the button frame. 00046 */ 00047 if (HEBREW_UI_LANGID() && MIRRORED_HDC(hdc)) { 00048 if ((i >= OBI_HELP) && (i <= OBI_HELP_H)) { 00049 if (i == OBI_HELP_D) { 00050 x = x + SYSMET(CXEDGE); 00051 } 00052 bRet = GreBitBlt(hdc, 00053 x, 00054 y+SYSMET(CXEDGE), 00055 pOem->cx-SYSMET(CXEDGE)*2, 00056 pOem->cy-SYSMET(CXEDGE)*2, 00057 HDCBITS(), 00058 pOem->x+SYSMET(CXEDGE), 00059 pOem->y+SYSMET(CXEDGE), 00060 SRCCOPY|NOMIRRORBITMAP, 00061 0); 00062 00063 } 00064 } 00065 #endif 00066 return bRet; 00067 }

void xxxDrawWindowFrame PWND  pwnd,
HDC  hdc,
BOOL  fHungRedraw,
BOOL  fActive
 

Definition at line 76 of file drawfrm.c.

References CheckLock, DrawEdge(), DrawSize(), EqualRect, FALSE, GetCaptionHeight(), GetRect(), GetWindowBorders(), GRECT_WINDOW, GRECT_WINDOWCOORDS, tagWND::hrgnUpdate, InflateRect(), IsVisible(), NULL, tagWND::rcClient, tagWND::rcWindow, SYSMET, TestWF, TRUE, UINT, WEFDLGMODALFRAME, WEFSTATICEDGE, WEFWINDOWEDGE, WFBORDERMASK, WFCEPRESENT, WFFRAMEON, WFHPRESENT, WFMENUDRAW, WFMINIMIZED, WFMPRESENT, WFNONCPAINT, WFSIZEBOX, WFVPRESENT, xxxDrawCaptionBar(), xxxDrawScrollBar(), and xxxMenuBarDraw().

Referenced by xxxDefWindowProc(), xxxDWPPrint(), and xxxRedrawHungWindow().

00081 { 00082 RECT rcClip; 00083 int cxFrame, cyFrame; 00084 UINT wFlags = DC_NC; 00085 00086 CheckLock(pwnd); 00087 00088 /* 00089 * If we are minimized, or if a parent is minimized or invisible, 00090 * we've got nothing to draw. 00091 */ 00092 if (!IsVisible(pwnd) || 00093 (TestWF(pwnd, WFNONCPAINT) && !TestWF(pwnd, WFMENUDRAW)) || 00094 EqualRect(&pwnd->rcWindow, &pwnd->rcClient)) { 00095 return; 00096 } 00097 00098 /* 00099 * If the update rgn is not NULL, we may have to invalidate the bits saved. 00100 */ 00101 // if (TRUE) { 00102 if (pwnd->hrgnUpdate > NULL || GreGetClipBox(hdc, &rcClip, TRUE) != NULLREGION) { 00103 RECT rcWindow; 00104 int cBorders; 00105 00106 if (TestWF(pwnd, WFMINIMIZED) && !TestWF(pwnd, WFNONCPAINT)) { 00107 if (TestWF(pwnd, WFFRAMEON)) 00108 wFlags |= DC_ACTIVE; 00109 if (fHungRedraw) 00110 wFlags |= DC_NOSENDMSG; 00111 xxxDrawCaptionBar(pwnd, hdc, wFlags); 00112 return; 00113 } 00114 00115 cxFrame = cyFrame = cBorders = 00116 GetWindowBorders(pwnd->style, pwnd->ExStyle, TRUE, FALSE); 00117 cxFrame *= SYSMET(CXBORDER); 00118 cyFrame *= SYSMET(CYBORDER); 00119 00120 GetRect(pwnd, &rcWindow, GRECT_WINDOW | GRECT_WINDOWCOORDS); 00121 InflateRect(&rcWindow, -cxFrame, -cyFrame); 00122 00123 /* 00124 * If the menu style is present, draw it. 00125 */ 00126 if (TestWF(pwnd, WFMPRESENT) && !fHungRedraw) { 00127 rcWindow.top += xxxMenuBarDraw(pwnd, hdc, cxFrame, cyFrame); 00128 } 00129 00130 /* 00131 * Draw the title bar if the window has a caption or any window 00132 * borders. Punt if the NONCPAINT bit is set, because that means 00133 * we're going to draw the frame a little bit later. 00134 */ 00135 00136 if ((TestWF(pwnd, WFBORDERMASK) != 0 00137 || TestWF(pwnd, WEFDLGMODALFRAME)) 00138 || TestWF(pwnd, WFSIZEBOX) 00139 || TestWF(pwnd, WEFWINDOWEDGE) 00140 || TestWF(pwnd, WEFSTATICEDGE) 00141 && !TestWF(pwnd, WFNONCPAINT)) 00142 { 00143 if (fHungRedraw) 00144 wFlags |= DC_NOSENDMSG; 00145 if (fActive) 00146 wFlags |= DC_ACTIVE; 00147 xxxDrawCaptionBar(pwnd, hdc, wFlags | DC_NOVISIBLE); 00148 } 00149 00150 // 00151 // Subtract out caption if present. 00152 // 00153 rcWindow.top += GetCaptionHeight(pwnd); 00154 00155 // 00156 // Draw client edge 00157 // 00158 if (TestWF(pwnd, WFCEPRESENT)) { 00159 cxFrame += SYSMET(CXEDGE); 00160 cyFrame += SYSMET(CYEDGE); 00161 DrawEdge(hdc, &rcWindow, EDGE_SUNKEN, BF_RECT | BF_ADJUST); 00162 } 00163 00164 // 00165 // Since scrolls don't have to use tricks to overlap the window 00166 // border anymore, we don't have to worry about borders. 00167 // 00168 if (TestWF(pwnd, WFVPRESENT) && !fHungRedraw) { 00169 if (TestWF(pwnd, WFHPRESENT)) { 00170 // This accounts for client borders. 00171 DrawSize(pwnd, hdc, cxFrame, cyFrame); 00172 } 00173 00174 xxxDrawScrollBar(pwnd, hdc, TRUE); 00175 } 00176 00177 if (TestWF(pwnd, WFHPRESENT) && !fHungRedraw) 00178 xxxDrawScrollBar(pwnd, hdc, FALSE); 00179 } 00180 }

void xxxRedrawFrame PWND  pwnd  ) 
 

Definition at line 192 of file drawfrm.c.

References CheckLock, NULL, and xxxSetWindowPos().

Referenced by xxxDrawMenuBar(), xxxSetMenu(), xxxSetScrollBar(), xxxSetWindowStyle(), and xxxShowScrollBar().

00194 { 00195 CheckLock(pwnd); 00196 00197 /* 00198 * We always want to call xxxSetWindowPos, even if invisible or iconic, 00199 * because we need to make sure the WM_NCCALCSIZE message gets sent. 00200 */ 00201 xxxSetWindowPos(pwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | 00202 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_DRAWFRAME); 00203 }

void xxxRedrawFrameAndHook PWND  pwnd  ) 
 

Definition at line 205 of file drawfrm.c.

References CheckLock, HWq, IsTrayWindow(), L, NULL, PostShellHookMessages(), xxxCallHook(), and xxxSetWindowPos().

00207 { 00208 CheckLock(pwnd); 00209 00210 /* 00211 * We always want to call xxxSetWindowPos, even if invisible or iconic, 00212 * because we need to make sure the WM_NCCALCSIZE message gets sent. 00213 */ 00214 xxxSetWindowPos(pwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | 00215 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_DRAWFRAME); 00216 if ( IsTrayWindow(pwnd) ) { 00217 HWND hw = HWq(pwnd); 00218 xxxCallHook(HSHELL_REDRAW, (WPARAM)hw, 0L, WH_SHELL); 00219 PostShellHookMessages(HSHELL_REDRAW, (LPARAM)hw); 00220 00221 } 00222 }


Generated on Sat May 15 19:43:29 2004 for test by doxygen 1.3.7