1 #pragma unmanaged
2 #include <vector>
3 #include <windows.h>
4 #include <commctrl.h>
5 #include <tchar.h>
6 #include "OVIMEUI.h"
7 
8 #define CS_OVIME (CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS)
9 #define UICLASSNAME _T("OVIMEUI")
10 #define UISTATUSCLASSNAME _T("OVIMESTATUS")
11 #define UICOMPCLASSNAME _T("OVIMECOMP")
12 #define UICANDCLASSNAME _T("OVIMECAND")
13 #define UINOTIFYCLASSNAME _T("OVIMENOTIFY")
14 #define UICHILDEXTRASIZE 12
15 #define FIGWL_MOUSE 4
16 #define FIGWL_SVRWND 8
17 #define FIM_CAPUTURED 0x01
18 #define FIM_MOVED 0x02
19 
20 // Interfaces
21 // OVIMEUI.cpp
22 void DrawUIBorder(LPRECT);
23 void DragUI(HWND ,HWND, UINT, WPARAM, LPARAM, BOOL);
24 
25 void FillSolidRect( HDC dc, LPRECT rc, COLORREF color );
26 void Draw3DBorder(HDC hdc, LPRECT rc, COLORREF light, COLORREF dark, int width=1);
27 
28 // UIStatus.cpp
29 LRESULT APIENTRY StatusWndProc(HWND, UINT, WPARAM, LPARAM);
30 void PaintStatusWindow(HWND);
31 // UIComp.cpp
32 LRESULT APIENTRY CompWndProc(HWND, UINT, WPARAM, LPARAM);
33 void PaintCompWindow(HWND);
34 // UICand.cpp
35 LRESULT APIENTRY CandWndProc(HWND, UINT, WPARAM, LPARAM);
36 void PaintCandWindow(HWND);
37 // UINotify.cpp
38 LRESULT APIENTRY NotifyWndProc(HWND, UINT, WPARAM, LPARAM);
39 void PaintNotifyWindow(HWND);
40 
41 // Private variable
42 extern HFONT hUIFont;
43 extern HICON hMainIcon;
44 extern HWND hIMEWnd;
45 extern HWND hToolbar;
46 extern HMENU hIMESelMenu;
47 extern HINSTANCE hInst;
48 extern HINSTANCE hInstDLL;
49 extern wchar_t* lpCandStr;
50 extern int numCand;
51 extern wchar_t* lpCompStr;
52 extern wchar_t* lpNotifyStr;
53 extern int CompCursorPos;
54 extern int CompSelStart;
55 extern int CompSelEnd;
56 extern UICHILD uiCand;
57 extern UICHILD uiComp;
58 extern UICHILD uiStatus;
59 extern UICHILD uiNotify;
60 extern std::vector<wchar_t*> IC;
61 extern int CurrentIC;
62 extern bool isChinese;
63 extern bool isFull;
64