Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

softkbd.h File Reference

Go to the source code of this file.

Classes

struct  _tagSKT1CTXT
struct  _tagSKC1CTXT

Defines

#define UI_MARGIN   4
#define SKT1_XIN   3
#define SKT1_YIN   3
#define SKT1_XOUT   1
#define SKT1_YOUT   1
#define SKT1_TOTAL_ROW_NUM   5
#define SKT1_TOTAL_COLUMN_NUM   15
#define SKT1_ENTER_ROW_NUM   2
#define SKT1_XOVERLAP   2
#define SKT1_CONTEXT   0
#define SKT1_TOTAL_TYPE   (SKT1_SPACE_TYPE + 1)
#define SKT1_LETTER_WIDTH_TIMES   2
#define SKT1_BACKSPACE_WIDTH_TIMES   2
#define SKT1_TAB_WIDTH_TIMES   3
#define SKT1_CAPS_WIDTH_TIMES   4
#define SKT1_ENTER_WIDTH_TIMES   3
#define SKT1_SHIFT_WIDTH_TIMES   5
#define SKT1_CTRL_WIDTH_TIMES   3
#define SKT1_ALT_WIDTH_TIMES   3
#define SKT1_ESC_WIDTH_TIMES   3
#define SKT1_SPACE_WIDTH_TIMES   12
#define SKT1_LETTER_KEY_NUM   47
#define SKT1_BACKSPACE_INDEX   (SKT1_LETTER_KEY_NUM)
#define SKT1_BACKSPACE_KEY_NUM   1
#define SKT1_TAB_INDEX   (SKT1_BACKSPACE_INDEX + SKT1_BACKSPACE_KEY_NUM)
#define SKT1_TAB_KEY_NUM   1
#define SKT1_CAPS_INDEX   (SKT1_TAB_INDEX + SKT1_TAB_KEY_NUM)
#define SKT1_CAPS_KEY_NUM   1
#define SKT1_ENTER_INDEX   (SKT1_CAPS_INDEX + SKT1_CAPS_KEY_NUM)
#define SKT1_ENTER_KEY_NUM   1
#define SKT1_SHIFT_INDEX   (SKT1_ENTER_INDEX + SKT1_ENTER_KEY_NUM)
#define SKT1_SHIFT_KEY_NUM   2
#define SKT1_CTRL_INDEX   (SKT1_SHIFT_INDEX + SKT1_SHIFT_KEY_NUM)
#define SKT1_CTRL_KEY_NUM   2
#define SKT1_ALT_INDEX   (SKT1_CTRL_INDEX + SKT1_CTRL_KEY_NUM)
#define SKT1_ALT_KEY_NUM   2
#define SKT1_ESC_INDEX   (SKT1_ALT_INDEX + SKT1_ALT_KEY_NUM)
#define SKT1_ESC_KEY_NUM   1
#define SKT1_SPACE_INDEX   (SKT1_ESC_INDEX + SKT1_ESC_KEY_NUM)
#define SKT1_SPACE_KEY_NUM   1
#define SKT1_TOTAL_INDEX   (SKT1_SPACE_INDEX + SKT1_SPACE_KEY_NUM)
#define SKT1_TOTAL_KEY_NUM   (SKT1_TOTAL_INDEX + 1)
#define SKT1_ROW1_LETTER_NUM   14
#define SKT1_ROW2_LETTER_NUM   12
#define SKT1_ROW3_LETTER_NUM   11
#define SKT1_ROW4_LETTER_NUM   10
#define SKT1_LABEL_BMP_X   8
#define SKT1_LABEL_BMP_Y   8
#define SKT1_BACKSPACE_BMP_X   16
#define SKT1_BACKSPACE_BMP_Y   9
#define SKT1_TAB_BMP_X   16
#define SKT1_TAB_BMP_Y   9
#define SKT1_CAPS_BMP_X   22
#define SKT1_CAPS_BMP_Y   9
#define SKT1_ENTER_BMP_X   26
#define SKT1_ENTER_BMP_Y   9
#define SKT1_SHIFT_BMP_X   23
#define SKT1_SHIFT_BMP_Y   9
#define SKT1_CTRL_BMP_X   16
#define SKT1_CTRL_BMP_Y   9
#define SKT1_ESC_BMP_X   18
#define SKT1_ESC_BMP_Y   9
#define SKT1_ALT_BMP_X   16
#define SKT1_ALT_BMP_Y   9
#define SKT1_NOT_DRAG   0xFFFFFFFF
#define ROW_LETTER_C1   4
#define COL_LETTER_C1   13
#define COL2_LETTER_C1   COL_LETTER_C1
#define COL3_LETTER_C1   (COL2_LETTER_C1 - 2)
#define COL4_LETTER_C1   (COL3_LETTER_C1 - 1)
#define W_LETTER_C1   20
#define H_LETTER_C1   24
#define BORDER_C1   2
#define W_LETTER_BTN_C1   (W_LETTER_C1 + 2 * BORDER_C1)
#define H_LETTER_BTN_C1   (H_LETTER_C1 + 2 * BORDER_C1)
#define H_BOTTOM_C1   20
#define H_BOTTOM_BTN_C1   (H_BOTTOM_C1 + 2 * BORDER_C1)
#define W_BACKSP_C1   32
#define H_BACKSP_C1   H_LETTER_C1
#define W_TAB_C1   32
#define H_TAB_C1   H_LETTER_C1
#define W_CAPS_C1   38
#define H_CAPS_C1   H_LETTER_C1
#define W_ENTER_C1   38
#define H_ENTER_C1   H_LETTER_C1
#define W_SHIFT_C1   56
#define H_SHIFT_C1   H_LETTER_C1
#define W_INS_C1   34
#define H_INS_C1   H_BOTTOM_C1
#define W_DEL_C1   34
#define H_DEL_C1   H_BOTTOM_C1
#define W_SPACE_C1   168
#define H_SPACE_C1   H_BOTTOM_C1
#define W_ESC_C1   34
#define H_ESC_C1   H_BOTTOM_C1
#define X_ROW_LETTER_C1   0
#define X_ROW2_LETTER_C1   (W_TAB_C1 + 2 * BORDER_C1)
#define X_ROW3_LETTER_C1   (W_CAPS_C1 + 2 * BORDER_C1)
#define X_ROW4_LETTER_C1   (W_SHIFT_C1 + 2 * BORDER_C1)
#define X_DEL_C1   58
#define X_ESC_C1   310
#define LETTER_NUM_C1   47
#define OTHER_NUM_C1   9
#define BUTTON_NUM_C1   (LETTER_NUM_C1 + OTHER_NUM_C1)
#define WIDTH_SOFTKBD_C1
#define HEIGHT_SOFTKBD_C1   (ROW_LETTER_C1 * H_LETTER_BTN_C1 + H_BOTTOM_BTN_C1)
#define BACKSP_TYPE_C1   LETTER_NUM_C1
#define TAB_TYPE_C1   (BACKSP_TYPE_C1 + 1)
#define CAPS_TYPE_C1   (BACKSP_TYPE_C1 + 2)
#define ENTER_TYPE_C1   (BACKSP_TYPE_C1 + 3)
#define SHIFT_TYPE_C1   (BACKSP_TYPE_C1 + 4)
#define INS_TYPE_C1   (BACKSP_TYPE_C1 + 5)
#define DEL_TYPE_C1   (BACKSP_TYPE_C1 + 6)
#define SPACE_TYPE_C1   (BACKSP_TYPE_C1 + 7)
#define ESC_TYPE_C1   (BACKSP_TYPE_C1 + 8)
#define SIZEFONT_C1   12
#define SIZELABEL_C1   8
#define X_LABEL_C1   2
#define Y_LABEL_C1   2
#define X_SHIFT_CHAR_C1   10
#define Y_SHIFT_CHAR_C1   2
#define X_NONSHIFT_CHAR_C1   2
#define Y_NONSHIFT_CHAR_C1   14
#define SKC1_CONTEXT   0
#define FLAG_SHIFT_C1   0x01
#define FLAG_DRAG_C1   0x02
#define FLAG_FOCUS_C1   0x04

Typedefs

typedef _tagSKT1CTXT SKT1CTXT
typedef _tagSKT1CTXTPSKT1CTXT
typedef _tagSKT1CTXTLPSKT1CTXT
typedef _tagSKT1CTXTNPSKT1CTXT
typedef _tagSKC1CTXT SKC1CTXT
typedef _tagSKC1CTXTPSKC1CTXT
typedef _tagSKC1CTXTLPSKC1CTXT
typedef _tagSKC1CTXTNPSKC1CTXT

Enumerations

enum  SKT1_BUTTON_TYPE {
  SKT1_LETTER_TYPE, SKT1_BACKSPACE_TYPE, SKT1_TAB_TYPE, SKT1_CAPS_TYPE,
  SKT1_ENTER_TYPE, SKT1_SHIFT_TYPE, SKT1_CTRL_TYPE, SKT1_ALT_TYPE,
  SKT1_ESC_TYPE, SKT1_SPACE_TYPE
}

Functions

void GetSKT1TextMetric (LPTEXTMETRIC)
LRESULT SKWndProcT1 (HWND, UINT, WPARAM, LPARAM)
LRESULT SKWndProcC1 (HWND, UINT, WPARAM, LPARAM)
VOID SKC1DrawDragBorder (HWND, LPPOINT, LPPOINT)


Define Documentation

#define BACKSP_TYPE_C1   LETTER_NUM_C1
 

Definition at line 192 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define BORDER_C1   2
 

Definition at line 149 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), SKC1DrawConvexRect(), and SKC1InvertButton().

#define BUTTON_NUM_C1   (LETTER_NUM_C1 + OTHER_NUM_C1)
 

Definition at line 186 of file softkbd.h.

#define CAPS_TYPE_C1   (BACKSP_TYPE_C1 + 2)
 

Definition at line 194 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define COL2_LETTER_C1   COL_LETTER_C1
 

Definition at line 143 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define COL3_LETTER_C1   (COL2_LETTER_C1 - 2)
 

Definition at line 144 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define COL4_LETTER_C1   (COL3_LETTER_C1 - 1)
 

Definition at line 145 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define COL_LETTER_C1   13
 

Definition at line 142 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define DEL_TYPE_C1   (BACKSP_TYPE_C1 + 6)
 

Definition at line 198 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define ENTER_TYPE_C1   (BACKSP_TYPE_C1 + 3)
 

Definition at line 195 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define ESC_TYPE_C1   (BACKSP_TYPE_C1 + 8)
 

Definition at line 200 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define FLAG_DRAG_C1   0x02
 

Definition at line 218 of file softkbd.h.

Referenced by DestroyC1Window(), SKC1ButtonDown(), SKC1ButtonUp(), SKC1MouseMove(), and SKC1SetCursor().

#define FLAG_FOCUS_C1   0x04
 

Definition at line 219 of file softkbd.h.

Referenced by SKC1ButtonDown(), SKC1ButtonUp(), and SKC1MouseMove().

#define FLAG_SHIFT_C1   0x01
 

Definition at line 217 of file softkbd.h.

Referenced by SKC1ButtonDown(), SKC1ButtonUp(), SKC1MouseMove(), and UpdateSKC1Window().

#define H_BACKSP_C1   H_LETTER_C1
 

Definition at line 159 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_BOTTOM_BTN_C1   (H_BOTTOM_C1 + 2 * BORDER_C1)
 

Definition at line 154 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define H_BOTTOM_C1   20
 

Definition at line 153 of file softkbd.h.

#define H_CAPS_C1   H_LETTER_C1
 

Definition at line 163 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_DEL_C1   H_BOTTOM_C1
 

Definition at line 171 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_ENTER_C1   H_LETTER_C1
 

Definition at line 165 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_ESC_C1   H_BOTTOM_C1
 

Definition at line 175 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_INS_C1   H_BOTTOM_C1
 

Definition at line 169 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_LETTER_BTN_C1   (H_LETTER_C1 + 2 * BORDER_C1)
 

Definition at line 151 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), SKC1InvertButton(), and SKC1MousePosition().

#define H_LETTER_C1   24
 

Definition at line 148 of file softkbd.h.

#define H_SHIFT_C1   H_LETTER_C1
 

Definition at line 167 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define H_SPACE_C1   H_BOTTOM_C1
 

Definition at line 173 of file softkbd.h.

#define H_TAB_C1   H_LETTER_C1
 

Definition at line 161 of file softkbd.h.

Referenced by InitSKC1Bitmap().

#define HEIGHT_SOFTKBD_C1   (ROW_LETTER_C1 * H_LETTER_BTN_C1 + H_BOTTOM_BTN_C1)
 

Definition at line 190 of file softkbd.h.

Referenced by GetSoftKeyboardDimension().

#define INS_TYPE_C1   (BACKSP_TYPE_C1 + 5)
 

Definition at line 197 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define LETTER_NUM_C1   47
 

Definition at line 184 of file softkbd.h.

Referenced by InitSKC1Bitmap(), SKC1ButtonDown(), SKC1ButtonUp(), SKC1DrawLabel(), SKC1InvertButton(), SKC1MousePosition(), and UpdateSKC1Window().

#define OTHER_NUM_C1   9
 

Definition at line 185 of file softkbd.h.

#define ROW_LETTER_C1   4
 

Definition at line 141 of file softkbd.h.

#define SHIFT_TYPE_C1   (BACKSP_TYPE_C1 + 4)
 

Definition at line 196 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), SKC1ButtonDown(), SKC1ButtonUp(), SKC1InvertButton(), SKC1MouseMove(), and UpdateSKC1Window().

#define SIZEFONT_C1   12
 

Definition at line 203 of file softkbd.h.

Referenced by UpdateSKC1Window().

#define SIZELABEL_C1   8
 

Definition at line 204 of file softkbd.h.

Referenced by SKC1DrawLabel().

#define SKC1_CONTEXT   0
 

Definition at line 215 of file softkbd.h.

Referenced by CreateC1Window(), DestroyC1Window(), ShowSKC1Window(), SKC1ButtonUp(), SKC1MouseMove(), SKC1SetCursor(), SKWndProcC1(), and UpdateSKC1Window().

#define SKT1_ALT_BMP_X   16
 

Definition at line 100 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ALT_BMP_Y   9
 

Definition at line 101 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ALT_INDEX   (SKT1_CTRL_INDEX + SKT1_CTRL_KEY_NUM)
 

Definition at line 69 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), and SKT1MousePosition().

#define SKT1_ALT_KEY_NUM   2
 

Definition at line 70 of file softkbd.h.

#define SKT1_ALT_WIDTH_TIMES   3
 

Definition at line 52 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_BACKSPACE_BMP_X   16
 

Definition at line 86 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_BACKSPACE_BMP_Y   9
 

Definition at line 87 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_BACKSPACE_INDEX   (SKT1_LETTER_KEY_NUM)
 

Definition at line 57 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_BACKSPACE_KEY_NUM   1
 

Definition at line 58 of file softkbd.h.

#define SKT1_BACKSPACE_WIDTH_TIMES   2
 

Definition at line 46 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_CAPS_BMP_X   22
 

Definition at line 90 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_CAPS_BMP_Y   9
 

Definition at line 91 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_CAPS_INDEX   (SKT1_TAB_INDEX + SKT1_TAB_KEY_NUM)
 

Definition at line 61 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), and SKT1MousePosition().

#define SKT1_CAPS_KEY_NUM   1
 

Definition at line 62 of file softkbd.h.

#define SKT1_CAPS_WIDTH_TIMES   4
 

Definition at line 48 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_CONTEXT   0
 

Definition at line 28 of file softkbd.h.

Referenced by CreateT1Window(), DestroyT1Window(), SetSKT1Data(), SKT1ButtonUp(), SKT1MouseMove(), SKT1SetCursor(), SKWndProcT1(), and UpdateSKT1Window().

#define SKT1_CTRL_BMP_X   16
 

Definition at line 96 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_CTRL_BMP_Y   9
 

Definition at line 97 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_CTRL_INDEX   (SKT1_SHIFT_INDEX + SKT1_SHIFT_KEY_NUM)
 

Definition at line 67 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), and SKT1MousePosition().

#define SKT1_CTRL_KEY_NUM   2
 

Definition at line 68 of file softkbd.h.

#define SKT1_CTRL_WIDTH_TIMES   3
 

Definition at line 51 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_ENTER_BMP_X   26
 

Definition at line 92 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ENTER_BMP_Y   9
 

Definition at line 93 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ENTER_INDEX   (SKT1_CAPS_INDEX + SKT1_CAPS_KEY_NUM)
 

Definition at line 63 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_ENTER_KEY_NUM   1
 

Definition at line 64 of file softkbd.h.

#define SKT1_ENTER_ROW_NUM   2
 

Definition at line 25 of file softkbd.h.

#define SKT1_ENTER_WIDTH_TIMES   3
 

Definition at line 49 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_ESC_BMP_X   18
 

Definition at line 98 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ESC_BMP_Y   9
 

Definition at line 99 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_ESC_INDEX   (SKT1_ALT_INDEX + SKT1_ALT_KEY_NUM)
 

Definition at line 71 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_ESC_KEY_NUM   1
 

Definition at line 72 of file softkbd.h.

#define SKT1_ESC_WIDTH_TIMES   3
 

Definition at line 53 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_LABEL_BMP_X   8
 

Definition at line 83 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), InitSKT1ButtonPos(), SetSKT1Data(), and SKT1DrawLabel().

#define SKT1_LABEL_BMP_Y   8
 

Definition at line 84 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), InitSKT1ButtonPos(), SetSKT1Data(), and SKT1DrawLabel().

#define SKT1_LETTER_KEY_NUM   47
 

Definition at line 56 of file softkbd.h.

Referenced by InitSKT1Bitmap(), SetSKT1Data(), SKT1DrawLabel(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_LETTER_WIDTH_TIMES   2
 

Definition at line 45 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_NOT_DRAG   0xFFFFFFFF
 

Definition at line 117 of file softkbd.h.

Referenced by CreateT1Window(), DestroyT1Window(), SKT1ButtonUp(), SKT1MouseMove(), and SKT1SetCursor().

#define SKT1_ROW1_LETTER_NUM   14
 

Definition at line 78 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_ROW2_LETTER_NUM   12
 

Definition at line 79 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_ROW3_LETTER_NUM   11
 

Definition at line 80 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_ROW4_LETTER_NUM   10
 

Definition at line 81 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_SHIFT_BMP_X   23
 

Definition at line 94 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_SHIFT_BMP_Y   9
 

Definition at line 95 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_SHIFT_INDEX   (SKT1_ENTER_INDEX + SKT1_ENTER_KEY_NUM)
 

Definition at line 65 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), and SKT1MousePosition().

#define SKT1_SHIFT_KEY_NUM   2
 

Definition at line 66 of file softkbd.h.

#define SKT1_SHIFT_WIDTH_TIMES   5
 

Definition at line 50 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_SPACE_INDEX   (SKT1_ESC_INDEX + SKT1_ESC_KEY_NUM)
 

Definition at line 73 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_SPACE_KEY_NUM   1
 

Definition at line 74 of file softkbd.h.

#define SKT1_SPACE_WIDTH_TIMES   12
 

Definition at line 54 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_TAB_BMP_X   16
 

Definition at line 88 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_TAB_BMP_Y   9
 

Definition at line 89 of file softkbd.h.

Referenced by InitSKT1Bitmap().

#define SKT1_TAB_INDEX   (SKT1_BACKSPACE_INDEX + SKT1_BACKSPACE_KEY_NUM)
 

Definition at line 59 of file softkbd.h.

Referenced by InitSKT1Bitmap(), InitSKT1ButtonPos(), SKT1InvertButton(), SKT1IsValidButton(), and SKT1MousePosition().

#define SKT1_TAB_KEY_NUM   1
 

Definition at line 60 of file softkbd.h.

#define SKT1_TAB_WIDTH_TIMES   3
 

Definition at line 47 of file softkbd.h.

Referenced by InitSKT1ButtonPos().

#define SKT1_TOTAL_COLUMN_NUM   15
 

Definition at line 24 of file softkbd.h.

Referenced by GetSoftKeyboardDimension().

#define SKT1_TOTAL_INDEX   (SKT1_SPACE_INDEX + SKT1_SPACE_KEY_NUM)
 

Definition at line 75 of file softkbd.h.

Referenced by CreateT1Window(), SKT1ButtonUp(), SKT1InvertButton(), SKT1MousePosition(), SKT1SetCursor(), and UpdateSKT1Window().

#define SKT1_TOTAL_KEY_NUM   (SKT1_TOTAL_INDEX + 1)
 

Definition at line 76 of file softkbd.h.

#define SKT1_TOTAL_ROW_NUM   5
 

Definition at line 23 of file softkbd.h.

Referenced by GetSoftKeyboardDimension().

#define SKT1_TOTAL_TYPE   (SKT1_SPACE_TYPE + 1)
 

Definition at line 43 of file softkbd.h.

#define SKT1_XIN   3
 

Definition at line 19 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), InitSKT1ButtonPos(), and SKT1DrawConvexRect().

#define SKT1_XOUT   1
 

Definition at line 21 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), and InitSKT1ButtonPos().

#define SKT1_XOVERLAP   2
 

Definition at line 26 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), InitSKT1ButtonPos(), and SetSKT1Data().

#define SKT1_YIN   3
 

Definition at line 20 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), InitSKT1ButtonPos(), and SKT1DrawConvexRect().

#define SKT1_YOUT   1
 

Definition at line 22 of file softkbd.h.

Referenced by GetSoftKeyboardDimension(), and InitSKT1ButtonPos().

#define SPACE_TYPE_C1   (BACKSP_TYPE_C1 + 7)
 

Definition at line 199 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define TAB_TYPE_C1   (BACKSP_TYPE_C1 + 1)
 

Definition at line 193 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define UI_MARGIN   4
 

Definition at line 15 of file softkbd.h.

Referenced by ImmCreateSoftKeyboard().

#define W_BACKSP_C1   32
 

Definition at line 158 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_CAPS_C1   38
 

Definition at line 162 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_DEL_C1   34
 

Definition at line 170 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), and SKC1InvertButton().

#define W_ENTER_C1   38
 

Definition at line 164 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_ESC_C1   34
 

Definition at line 174 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_INS_C1   34
 

Definition at line 168 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_LETTER_BTN_C1   (W_LETTER_C1 + 2 * BORDER_C1)
 

Definition at line 150 of file softkbd.h.

Referenced by InitSKC1Bitmap(), InitSKC1ButtonPos(), SKC1InvertButton(), and SKC1MousePosition().

#define W_LETTER_C1   20
 

Definition at line 147 of file softkbd.h.

#define W_SHIFT_C1   56
 

Definition at line 166 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_SPACE_C1   168
 

Definition at line 172 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define W_TAB_C1   32
 

Definition at line 160 of file softkbd.h.

Referenced by InitSKC1Bitmap(), and SKC1InvertButton().

#define WIDTH_SOFTKBD_C1
 

Value:

Definition at line 188 of file softkbd.h.

Referenced by GetSoftKeyboardDimension().

#define X_DEL_C1   58
 

Definition at line 181 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_ESC_C1   310
 

Definition at line 182 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_LABEL_C1   2
 

Definition at line 206 of file softkbd.h.

Referenced by SKC1DrawLabel().

#define X_NONSHIFT_CHAR_C1   2
 

Definition at line 210 of file softkbd.h.

Referenced by UpdateSKC1Window().

#define X_ROW2_LETTER_C1   (W_TAB_C1 + 2 * BORDER_C1)
 

Definition at line 178 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_ROW3_LETTER_C1   (W_CAPS_C1 + 2 * BORDER_C1)
 

Definition at line 179 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_ROW4_LETTER_C1   (W_SHIFT_C1 + 2 * BORDER_C1)
 

Definition at line 180 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_ROW_LETTER_C1   0
 

Definition at line 177 of file softkbd.h.

Referenced by InitSKC1ButtonPos().

#define X_SHIFT_CHAR_C1   10
 

Definition at line 208 of file softkbd.h.

Referenced by UpdateSKC1Window().

#define Y_LABEL_C1   2
 

Definition at line 207 of file softkbd.h.

Referenced by SKC1DrawLabel().

#define Y_NONSHIFT_CHAR_C1   14
 

Definition at line 211 of file softkbd.h.

Referenced by UpdateSKC1Window().

#define Y_SHIFT_CHAR_C1   2
 

Definition at line 209 of file softkbd.h.

Referenced by UpdateSKC1Window().


Typedef Documentation

typedef struct _tagSKC1CTXT * LPSKC1CTXT
 

Referenced by SKWndProcC1().

typedef struct _tagSKT1CTXT * LPSKT1CTXT
 

Referenced by InitSKT1ButtonPos().

typedef struct _tagSKC1CTXT * NPSKC1CTXT
 

typedef struct _tagSKT1CTXT * NPSKT1CTXT
 

typedef struct _tagSKC1CTXT * PSKC1CTXT
 

Referenced by CreateC1Window().

typedef struct _tagSKT1CTXT * PSKT1CTXT
 

typedef struct _tagSKC1CTXT SKC1CTXT
 

Referenced by CreateC1Window().

typedef struct _tagSKT1CTXT SKT1CTXT
 

Referenced by CreateT1Window().


Enumeration Type Documentation

enum SKT1_BUTTON_TYPE
 

Enumeration values:
SKT1_LETTER_TYPE 
SKT1_BACKSPACE_TYPE 
SKT1_TAB_TYPE 
SKT1_CAPS_TYPE 
SKT1_ENTER_TYPE 
SKT1_SHIFT_TYPE 
SKT1_CTRL_TYPE 
SKT1_ALT_TYPE 
SKT1_ESC_TYPE 
SKT1_SPACE_TYPE 

Definition at line 30 of file softkbd.h.


Function Documentation

void GetSKT1TextMetric LPTEXTMETRIC   ) 
 

Definition at line 50 of file sftkbdt1.c.

References GetDC, lfSKT1Font, NULL, and ReleaseDC().

Referenced by GetSoftKeyboardDimension(), and InitSKT1ButtonPos().

00052 { 00053 HDC hDC; 00054 HFONT hOldFont; 00055 SIZE szDbcs; 00056 const WCHAR wcDbcs = 0x4e11; 00057 00058 hDC = GetDC((HWND)NULL); 00059 00060 // get the 9 pixels font 00061 RtlZeroMemory(&lfSKT1Font, sizeof lfSKT1Font); 00062 lfSKT1Font.lfHeight = -12; 00063 lfSKT1Font.lfWeight = FW_NORMAL; 00064 00065 lfSKT1Font.lfCharSet = CHINESEBIG5_CHARSET; 00066 00067 lfSKT1Font.lfOutPrecision = OUT_TT_ONLY_PRECIS; 00068 lfSKT1Font.lfClipPrecision = CLIP_DEFAULT_PRECIS; 00069 lfSKT1Font.lfQuality = PROOF_QUALITY; 00070 lfSKT1Font.lfPitchAndFamily = FIXED_PITCH|FF_MODERN; 00071 00072 hOldFont = (HFONT)SelectObject(hDC, CreateFontIndirect(&lfSKT1Font)); 00073 00074 GetTextMetrics(hDC, lptm); 00075 00076 /* 00077 * NT5: Dirty hack for "Lucida Console" which was "font linked" on NT5, and 00078 * GetTextMetrics API does not return correct text metrics. 00079 */ 00080 if (GetTextExtentPoint32(hDC, &wcDbcs, 1, &szDbcs) && lptm->tmMaxCharWidth < szDbcs.cx) { 00081 TAGMSG2(DBGTAG_IMM, "GetSKT1TextMetric: tmMaxCharWidth(%d) is smaller than real width(%d).", 00082 lptm->tmMaxCharWidth, szDbcs.cx); 00083 lptm->tmMaxCharWidth = szDbcs.cx; 00084 } 00085 00086 DeleteObject(SelectObject(hDC, hOldFont)); 00087 00088 ReleaseDC((HWND)NULL, hDC); 00089 00090 return; 00091 }

VOID SKC1DrawDragBorder HWND  ,
LPPOINT  ,
LPPOINT 
 

Definition at line 601 of file sftkbdc1.c.

References GetAllMonitorSize(), GetSystemMetrics(), GetWindowRect(), hWnd, L, NULL, and VOID().

Referenced by DestroyC1Window(), SKC1ButtonDown(), SKC1ButtonUp(), and SKC1MouseMove().

00605 { 00606 HDC hDC; 00607 RECT rcWnd, rcWorkArea; 00608 int cxBorder, cyBorder; 00609 int x, y; 00610 extern void GetAllMonitorSize(LPRECT lprc); 00611 00612 // get rectangle of work area 00613 GetAllMonitorSize(&rcWorkArea); 00614 00615 cxBorder = GetSystemMetrics(SM_CXBORDER); // width of border 00616 cyBorder = GetSystemMetrics(SM_CYBORDER); // height of border 00617 00618 // create DISPLAY dc to draw track 00619 hDC = CreateDC(L"DISPLAY", NULL, NULL, NULL); 00620 SelectObject(hDC, GetStockObject(GRAY_BRUSH)); 00621 00622 // start point (left,top) 00623 x = lpptCursor->x - lpptOffset->x; 00624 y = lpptCursor->y - lpptOffset->y; 00625 00626 // check for the min boundary of the display 00627 if (x < rcWorkArea.left) { 00628 x = rcWorkArea.left; 00629 } 00630 00631 if (y < rcWorkArea.top) { 00632 y = rcWorkArea.top; 00633 } 00634 00635 // check for the max boundary of the display 00636 GetWindowRect(hWnd, &rcWnd); 00637 00638 if (x + rcWnd.right - rcWnd.left > rcWorkArea.right) { 00639 x = rcWorkArea.right - (rcWnd.right - rcWnd.left); 00640 } 00641 00642 if (y + rcWnd.bottom - rcWnd.top > rcWorkArea.bottom) { 00643 y = rcWorkArea.bottom - (rcWnd.bottom - rcWnd.top); 00644 } 00645 00646 // adjust Offset 00647 lpptOffset->x = lpptCursor->x - x; 00648 lpptOffset->y = lpptCursor->y - y; 00649 00650 // draw rectangle 00651 PatBlt(hDC, x, y, rcWnd.right - rcWnd.left - cxBorder, cyBorder, PATINVERT); 00652 PatBlt(hDC, x, y + cyBorder, cxBorder, rcWnd.bottom - rcWnd.top - cyBorder, PATINVERT); 00653 PatBlt(hDC, x + cxBorder, y + rcWnd.bottom - rcWnd.top, rcWnd.right - 00654 rcWnd.left - cxBorder, -cyBorder, PATINVERT); 00655 PatBlt(hDC, x + rcWnd.right - rcWnd.left, y, - cxBorder, rcWnd.bottom - 00656 rcWnd.top - cyBorder, PATINVERT); 00657 00658 // delete DISPLAY DC 00659 DeleteDC(hDC); 00660 00661 return; 00662 }

LRESULT SKWndProcC1 HWND  ,
UINT  ,
WPARAM  ,
LPARAM 
 

Definition at line 1042 of file sftkbdc1.c.

References BeginPaint, CreateC1Window(), DefWindowProc(), DestroyC1Window(), FALSE, GetDC, GetWindowLongPtr(), GetWindowRect(), L, _tagSKC1CTXT::lfCharSet, LPSKC1CTXT, NULL, ReleaseDC(), SetWindowPos, ShowSKC1Window(), SKC1_CONTEXT, SKC1ButtonUp(), SKC1MouseMove(), SKC1SetCursor(), UINT, UpdateSKC1Window(), and _tagSKC1CTXT::uSubtype.

Referenced by RegisterSoftKeyboard().

01047 { 01048 LRESULT lRet = 0L; 01049 01050 switch (uMsg) { 01051 case WM_CREATE: 01052 lRet = CreateC1Window(hSKWnd); 01053 break; 01054 01055 case WM_DESTROY: 01056 DestroyC1Window(hSKWnd); 01057 break; 01058 01059 case WM_PAINT: 01060 { 01061 HDC hDC; 01062 PAINTSTRUCT ps; 01063 01064 hDC = BeginPaint(hSKWnd, &ps); 01065 ShowSKC1Window(hDC, hSKWnd); 01066 EndPaint(hSKWnd, &ps); 01067 } 01068 break; 01069 01070 case WM_MOUSEACTIVATE: 01071 lRet = MA_NOACTIVATE; 01072 break; 01073 01074 case WM_SETCURSOR: 01075 if (!SKC1SetCursor(hSKWnd, lParam)) { 01076 lRet = DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01077 } 01078 break; 01079 01080 case WM_MOUSEMOVE: 01081 if (!SKC1MouseMove(hSKWnd, wParam, lParam)) { 01082 lRet = DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01083 } 01084 break; 01085 01086 case WM_LBUTTONUP: 01087 if (!SKC1ButtonUp(hSKWnd, wParam, lParam)) { 01088 lRet = DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01089 } 01090 break; 01091 01092 case WM_IME_CONTROL: 01093 switch (wParam) { 01094 case IMC_GETSOFTKBDFONT: 01095 { 01096 HDC hDC; 01097 LOGFONT lfFont; 01098 01099 hDC = GetDC(hSKWnd); 01100 GetObject(GetStockObject(DEFAULT_GUI_FONT), 01101 sizeof(lfFont), &lfFont); 01102 ReleaseDC(hSKWnd, hDC); 01103 *(LPLOGFONT)lParam = lfFont; 01104 } 01105 break; 01106 01107 case IMC_SETSOFTKBDFONT: 01108 { 01109 LOGFONT lfFont; 01110 01111 GetObject(GetStockObject(DEFAULT_GUI_FONT), 01112 sizeof(lfFont), &lfFont); 01113 01114 // in differet version of Windows 01115 if (lfFont.lfCharSet != ((LPLOGFONT)lParam)->lfCharSet) { 01116 HGLOBAL hSKC1Ctxt; 01117 LPSKC1CTXT lpSKC1Ctxt; 01118 01119 hSKC1Ctxt = (HGLOBAL)GetWindowLongPtr(hSKWnd, 01120 SKC1_CONTEXT); 01121 if (!hSKC1Ctxt) { 01122 return 1; 01123 } 01124 01125 lpSKC1Ctxt = (LPSKC1CTXT)GlobalLock(hSKC1Ctxt); 01126 if (!lpSKC1Ctxt) { 01127 return 1; 01128 } 01129 01130 lpSKC1Ctxt->lfCharSet = 01131 ((LPLOGFONT)lParam)->lfCharSet; 01132 01133 GlobalUnlock(hSKC1Ctxt); 01134 } 01135 } 01136 break; 01137 01138 case IMC_GETSOFTKBDPOS: 01139 { 01140 RECT rcWnd; 01141 01142 GetWindowRect(hSKWnd, &rcWnd); 01143 01144 return MAKELRESULT(rcWnd.left, rcWnd.top); 01145 } 01146 break; 01147 01148 case IMC_SETSOFTKBDPOS: 01149 { 01150 SetWindowPos(hSKWnd, NULL, 01151 ((LPPOINTS)lParam)->x, ((LPPOINTS)lParam)->y, 01152 0, 0, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER); 01153 return (0); 01154 } 01155 break; 01156 01157 case IMC_SETSOFTKBDDATA: 01158 if (UpdateSKC1Window(hSKWnd, (LPSOFTKBDDATA)lParam)) { 01159 InvalidateRect(hSKWnd, NULL, FALSE); 01160 } else lRet = -1L; 01161 break; 01162 01163 case IMC_GETSOFTKBDSUBTYPE: 01164 case IMC_SETSOFTKBDSUBTYPE: 01165 { 01166 HGLOBAL hSKC1Ctxt; 01167 PSKC1CTXT pSKC1Ctxt; 01168 01169 lRet = -1L; 01170 01171 hSKC1Ctxt = (HGLOBAL)GetWindowLongPtr(hSKWnd, SKC1_CONTEXT); 01172 if (!hSKC1Ctxt) break; 01173 01174 pSKC1Ctxt = (PSKC1CTXT)GlobalLock(hSKC1Ctxt); 01175 if (!pSKC1Ctxt) break; 01176 01177 if (wParam == IMC_GETSOFTKBDSUBTYPE) { 01178 lRet = pSKC1Ctxt->uSubtype; 01179 } else { 01180 lRet = pSKC1Ctxt->uSubtype; 01181 pSKC1Ctxt->uSubtype = (UINT)lParam; 01182 } 01183 01184 GlobalUnlock(hSKC1Ctxt); 01185 } 01186 break; 01187 } 01188 break; 01189 01190 default: 01191 lRet = DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01192 } 01193 01194 return (lRet); 01195 }

LRESULT SKWndProcT1 HWND  ,
UINT  ,
WPARAM  ,
LPARAM 
 

Definition at line 1258 of file sftkbdt1.c.

References BeginPaint, BOOL, BYTE, CreateT1Window(), DefWindowProc(), DestroyT1Window(), FALSE, GetParent(), GetWindowLongPtr(), GetWindowRect(), ImmLockIMC(), ImmUnlockIMC(), L, _tagSKT1CTXT::lfCharSet, lfSKT1Font, NULL, PostMessage(), SetSKT1Data(), SetWindowPos, SKT1_CONTEXT, SKT1ButtonUp(), SKT1MouseMove(), SKT1SetCursor(), TRUE, UINT, UpdateSKT1Window(), and _tagSKT1CTXT::uSubType.

Referenced by RegisterSoftKeyboard().

01263 { 01264 switch (uMsg) { 01265 case WM_CREATE: 01266 return CreateT1Window(hSKWnd); 01267 case WM_DESTROY: 01268 DestroyT1Window(hSKWnd); 01269 break; 01270 case WM_PAINT: 01271 { 01272 HDC hDC; 01273 PAINTSTRUCT ps; 01274 01275 hDC = BeginPaint(hSKWnd, &ps); 01276 UpdateSKT1Window(hDC, hSKWnd); 01277 EndPaint(hSKWnd, &ps); 01278 } 01279 break; 01280 case WM_SETCURSOR: 01281 if (!SKT1SetCursor(hSKWnd, lParam)) { 01282 return DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01283 } 01284 break; 01285 case WM_MOUSEMOVE: 01286 if (!SKT1MouseMove(hSKWnd)) { 01287 return DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01288 } 01289 break; 01290 case WM_LBUTTONUP: 01291 if (!SKT1ButtonUp(hSKWnd)) { 01292 return DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01293 } 01294 break; 01295 case WM_MOUSEACTIVATE: 01296 return (MA_NOACTIVATE); 01297 case WM_SHOWWINDOW: 01298 if (lParam != 0) { 01299 } else if ((BOOL)wParam == TRUE) { 01300 } else { 01301 // we want to hide the soft keyboard on mouse button down 01302 SKT1ButtonUp(hSKWnd); 01303 } 01304 01305 return DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01306 01307 case WM_IME_CONTROL: 01308 switch (wParam) { 01309 case IMC_GETSOFTKBDFONT: 01310 { 01311 HGLOBAL hSKT1Ctxt; 01312 LPSKT1CTXT lpSKT1Ctxt; 01313 BYTE lfCharSet; 01314 01315 hSKT1Ctxt = (HGLOBAL)GetWindowLongPtr(hSKWnd, SKT1_CONTEXT); 01316 if (!hSKT1Ctxt) { 01317 return (1); 01318 } 01319 01320 lpSKT1Ctxt = (LPSKT1CTXT)GlobalLock(hSKT1Ctxt); 01321 if (!lpSKT1Ctxt) { 01322 return (1); 01323 } 01324 01325 lfCharSet = (BYTE)lpSKT1Ctxt->lfCharSet; 01326 01327 GlobalUnlock(hSKT1Ctxt); 01328 01329 *(LPLOGFONT)lParam = lfSKT1Font; 01330 01331 if (lfCharSet != DEFAULT_CHARSET) { 01332 ((LPLOGFONT)lParam)->lfCharSet = lfCharSet; 01333 } 01334 01335 return (0); 01336 } 01337 break; 01338 case IMC_SETSOFTKBDFONT: 01339 { 01340 // in differet version of Windows 01341 if (lfSKT1Font.lfCharSet != ((LPLOGFONT)lParam)->lfCharSet) { 01342 HGLOBAL hSKT1Ctxt; 01343 LPSKT1CTXT lpSKT1Ctxt; 01344 01345 hSKT1Ctxt = (HGLOBAL)GetWindowLongPtr(hSKWnd, 01346 SKT1_CONTEXT); 01347 if (!hSKT1Ctxt) { 01348 return 1; 01349 } 01350 01351 lpSKT1Ctxt = (LPSKT1CTXT)GlobalLock(hSKT1Ctxt); 01352 if (!lpSKT1Ctxt) { 01353 return 1; 01354 } 01355 01356 lpSKT1Ctxt->lfCharSet = ((LPLOGFONT)lParam)->lfCharSet; 01357 01358 GlobalUnlock(hSKT1Ctxt); 01359 } 01360 } 01361 break; 01362 case IMC_GETSOFTKBDPOS: 01363 { 01364 RECT rcWnd; 01365 01366 GetWindowRect(hSKWnd, &rcWnd); 01367 01368 return MAKELRESULT(rcWnd.left, rcWnd.top); 01369 } 01370 break; 01371 case IMC_SETSOFTKBDPOS: 01372 { 01373 POINT ptSoftKbdPos; 01374 HWND hUIWnd; 01375 HIMC hIMC; 01376 LPINPUTCONTEXT lpIMC; 01377 01378 ptSoftKbdPos.x = ((LPPOINTS)lParam)->x; 01379 ptSoftKbdPos.y = ((LPPOINTS)lParam)->y; 01380 01381 SetWindowPos(hSKWnd, NULL, 01382 ptSoftKbdPos.x, ptSoftKbdPos.y, 01383 0, 0, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER); 01384 01385 // Here we want to get - the owner or parent window 01386 hUIWnd = GetParent(hSKWnd); 01387 01388 if (!hUIWnd) { 01389 return (1); 01390 } 01391 01392 hIMC = (HIMC) GetWindowLongPtr(hUIWnd, IMMGWLP_IMC); 01393 01394 if (!hIMC) { 01395 return (1); 01396 } 01397 01398 lpIMC = (LPINPUTCONTEXT)ImmLockIMC(hIMC); 01399 01400 if (!lpIMC) { 01401 return (1); 01402 } 01403 01404 lpIMC->ptSoftKbdPos = ptSoftKbdPos; 01405 01406 ImmUnlockIMC(hIMC); 01407 01408 return (0); 01409 } 01410 break; 01411 case IMC_SETSOFTKBDDATA: 01412 { 01413 LRESULT lRet; 01414 01415 lRet = SetSKT1Data(hSKWnd, (LPSOFTKBDDATA)lParam); 01416 if (!lRet) { 01417 InvalidateRect(hSKWnd, NULL, FALSE); 01418 PostMessage(hSKWnd, WM_PAINT, 0, 0); 01419 } 01420 return (lRet); 01421 } 01422 break; 01423 case IMC_GETSOFTKBDSUBTYPE: 01424 case IMC_SETSOFTKBDSUBTYPE: 01425 { 01426 HGLOBAL hSKT1Ctxt; 01427 LPSKT1CTXT lpSKT1Ctxt; 01428 LRESULT lRet; 01429 01430 lRet = -1; 01431 01432 hSKT1Ctxt = (HGLOBAL)GetWindowLongPtr(hSKWnd, SKT1_CONTEXT); 01433 if (!hSKT1Ctxt) { 01434 return (lRet); 01435 } 01436 01437 lpSKT1Ctxt = (LPSKT1CTXT)GlobalLock(hSKT1Ctxt); 01438 if (!lpSKT1Ctxt) { 01439 return (lRet); 01440 } 01441 01442 if (wParam == IMC_GETSOFTKBDSUBTYPE) { 01443 lRet = lpSKT1Ctxt->uSubType; 01444 } else if (wParam == IMC_SETSOFTKBDSUBTYPE) { 01445 lRet = lpSKT1Ctxt->uSubType; 01446 lpSKT1Ctxt->uSubType = (UINT)lParam; 01447 } else { 01448 lRet = -1; 01449 } 01450 01451 GlobalUnlock(hSKT1Ctxt); 01452 return (lRet); 01453 } 01454 break; 01455 default: 01456 break; 01457 } 01458 break; 01459 default: 01460 return DefWindowProc(hSKWnd, uMsg, wParam, lParam); 01461 } 01462 01463 return (0L); 01464 }


Generated on Sat May 15 19:45:39 2004 for test by doxygen 1.3.7