00001
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _MGUI_CTRL_CTRLHELPER_H
00030 #define _MGUI_CTRL_CTRLHELPER_H
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00055 typedef enum
00056 {
00060 SB_POLICY_ALWAYS,
00064 SB_POLICY_AUTOMATIC,
00067 SB_POLICY_NEVER
00068 } SBPolicyType;
00069
00070
00071 int EditOnEraseBackground (HWND hWnd, HDC hdc, const RECT* pClipRect);
00072
00083 MG_EXPORT void GUIAPI DrawBoxFromBitmap (HDC hdc, const RECT* box, const BITMAP* bmp, BOOL h_v, BOOL do_clip);
00084
00085 #define DF_3DBOX_NORMAL 0x0000
00086 #define DF_3DBOX_PRESSED 0x0001
00087 #define DF_3DBOX_STATEMASK 0x000F
00088 #define DF_3DBOX_NOTFILL 0x0000
00089 #define DF_3DBOX_FILL 0x0010
00090
00110 MG_EXPORT void GUIAPI Draw3DControlFrameEx (HDC hdc, HWND hwnd, int x0, int y0, int x1, int y1,
00111 DWORD flags, gal_pixel fillc);
00112
00118 #define Draw3DControlFrame(hdc, l, t, r, b, fillc, updown) \
00119 Draw3DControlFrameEx(hdc, HWND_DESKTOP, l, t, r, b, \
00120 (updown?DF_3DBOX_NORMAL:DF_3DBOX_PRESSED) | ((fillc)?DF_3DBOX_FILL:0), fillc)
00121
00142 MG_EXPORT void GUIAPI DrawFlatControlFrameEx (HDC hdc, HWND hwnd, int x0, int y0, int x1, int y1,
00143 int corner, DWORD flags, gal_pixel fillc);
00149 #define DrawFlatControlFrame(hdc, x0, y0, x1, y1, fillc, updown) \
00150 DrawFlatControlFrameEx(hdc, HWND_DESKTOP, x0, y0, x1, y1, 3, \
00151 (updown?DF_3DBOX_NORMAL:DF_3DBOX_PRESSED) | ((fillc)?DF_3DBOX_FILL:0), fillc)
00152
00175 MG_EXPORT void GUIAPI Draw3DThickFrameEx (HDC hdc, HWND hwnd,
00176 int l, int t, int r, int b, DWORD flags, gal_pixel fillc);
00177
00183 #define Draw3DUpThickFrame(hdc, l, t, r, b, fillc) \
00184 Draw3DThickFrameEx(hdc, HWND_DESKTOP, l, t, r, b, DF_3DBOX_NORMAL | ((fillc)?DF_3DBOX_FILL:0), fillc)
00185
00191 #define Draw3DDownThickFrame(hdc, l, t, r, b, fillc) \
00192 Draw3DThickFrameEx(hdc, HWND_DESKTOP, l, t, r, b, DF_3DBOX_PRESSED | ((fillc)?DF_3DBOX_FILL:0), fillc)
00193
00198 #define Draw3DUpFrame Draw3DUpThickFrame
00199
00204 #define Draw3DDownFrame Draw3DDownThickFrame
00205
00228 MG_EXPORT void GUIAPI Draw3DThinFrameEx (HDC hdc, HWND hwnd,
00229 int l, int t, int r, int b, DWORD flags, gal_pixel fillc);
00230
00236 #define Draw3DUpThinFrame(hdc, l, t, r, b, fillc) \
00237 Draw3DThinFrameEx(hdc, HWND_DESKTOP, l, t, r, b, DF_3DBOX_NORMAL | ((fillc)?DF_3DBOX_FILL:0), fillc)
00238
00243 #define Draw3DDownThinFrame(hdc, l, t, r, b, fillc) \
00244 Draw3DThinFrameEx(hdc, HWND_DESKTOP, l, t, r, b, DF_3DBOX_PRESSED | ((fillc)?DF_3DBOX_FILL:0), fillc)
00245
00261 MG_EXPORT void GUIAPI Draw3DBorderEx (HDC hdc, HWND hwnd, int l, int t, int r, int b);
00262
00268 #define Draw3DBorder(hdc, l, t, r, b) \
00269 Draw3DBorderEx(hdc, HWND_DESKTOP, l, t, r, b)
00270
00285 MG_EXPORT void GUIAPI DisabledTextOutEx (HDC hdc, HWND hwnd, int x, int y, const char* szText);
00286
00310 MG_EXPORT void GUIAPI NotifyParentEx (HWND hwnd, int id, int code, DWORD add_data);
00311
00326 #define NotifyParent(hwnd, id, code) \
00327 NotifyParentEx(hwnd, id, code, 0)
00328
00339 typedef int (*STRCMP) (const char* s1, const char* s2, size_t n);
00340
00341 MG_EXPORT int GUIAPI DefaultPageProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
00342
00349 #ifdef __cplusplus
00350 }
00351 #endif
00352
00353 #endif
00354