* User controls definitions
*
* Copyright 2000 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_CONTROLS_H
#include "winuser.h"
#include "winproc.h"
-struct tagWND;
-
/* Built-in class names (see _Undocumented_Windows_ p.418) */
-#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
-#define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
-#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
-#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
-#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
+#define POPUPMENU_CLASS_ATOM MAKEINTATOMA(32768) /* PopupMenu */
+#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
+#define DIALOG_CLASS_ATOM MAKEINTATOMA(32770) /* Dialog */
+#define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
+#define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
/* Built-in class descriptor */
struct builtin_class_descr
extern BOOL DESKTOP_SetPattern( LPCSTR pattern );
/* icon title */
-extern HWND ICONTITLE_Create( struct tagWND * );
-
-/* MDI client */
-extern HWND MDI_CreateMDIWindowA(LPCSTR,LPCSTR,DWORD,INT,INT,INT,INT,HWND,HINSTANCE,LPARAM);
-extern HWND MDI_CreateMDIWindowW(LPCWSTR,LPCWSTR,DWORD,INT,INT,INT,INT,HWND,HINSTANCE,LPARAM);
+extern HWND ICONTITLE_Create( HWND hwnd );
/* menu controls */
extern BOOL MENU_Init(void);
extern HMENU MENU_GetSysMenu(HWND hWndOwner, HMENU hSysPopup);
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
INT orgX, INT orgY );
-extern BOOL MENU_PatchResidentPopup( HQUEUE16, struct tagWND* );
-extern void MENU_TrackMouseMenuBar( struct tagWND *wnd, INT ht, POINT pt );
-extern void MENU_TrackKbdMenuBar( struct tagWND *wnd, UINT wParam, INT vkey );
+extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt );
+extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, INT vkey );
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
HWND hwnd, BOOL suppress_draw );
extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
/* scrollbar */
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
-extern void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt );
-extern INT SCROLL_SetNCSbState( struct tagWND *wndPtr, int vMin, int vMax, int vPos,
+extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
+extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
int hMin, int hMax, int hPos );
/* combo box */
/* combo state struct */
typedef struct
{
- struct tagWND *self;
+ HWND self;
HWND owner;
UINT dwStyle;
HWND hWndEdit;
/* Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN) */
#define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
-#define CB_DISABLED( lphc ) ((lphc)->self->dwStyle & WS_DISABLED)
-#define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
-#define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
-#define CB_HWND( lphc ) ((lphc)->self->hwndSelf)
extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
-extern LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL );
-
-
-/* Dialog info structure.
- * This structure is stored into the window extra bytes (cbWndExtra).
- * sizeof(DIALOGINFO) must be <= DLGWINDOWEXTRA (=30).
- */
-#include "pshpack1.h"
+/* Dialog info structure */
typedef struct
{
- INT msgResult; /* 00 Last message result */
- HWINDOWPROC dlgProc; /* 04 Dialog procedure */
- LONG userInfo; /* 08 User information (for DWL_USER) */
-
- /* implementation-dependent part */
-
- HWND16 hwndFocus; /* 0c Current control with focus */
- HFONT16 hUserFont; /* 0e Dialog font */
- HMENU16 hMenu; /* 10 Dialog menu */
- WORD xBaseUnit; /* 12 Dialog units (depends on the font) */
- WORD yBaseUnit; /* 14 */
- INT idResult; /* 16 EndDialog() result / default pushbutton ID */
- UINT16 flags; /* 1a EndDialog() called for this dialog */
- HGLOBAL16 hDialogHeap; /* 1c */
+ HWND hwndFocus; /* Current control with focus */
+ HFONT hUserFont; /* Dialog font */
+ HMENU hMenu; /* Dialog menu */
+ UINT xBaseUnit; /* Dialog units (depends on the font) */
+ UINT yBaseUnit;
+ INT idResult; /* EndDialog() result / default pushbutton ID */
+ UINT flags; /* EndDialog() called for this dialog */
+ HGLOBAL16 hDialogHeap;
} DIALOGINFO;
-#include "poppack.h"
-
#define DF_END 0x0001
#define DF_OWNERENABLED 0x0002
+/* offset of DIALOGINFO ptr in dialog extra bytes */
+#define DWL_WINE_DIALOGINFO (DWL_USER+sizeof(ULONG_PTR))
+
+inline static DIALOGINFO *DIALOG_get_info( HWND hwnd )
+{
+ return (DIALOGINFO *)GetWindowLongW( hwnd, DWL_WINE_DIALOGINFO );
+}
+
extern BOOL DIALOG_Init(void);
#endif /* __WINE_CONTROLS_H */