New Files. Added 'date and time picker' and 'month calendar' control

dummies. They are used by Outlook Express.
This commit is contained in:
Eric Kohl 1998-11-08 11:30:27 +00:00 committed by Alexandre Julliard
parent 4104301e6d
commit a867030e6b
8 changed files with 472 additions and 123 deletions

View file

@ -10,11 +10,13 @@ C_SRCS = \
comboex.c \
comctl32undoc.c \
commctrl.c \
datetime.c \
header.c \
hotkey.c \
imagelist.c \
ipaddress.c \
listview.c \
monthcal.c \
nativefont.c \
pager.c \
progress.c \

128
dlls/comctl32/datetime.c Normal file
View file

@ -0,0 +1,128 @@
/*
* Date and time picker control
*
* Copyright 1998 Eric Kohl
*
* NOTES
* This is just a dummy control. An author is needed! Any volunteers?
* I will only improve this control once in a while.
* Eric <ekohl@abo.rhein-zeitung.de>
*
* TODO:
* - All messages.
* - All notifications.
*
*/
#include "windows.h"
#include "commctrl.h"
#include "datetime.h"
#include "win.h"
#include "debug.h"
#define DATETIME_GetInfoPtr(wndPtr) ((DATETIME_INFO *)wndPtr->wExtra[0])
static LRESULT
DATETIME_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
DATETIME_INFO *infoPtr;
/* allocate memory for info structure */
infoPtr = (DATETIME_INFO *)COMCTL32_Alloc (sizeof(DATETIME_INFO));
wndPtr->wExtra[0] = (DWORD)infoPtr;
if (infoPtr == NULL) {
ERR (datetime, "could not allocate info memory!\n");
return 0;
}
if ((DATETIME_INFO*)wndPtr->wExtra[0] != infoPtr) {
ERR (datetime, "pointer assignment error!\n");
return 0;
}
/* initialize info structure */
return 0;
}
static LRESULT
DATETIME_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr(wndPtr);
/* free ipaddress info data */
COMCTL32_Free (infoPtr);
return 0;
}
LRESULT WINAPI
DATETIME_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
switch (uMsg)
{
case WM_CREATE:
return DATETIME_Create (wndPtr, wParam, lParam);
case WM_DESTROY:
return DATETIME_Destroy (wndPtr, wParam, lParam);
default:
if (uMsg >= WM_USER)
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
}
return 0;
}
VOID
DATETIME_Register (VOID)
{
WNDCLASS32A wndClass;
if (GlobalFindAtom32A (DATETIMEPICK_CLASS32A)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)DATETIME_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(DATETIME_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = DATETIMEPICK_CLASS32A;
RegisterClass32A (&wndClass);
}
VOID
DATETIME_Unregister (VOID)
{
if (GlobalFindAtom32A (DATETIMEPICK_CLASS32A))
UnregisterClass32A (DATETIMEPICK_CLASS32A, (HINSTANCE32)NULL);
}

128
dlls/comctl32/monthcal.c Normal file
View file

@ -0,0 +1,128 @@
/*
* Month calendar control
*
* Copyright 1998 Eric Kohl
*
* NOTES
* This is just a dummy control. An author is needed! Any volunteers?
* I will only improve this control once in a while.
* Eric <ekohl@abo.rhein-zeitung.de>
*
* TODO:
* - All messages.
* - All notifications.
*
*/
#include "windows.h"
#include "commctrl.h"
#include "monthcal.h"
#include "win.h"
#include "debug.h"
#define MONTHCAL_GetInfoPtr(wndPtr) ((MONTHCAL_INFO *)wndPtr->wExtra[0])
static LRESULT
MONTHCAL_Create (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
MONTHCAL_INFO *infoPtr;
/* allocate memory for info structure */
infoPtr = (MONTHCAL_INFO *)COMCTL32_Alloc (sizeof(MONTHCAL_INFO));
wndPtr->wExtra[0] = (DWORD)infoPtr;
if (infoPtr == NULL) {
ERR (monthcal, "could not allocate info memory!\n");
return 0;
}
if ((MONTHCAL_INFO*)wndPtr->wExtra[0] != infoPtr) {
ERR (monthcal, "pointer assignment error!\n");
return 0;
}
/* initialize info structure */
return 0;
}
static LRESULT
MONTHCAL_Destroy (WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{
MONTHCAL_INFO *infoPtr = MONTHCAL_GetInfoPtr(wndPtr);
/* free ipaddress info data */
COMCTL32_Free (infoPtr);
return 0;
}
LRESULT WINAPI
MONTHCAL_WindowProc (HWND32 hwnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
{
WND *wndPtr = WIN_FindWndPtr(hwnd);
switch (uMsg)
{
case WM_CREATE:
return MONTHCAL_Create (wndPtr, wParam, lParam);
case WM_DESTROY:
return MONTHCAL_Destroy (wndPtr, wParam, lParam);
default:
if (uMsg >= WM_USER)
ERR (monthcal, "unknown msg %04x wp=%08x lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProc32A (hwnd, uMsg, wParam, lParam);
}
return 0;
}
VOID
MONTHCAL_Register (VOID)
{
WNDCLASS32A wndClass;
if (GlobalFindAtom32A (MONTHCAL_CLASS32A)) return;
ZeroMemory (&wndClass, sizeof(WNDCLASS32A));
wndClass.style = CS_GLOBALCLASS;
wndClass.lpfnWndProc = (WNDPROC32)MONTHCAL_WindowProc;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = sizeof(MONTHCAL_INFO *);
wndClass.hCursor = LoadCursor32A (0, IDC_ARROW32A);
wndClass.hbrBackground = (HBRUSH32)(COLOR_WINDOW + 1);
wndClass.lpszClassName = MONTHCAL_CLASS32A;
RegisterClass32A (&wndClass);
}
VOID
MONTHCAL_Unregister (VOID)
{
if (GlobalFindAtom32A (MONTHCAL_CLASS32A))
UnregisterClass32A (MONTHCAL_CLASS32A, (HINSTANCE32)NULL);
}

View file

@ -1889,6 +1889,17 @@ typedef struct tagTVHITTESTINFO {
#define LVNI_TOLEFT 0x0400
#define LVNI_TORIGHT 0x0800
#define LVHT_NOWHERE 0x0001
#define LVHT_ONITEMICON 0x0002
#define LVHT_ONITEMLABEL 0x0004
#define LVHT_ONITEMSTATEICON 0x0008
#define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
#define LVHT_ABOVE 0x0008
#define LVHT_BELOW 0x0010
#define LVHT_TORIGHT 0x0020
#define LVHT_TOLEFT 0x0040
#define LVM_FIRST 0x1000
#define LVM_GETBKCOLOR (LVM_FIRST+0)
#define LVM_SETBKCOLOR (LVM_FIRST+1)
@ -2132,6 +2143,18 @@ typedef struct tagLVDISPINFOW
#define LV_DISPINFO NMLVDISPINFO
typedef struct tagLVHITTESTINFO
{
POINT32 pt;
UINT32 flags;
INT32 iItem;
INT32 iSubItem;
} LVHITTESTINFO, *LPLVHITTESTINFO;
#define LV_HITTESTINFO LVHITTESTINFO
#define _LV_HITTESTINFO tagLVHITTESTINFO
#define LVHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(LVHITTESTINFO,iItem)
typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
#define ListView_SetBkColor(hwnd,clrBk) \
@ -2147,6 +2170,8 @@ typedef INT32 (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
#define ListView_GetItem32W(hwnd,pitem) \
(BOOL32)SendMessage32W((hwnd),LVM_GETITEM32W,0,(LPARAM)(LVITEM32W *)(pitem))
#define ListView_GetItem WINELIB_NAME_AW(ListView_GetItem)
#define ListView_HitTest(hwnd,pinfo) \
(INT32)SendMessage32A((hwnd),LVMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(pinfo))
#define ListView_InsertItem32A(hwnd,pitem) \
(INT32)SendMessage32A((hwnd),LVM_INSERTITEM32A,0,(LPARAM)(const LVITEM32A *)(pitem))
#define ListView_InsertItem32W(hwnd,pitem) \
@ -2356,6 +2381,24 @@ typedef struct tagNMIPADDRESS
#define NFS_ALL 0x0010
/**************************************************************************
* Month calendar control
*/
#define MONTHCAL_CLASS32A "SysMonthCal32"
#define MONTHCAL_CLASS32W L"SysMonthCal32"
#define MONTHCAL_CLASS WINELIB_NAME_AW(MONTHCAL_CLASS)
/**************************************************************************
* Date and time picker control
*/
#define DATETIMEPICK_CLASS32A "SysDateTimePick32"
#define DATETIMEPICK_CLASS32W L"SysDateTimePick32"
#define DATETIMEPICK_CLASS WINELIB_NAME_AW(DATETIMEPICK_CLASS)
/**************************************************************************
* UNDOCUMENTED functions
*/

21
include/datetime.h Normal file
View file

@ -0,0 +1,21 @@
/*
* Date and time picker class extra info
*
* Copyright 1998 Eric Kohl
*/
#ifndef __WINE_DATETIME_H
#define __WINE_DATETIME_H
typedef struct tagDATETIME_INFO
{
DWORD dwDummy; /* just to keep the compiler happy ;-) */
} DATETIME_INFO, *LPDATETIME_INFO;
extern VOID DATETIME_Register (VOID);
extern VOID DATETIME_Unregister (VOID);
#endif /* __WINE_DATETIME_H */

View file

@ -31,128 +31,130 @@
#define dbch_console 23
#define dbch_crtdll 24
#define dbch_cursor 25
#define dbch_dc 26
#define dbch_dde 27
#define dbch_ddeml 28
#define dbch_ddraw 29
#define dbch_debug 30
#define dbch_dialog 31
#define dbch_dinput 32
#define dbch_dll 33
#define dbch_dosfs 34
#define dbch_dosmem 35
#define dbch_dplay 36
#define dbch_driver 37
#define dbch_dsound 38
#define dbch_edit 39
#define dbch_event 40
#define dbch_exec 41
#define dbch_file 42
#define dbch_fixup 43
#define dbch_font 44
#define dbch_gdi 45
#define dbch_global 46
#define dbch_graphics 47
#define dbch_header 48
#define dbch_heap 49
#define dbch_hook 50
#define dbch_hotkey 51
#define dbch_icon 52
#define dbch_imagehlp 53
#define dbch_imagelist 54
#define dbch_imm 55
#define dbch_int 56
#define dbch_int10 57
#define dbch_int16 58
#define dbch_int17 59
#define dbch_int19 60
#define dbch_int21 61
#define dbch_int31 62
#define dbch_io 63
#define dbch_ipaddress 64
#define dbch_key 65
#define dbch_keyboard 66
#define dbch_ldt 67
#define dbch_listbox 68
#define dbch_listview 69
#define dbch_local 70
#define dbch_mci 71
#define dbch_mcianim 72
#define dbch_mciwave 73
#define dbch_mdi 74
#define dbch_menu 75
#define dbch_message 76
#define dbch_metafile 77
#define dbch_midi 78
#define dbch_mmaux 79
#define dbch_mmio 80
#define dbch_mmsys 81
#define dbch_mmtime 82
#define dbch_module 83
#define dbch_mpr 84
#define dbch_msacm 85
#define dbch_msg 86
#define dbch_nativefont 87
#define dbch_nonclient 88
#define dbch_ntdll 89
#define dbch_ole 90
#define dbch_pager 91
#define dbch_palette 92
#define dbch_pidl 93
#define dbch_print 94
#define dbch_process 95
#define dbch_profile 96
#define dbch_progress 97
#define dbch_prop 98
#define dbch_psapi 99
#define dbch_psdrv 100
#define dbch_rebar 101
#define dbch_reg 102
#define dbch_region 103
#define dbch_relay 104
#define dbch_resource 105
#define dbch_s 106
#define dbch_scroll 107
#define dbch_security 108
#define dbch_segment 109
#define dbch_selector 110
#define dbch_sem 111
#define dbch_sendmsg 112
#define dbch_shell 113
#define dbch_shm 114
#define dbch_snoop 115
#define dbch_sound 116
#define dbch_static 117
#define dbch_statusbar 118
#define dbch_stress 119
#define dbch_string 120
#define dbch_syscolor 121
#define dbch_system 122
#define dbch_tab 123
#define dbch_task 124
#define dbch_text 125
#define dbch_thread 126
#define dbch_thunk 127
#define dbch_timer 128
#define dbch_toolbar 129
#define dbch_toolhelp 130
#define dbch_tooltips 131
#define dbch_trackbar 132
#define dbch_treeview 133
#define dbch_tweak 134
#define dbch_uitools 135
#define dbch_updown 136
#define dbch_ver 137
#define dbch_virtual 138
#define dbch_vxd 139
#define dbch_win 140
#define dbch_win16drv 141
#define dbch_win32 142
#define dbch_wing 143
#define dbch_winsock 144
#define dbch_wnet 145
#define dbch_x11 146
#define dbch_x11drv 147
#define dbch_datetime 26
#define dbch_dc 27
#define dbch_dde 28
#define dbch_ddeml 29
#define dbch_ddraw 30
#define dbch_debug 31
#define dbch_dialog 32
#define dbch_dinput 33
#define dbch_dll 34
#define dbch_dosfs 35
#define dbch_dosmem 36
#define dbch_dplay 37
#define dbch_driver 38
#define dbch_dsound 39
#define dbch_edit 40
#define dbch_event 41
#define dbch_exec 42
#define dbch_file 43
#define dbch_fixup 44
#define dbch_font 45
#define dbch_gdi 46
#define dbch_global 47
#define dbch_graphics 48
#define dbch_header 49
#define dbch_heap 50
#define dbch_hook 51
#define dbch_hotkey 52
#define dbch_icon 53
#define dbch_imagehlp 54
#define dbch_imagelist 55
#define dbch_imm 56
#define dbch_int 57
#define dbch_int10 58
#define dbch_int16 59
#define dbch_int17 60
#define dbch_int19 61
#define dbch_int21 62
#define dbch_int31 63
#define dbch_io 64
#define dbch_ipaddress 65
#define dbch_key 66
#define dbch_keyboard 67
#define dbch_ldt 68
#define dbch_listbox 69
#define dbch_listview 70
#define dbch_local 71
#define dbch_mci 72
#define dbch_mcianim 73
#define dbch_mciwave 74
#define dbch_mdi 75
#define dbch_menu 76
#define dbch_message 77
#define dbch_metafile 78
#define dbch_midi 79
#define dbch_mmaux 80
#define dbch_mmio 81
#define dbch_mmsys 82
#define dbch_mmtime 83
#define dbch_module 84
#define dbch_monthcal 85
#define dbch_mpr 86
#define dbch_msacm 87
#define dbch_msg 88
#define dbch_nativefont 89
#define dbch_nonclient 90
#define dbch_ntdll 91
#define dbch_ole 92
#define dbch_pager 93
#define dbch_palette 94
#define dbch_pidl 95
#define dbch_print 96
#define dbch_process 97
#define dbch_profile 98
#define dbch_progress 99
#define dbch_prop 100
#define dbch_psapi 101
#define dbch_psdrv 102
#define dbch_rebar 103
#define dbch_reg 104
#define dbch_region 105
#define dbch_relay 106
#define dbch_resource 107
#define dbch_s 108
#define dbch_scroll 109
#define dbch_security 110
#define dbch_segment 111
#define dbch_selector 112
#define dbch_sem 113
#define dbch_sendmsg 114
#define dbch_shell 115
#define dbch_shm 116
#define dbch_snoop 117
#define dbch_sound 118
#define dbch_static 119
#define dbch_statusbar 120
#define dbch_stress 121
#define dbch_string 122
#define dbch_syscolor 123
#define dbch_system 124
#define dbch_tab 125
#define dbch_task 126
#define dbch_text 127
#define dbch_thread 128
#define dbch_thunk 129
#define dbch_timer 130
#define dbch_toolbar 131
#define dbch_toolhelp 132
#define dbch_tooltips 133
#define dbch_trackbar 134
#define dbch_treeview 135
#define dbch_tweak 136
#define dbch_uitools 137
#define dbch_updown 138
#define dbch_ver 139
#define dbch_virtual 140
#define dbch_vxd 141
#define dbch_win 142
#define dbch_win16drv 143
#define dbch_win32 144
#define dbch_wing 145
#define dbch_winsock 146
#define dbch_wnet 147
#define dbch_x11 148
#define dbch_x11drv 149
/* Definitions for classes identifiers */
#define dbcl_fixme 0
#define dbcl_err 1

View file

@ -4,7 +4,7 @@
#include "debugtools.h"
#endif
#define DEBUG_CHANNEL_COUNT 148
#define DEBUG_CHANNEL_COUNT 150
#ifdef DEBUG_RUNTIME
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
@ -155,6 +155,8 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
};
const char* debug_ch_name[] = {
"1",
@ -183,6 +185,7 @@ const char* debug_ch_name[] = {
"console",
"crtdll",
"cursor",
"datetime",
"dc",
"dde",
"ddeml",
@ -241,6 +244,7 @@ const char* debug_ch_name[] = {
"mmsys",
"mmtime",
"module",
"monthcal",
"mpr",
"msacm",
"msg",

21
include/monthcal.h Normal file
View file

@ -0,0 +1,21 @@
/*
* Month calendar class extra info
*
* Copyright 1998 Eric Kohl
*/
#ifndef __WINE_MONTHCAL_H
#define __WINE_MONTHCAL_H
typedef struct tagMONTHCAL_INFO
{
DWORD dwDummy; /* just to keep the compiler happy ;-) */
} MONTHCAL_INFO, *LPMONTHCAL_INFO;
extern VOID MONTHCAL_Register (VOID);
extern VOID MONTHCAL_Unregister (VOID);
#endif /* __WINE_MONTHCAL_H */