00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
#include "precomp.h"
00014
#pragma hdrstop
00015
00016
00017
00018
00019
00020
00021
00022 BOOL FAR BitBltSysBmp(
00023 HDC hdc,
00024
int x,
00025
int y,
00026 UINT i
00027 )
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
00045
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 }
00068
00069
00070
00071
00072
00073
00074
00075
00076 void xxxDrawWindowFrame(
00077
PWND pwnd,
00078 HDC hdc,
00079 BOOL fHungRedraw,
00080 BOOL fActive)
00081 {
00082 RECT rcClip;
00083
int cxFrame, cyFrame;
00084
UINT wFlags = DC_NC;
00085
00086
CheckLock(pwnd);
00087
00088
00089
00090
00091
00092
if (!
IsVisible(pwnd) ||
00093 (
TestWF(pwnd,
WFNONCPAINT) && !
TestWF(pwnd,
WFMENUDRAW)) ||
00094
EqualRect(&pwnd->
rcWindow, &pwnd->
rcClient)) {
00095
return;
00096 }
00097
00098
00099
00100
00101
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
00125
00126
if (
TestWF(pwnd,
WFMPRESENT) && !fHungRedraw) {
00127 rcWindow.top +=
xxxMenuBarDraw(pwnd, hdc, cxFrame, cyFrame);
00128 }
00129
00130
00131
00132
00133
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
00152
00153 rcWindow.top +=
GetCaptionHeight(pwnd);
00154
00155
00156
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
00166
00167
00168
if (
TestWF(pwnd,
WFVPRESENT) && !fHungRedraw) {
00169
if (
TestWF(pwnd,
WFHPRESENT)) {
00170
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 }
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192 void xxxRedrawFrame(
00193
PWND pwnd)
00194 {
00195
CheckLock(pwnd);
00196
00197
00198
00199
00200
00201
xxxSetWindowPos(pwnd,
NULL, 0, 0, 0, 0, SWP_NOZORDER |
00202 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_DRAWFRAME);
00203 }
00204
00205 void xxxRedrawFrameAndHook(
00206
PWND pwnd)
00207 {
00208
CheckLock(pwnd);
00209
00210
00211
00212
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, 0
L, WH_SHELL);
00219
PostShellHookMessages(HSHELL_REDRAW, (LPARAM)hw);
00220
00221 }
00222 }