source: trunk/src/comctl32/nativefont.cpp@ 3145

Last change on this file since 3145 was 3145, checked in by cbratschi, 25 years ago

trackbar buddy fix, tooltip enhancements

File size: 2.1 KB
Line 
1/* $Id: nativefont.cpp,v 1.2 2000-03-17 17:13:23 cbratschi Exp $ */
2/*
3 * Native Font control
4 *
5 * Copyright 1998, 1999 Eric Kohl
6 * Copyright 1999 Achim Hasenmueller
7 *
8 * NOTES
9 * This is just a dummy control. An author is needed! Any volunteers?
10 * I will only improve this control once in a while.
11 * Eric <ekohl@abo.rhein-zeitung.de>
12 *
13 * TODO:
14 * - All messages.
15 * - All notifications.
16 */
17
18#include "winbase.h"
19#include "commctrl.h"
20#include "ccbase.h"
21#include "nativefont.h"
22
23#define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO*)getInfoPtr(hwnd))
24
25static LRESULT
26NATIVEFONT_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
27{
28 NATIVEFONT_INFO *infoPtr;
29
30 /* allocate memory for info structure */
31 infoPtr = (NATIVEFONT_INFO*)initControl(hwnd,sizeof(NATIVEFONT_INFO));
32
33
34 /* initialize info structure */
35
36
37 return 0;
38}
39
40
41static LRESULT
42NATIVEFONT_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
43{
44 NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr (hwnd);
45
46
47
48
49 /* free comboex info data */
50 doneControl(hwnd);
51
52 return 0;
53}
54
55
56
57static LRESULT WINAPI
58NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
59{
60 switch (uMsg)
61 {
62
63 case WM_CREATE:
64 return NATIVEFONT_Create (hwnd, wParam, lParam);
65
66 case WM_DESTROY:
67 return NATIVEFONT_Destroy (hwnd, wParam, lParam);
68
69 default:
70// ERR (nativefont, "unknown msg %04x wp=%08x lp=%08lx\n",
71// uMsg, wParam, lParam);
72 return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
73 }
74 return 0;
75}
76
77
78VOID
79NATIVEFONT_Register (VOID)
80{
81 WNDCLASSA wndClass;
82
83 ZeroMemory (&wndClass, sizeof(WNDCLASSA));
84 wndClass.style = CS_GLOBALCLASS;
85 wndClass.lpfnWndProc = (WNDPROC)NATIVEFONT_WindowProc;
86 wndClass.cbClsExtra = 0;
87 wndClass.cbWndExtra = sizeof(NATIVEFONT_INFO *);
88 wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
89 wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
90 wndClass.lpszClassName = WC_NATIVEFONTCTLA;
91
92 RegisterClassA (&wndClass);
93}
94
95
96VOID
97NATIVEFONT_Unregister (VOID)
98{
99 UnregisterClassA (WC_NATIVEFONTCTLA, (HINSTANCE)NULL);
100}
101
Note: See TracBrowser for help on using the repository browser.