source: trunk/src/comctl32/CCBase.h@ 5416

Last change on this file since 5416 was 5416, checked in by sandervl, 24 years ago

Resync with Wine + previous merge fixes

File size: 2.7 KB
Line 
1/* $Id: CCBase.h,v 1.12 2001-03-31 13:25:25 sandervl Exp $ */
2/*
3 * COMCTL32 Base Functions and Macros for all Controls
4 *
5 * Copyright 2000 Christoph Bratschi (cbratschi@datacomm.ch)
6 */
7#ifndef __CCBASE_H
8#define __CCBASE_H
9
10#include <heapstring.h>
11
12#define getInfoPtr(hwnd) ((COMCTL32_HEADER*)GetWindowLongA(hwnd,0))
13#define setInfoPtr(hwnd,infoPtr) (SetWindowLongA(hwnd,0,(DWORD)infoPtr))
14
15typedef struct
16{
17 DWORD dwSize; //whole structure size
18 INT iVersion; //version
19 BOOL fUnicode; //Unicode flag
20 UINT uNotifyFormat; //notify format
21 HWND hwndNotify; //notify window
22} COMCTL32_HEADER;
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28PVOID initControl(HWND hwnd,DWORD dwSize);
29VOID doneControl(HWND hwnd);
30
31LRESULT defComCtl32ProcA(HWND hwnd,UINT Msg,WPARAM wParam,LPARAM lParam);
32LRESULT defComCtl32ProcW(HWND hwnd,UINT Msg,WPARAM wParam,LPARAM lParam);
33
34#ifdef __cplusplus
35}
36#endif
37
38BOOL isUnicodeNotify(COMCTL32_HEADER *infoPtr);
39#ifdef __cplusplus
40BOOL isUnicodeNotify(HWND hwnd);
41#endif
42
43HWND getNotifyWindow(COMCTL32_HEADER *infoPtr);
44
45LRESULT sendNotify(HWND hwnd,UINT code);
46#ifdef __cplusplus
47LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code);
48LRESULT sendNotify(HWND hwnd,UINT code,LPNMHDR nmhdr);
49LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code,LPNMHDR nmhdr);
50#endif
51LRESULT sendNotifyFormat(HWND hwnd,HWND hwndFrom,LPARAM command);
52LRESULT sendCommand(HWND hwnd,UINT wNotifyCode);
53LRESULT sendHScroll(HWND hwnd,UINT wNotifyCode);
54LRESULT sendVScroll(HWND hwnd,UINT wNotifyCode);
55
56HWND createToolTip(HWND hwnd,UINT flags,BOOL addtool);
57VOID destroyToolTip(HWND hwndToolTip);
58
59VOID drawStubControl(HWND hwnd,HDC hdc);
60
61#define lstrlenAW(text,unicode) (unicode ? lstrlenW((WCHAR*)text):lstrlenA((CHAR*)text))
62
63#define lstrcpyAW(textA,unicodeA,textB,unicodeB) (unicodeA ? (unicodeB ? lstrcpyW((WCHAR*)textA,(WCHAR*)textB):lstrcpyAtoW((WCHAR*)textA,(CHAR*)textB)):(unicodeB ? lstrcpyWtoA((CHAR*)textA,(WCHAR*)textB):lstrcpyA((CHAR*)textA,(CHAR*)textB)))
64
65INT lstrcmpAtoW(CHAR *textA,WCHAR *textW);
66INT lstrcmpAW(WCHAR *textA,BOOL textaunicode,WCHAR *textB,BOOL textbunicode);
67
68
69//read note in CCBase.cpp!!
70INT lstrcmpniA(CHAR *textA,CHAR *textB,INT len);
71INT lstrcmpniAtoW(CHAR *textA,WCHAR* textB,INT len);
72////INT lstrcmpniW(WCHAR *textA,WCHAR *textB,INT len);
73INT lstrcmpniAW(WCHAR *textA,BOOL unicodeA,WCHAR *textB,BOOL unicodeB,INT len);
74
75CHAR* lstrstrA(CHAR *text,CHAR *subtext);
76WCHAR* lstrstrW(WCHAR *text,WCHAR *subtext);
77CHAR* lstrstrAtoW(CHAR *text,WCHAR *subtext);
78WCHAR* lstrstrWtoA(WCHAR *text,CHAR *subtext);
79WCHAR* lstrstrAW(WCHAR *text,BOOL textunicode,WCHAR *subtext,BOOL subtextunicode);
80
81#define TICKDIFF(start,end) ((end > start) ? (end-start):(0xFFFFFFFF-start+end))
82
83
84#endif
Note: See TracBrowser for help on using the repository browser.