]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/microwin.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / msw / microwin.h
CommitLineData
04ef50df
JS
1/*
2/////////////////////////////////////////////////////////////////////////////
80fdcdb9 3// Name: wx/msw/microwin.h
04ef50df
JS
4// Purpose: Extra implementation for MicroWindows
5// Author: Julian Smart
6// Created: 2001-05-31
04ef50df 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
04ef50df
JS
9/////////////////////////////////////////////////////////////////////////////
10*/
11
12#ifndef _WX_MICROWIN_H_
13#define _WX_MICROWIN_H_
14
04ef50df
JS
15/* Implemented by microwin.cpp */
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21BOOL SetCursorPos(int x, int y);
22
23HCURSOR SetCursor(HCURSOR hCursor);
24
25/* Implemented with wrong number of args by MicroWindows */
26/* so we need to use a different name */
27int GetScrollPosWX (HWND hWnd, int iSBar);
28
29BOOL ScrollWindow(HWND, int xAmount, int yAmount,
598ddd96 30 CONST RECT* lpRect, CONST RECT* lpClipRect);
04ef50df
JS
31
32HWND WindowFromPoint(POINT pt);
33SHORT GetKeyState(int nVirtKey);
34HWND SetParent(HWND hWndChild, HWND hWndNewParent);
35VOID DragAcceptFiles(HWND, BOOL);
36BOOL IsDialogMessage(HWND hWnd, MSG* msg);
37DWORD GetMessagePos(VOID);
38BOOL IsIconic(HWND hWnd);
39int SetMapMode(HDC hDC, int mode);
40int GetMapMode(HDC hDC);
41HCURSOR LoadCursor(HINSTANCE hInst, int cursor);
42DWORD GetModuleFileName(HINSTANCE hInst, LPSTR name, DWORD sz);
43VOID DestroyIcon(HICON hIcon);
44COLORREF GetTextColor(HDC hdc);
45COLORREF GetBkColor(HDC hdc);
46HPALETTE SelectPalette(HDC hdc, HPALETTE hPalette, BOOL b);
47BOOL IntersectClipRect(HDC hdc, int x, int y,
598ddd96 48 int w, int h);
04ef50df
JS
49BOOL GetClipBox(HDC hdc, RECT* rect);
50BOOL DrawIconEx(HDC hdc, int x, int y, HICON hIcon, int w, int h, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
51BOOL SetViewportExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
52BOOL SetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lpPoint);
53BOOL SetWindowExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
54BOOL SetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lpSize);
55BOOL ExtFloodFill(HDC hdc, int x, int y, COLORREF col, UINT flags);
56int SetPolyFillMode(HDC hdc, int mode);
57BOOL RoundRect(HDC hdc, int left, int top, int right, int bottom, int r1, int r2);
58BOOL MaskBlt(HDC hdc, int x, int y, int w, int h,
59 HDC hDCSource, int xSrc, int ySrc, HBITMAP hBitmapMask, int xMask, int yMask, DWORD rop);
60UINT RealizePalette(HDC hDC);
61BOOL SetBrushOrgEx(HDC hdc, int xOrigin, int yOrigin, LPPOINT lpPoint);
62int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj);
63
64/* For some reason these aren't defined in the headers */
65BOOL EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable) ;
66BOOL GetScrollPos (HWND hWnd, int iSBar, int* pPos);
67BOOL GetScrollRange (HWND hWnd, int iSBar, int* pMinPos, int* pMaxPos);
68BOOL SetScrollPos (HWND hWnd, int iSBar, int iNewPos);
69BOOL SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos);
598ddd96
WS
70BOOL SetScrollInfo (HWND hWnd, int iSBar,
71 LPCSCROLLINFO lpsi, BOOL fRedraw);
04ef50df
JS
72BOOL GetScrollInfo(HWND hWnd, int iSBar, LPSCROLLINFO lpsi);
73BOOL ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow);
62e1ba75
JS
74HBITMAP WINAPI
75CreateBitmap( int width, int height, int nPlanes, int bPP, LPCVOID lpData);
04ef50df
JS
76
77#ifdef __cplusplus
78}
79#endif
80
81/*
82 * Key State Masks for Mouse Messages
83 */
84#ifndef MK_LBUTTON
85#define MK_LBUTTON 0x0001
86#define MK_RBUTTON 0x0002
87#define MK_SHIFT 0x0004
88#define MK_CONTROL 0x0008
89#define MK_MBUTTON 0x0010
90#endif
91
92/*
93 * DrawIcon flags
94 */
95
96#ifndef DI_MASK
97#define DI_MASK 0x0001
98#define DI_IMAGE 0x0002
99#define DI_NORMAL 0x0003
100#define DI_COMPAT 0x0004
101#define DI_DEFAULTSIZE 0x0008
102#endif
103
104/* TODO: May have to fake these message */
105#ifndef WM_INITDIALOG
106#define WM_INITDIALOG 0x0110
107#endif
108#ifndef WM_QUERYENDSESSION
109#define WM_QUERYENDSESSION 0x0011
110#endif
111#ifndef WM_ENDSESSION
112#define WM_ENDSESSION 0x0016
113#endif
114#ifndef WM_SETCURSOR
115#define WM_SETCURSOR 0x0020
116#endif
117#ifndef WM_GETMINMAXINFO
118#define WM_GETMINMAXINFO 0x0024
119typedef struct tagMINMAXINFO {
120 POINT ptReserved;
121 POINT ptMaxSize;
122 POINT ptMaxPosition;
123 POINT ptMinTrackSize;
124 POINT ptMaxTrackSize;
125} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
126
127#endif
128#ifndef WM_SYSCOMMAND
129#define WM_SYSCOMMAND 0x0112
130#endif
131#ifndef WM_SYSCOLORCHANGE
132#define WM_SYSCOLORCHANGE 0x0015
133#endif
134#ifndef WM_QUERYNEWPALETTE
135#define WM_QUERYNEWPALETTE 0x030F
136#endif
137#ifndef WM_PALETTEISCHANGING
138#define WM_PALETTEISCHANGING 0x0310
139#endif
140#ifndef WM_PALETTECHANGED
141#define WM_PALETTECHANGED 0x0311
142#endif
143#ifndef WM_NOTIFY
144#define WM_NOTIFY 0x004E
145#endif
146#ifndef WM_DROPFILES
147#define WM_DROPFILES 0x0233
148#endif
149
150#ifndef PALETTERGB
151#define PALETTERGB RGB
152#endif
153
154#ifndef MM_TEXT
155#define MM_TEXT 1
156#define MM_LOMETRIC 2
157#define MM_HIMETRIC 3
158#define MM_LOENGLISH 4
159#define MM_HIENGLISH 5
160#define MM_TWIPS 6
161#define MM_ISOTROPIC 7
162#define MM_ANISOTROPIC 8
163#endif
164
165#ifndef SC_MAXIMIZE
166#define SC_MINIMIZE 0xF020
167#define SC_MAXIMIZE 0xF030
168#endif
169
170// TODO: all of them
171#ifndef IDC_ARROW
172#define IDC_ARROW 1
173#endif
174
175/*
176 * Standard Cursor IDs
177 */
178#ifndef MAKEINTRESOURCE
179#define MAKEINTRESOURCE(r) r
180#endif
181
182#ifndef IDC_ARROW
183#define IDC_ARROW MAKEINTRESOURCE(32512)
184#define IDC_IBEAM MAKEINTRESOURCE(32513)
185#define IDC_WAIT MAKEINTRESOURCE(32514)
186#define IDC_CROSS MAKEINTRESOURCE(32515)
187#define IDC_UPARROW MAKEINTRESOURCE(32516)
188#define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
189#define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
190#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
191#define IDC_SIZENESW MAKEINTRESOURCE(32643)
192#define IDC_SIZEWE MAKEINTRESOURCE(32644)
193#define IDC_SIZENS MAKEINTRESOURCE(32645)
194#define IDC_SIZEALL MAKEINTRESOURCE(32646)
195#define IDC_NO MAKEINTRESOURCE(32648) /* not in win3.1 */
196#if(WINVER >= 0x0500)
197#define IDC_HAND MAKEINTRESOURCE(32649)
198#endif /* WINVER >= 0x0500 */
199#define IDC_APPSTARTING MAKEINTRESOURCE(32650) /* not in win3.1 */
200#if(WINVER >= 0x0400)
201#define IDC_HELP MAKEINTRESOURCE(32651)
202#endif /* WINVER >= 0x0400 */
203#endif
204
205/* ExtFloodFill style flags */
206#define FLOODFILLBORDER 0
207#define FLOODFILLSURFACE 1
208
209/* PolyFill() Modes */
210#define ALTERNATE 1
211#define WINDING 2
212#define POLYFILL_LAST 2
213
214/* Quaternary raster codes */
215#define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
216
217/* Device Parameters for GetDeviceCaps() */
218#define DRIVERVERSION 0 /* Device driver version */
219#define TECHNOLOGY 2 /* Device classification */
220#define HORZSIZE 4 /* Horizontal size in millimeters */
221#define VERTSIZE 6 /* Vertical size in millimeters */
222
223/* Ternary raster operations */
c67d6888
JS
224/* Now defined by MicroWindows */
225#if 0
04ef50df
JS
226#define DSTINVERT (DWORD)0x00550009 /* dest = (NOT dest) */
227#define WHITENESS (DWORD)0x00FF0062 /* dest = WHITE */
228#define SRCERASE (DWORD)0x00440328 /* dest = source AND (NOT dest ) */
229#define MERGEPAINT (DWORD)0x00BB0226 /* dest = (NOT source) OR dest */
230#define SRCPAINT (DWORD)0x00EE0086 /* dest = source OR dest */
231#define NOTSRCCOPY (DWORD)0x00330008 /* dest = (NOT source) */
c67d6888 232#endif
04ef50df
JS
233
234#endif /* _WX_MICROWIN_H_ */