#ifndef _CNTR_H_ #define _CNTR_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tchar.h" #include "../../../include/l_bitmap.h" #include "../../../include/LTtmb.h" #include "resource.h" #include "../../../include/ltivw.h" #define RECTWIDTH(lpRect) (((LPRECT) lpRect)->right - ((LPRECT) lpRect)->left) #define RECTHEIGHT(lpRect) (((LPRECT) lpRect)->bottom - ((LPRECT) lpRect)->top) #define SETDATA(hwnd, h) SetWindowLong(hwnd, GWL_USERDATA, (LONG)(L_INT)(HANDLE)(h)) #define LOCKDATA(hwnd) ((LPDATA) GlobalLock((HANDLE)(L_INT)GetWindowLong(hwnd, GWL_USERDATA))) #define UNLOCKDATA(hwnd) GlobalUnlock((HANDLE)(L_INT)GetWindowLong(hwnd, GWL_USERDATA)) #define FREEDATA(hwnd) GlobalFree((HANDLE)(L_INT)GetWindowLong(hwnd, GWL_USERDATA)) #define EDT_MODFY_MIN 0x0000 #define EDT_MODFY_MAX 0x0001 #define EDT_MODFY_INC 0x0010 #define EDT_MODFY_PREC 0x0100 #define EDT_MODFY_TYPE 0x1000 #ifdef WIN32 #define GETHBRBACKGROUND(hwnd) ((HBRUSH) GetClassLong(hwnd, GCL_HBRBACKGROUND)) #endif HDISPCONTAINER hCon; HMENU hContainerMenu; HINSTANCE hInst; HCURSOR hOldCursor; L_INT nCellIndex; L_INT nSubCellIndex; static OPENDLGPARAMS foParm; typedef struct tagDATA { HBITMAPLIST hBitmapList; L_BOOL bWindowLevel; } DATA, L_FAR * LPDATA; LPDATA pData; L_UINT pCurrentActionButton[7]; L_UINT pCurrentActionFlags[7]; L_BOOL CALLBACK CellsDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK WindowLevelProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK ContainerDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK StatsDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK CellIndexDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK RepositionDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK MagDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK SetActionWndProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK OffsetWndProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK StackWndProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK AlphaWndProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK ScaleWndProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK InsertCellDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK RemoveCellDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK FreezeCellDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_BOOL CALLBACK AboutDlgProc (HWND hWnd, L_UINT uMessage, WPARAM wParam, LPARAM lParam); L_VOID CheckKeyValidity (HWND hWnd, L_INT nType); L_VOID AddVirtualKeyString (HWND hWnd); L_VOID InitlizeVirtualKeyList (HWND hWnd); L_VOID AddSupString (HWND hWnd); L_VOID GetKeyboardAction (HWND hCombWnd, L_INT nAction, L_INT nMouseDirection); L_INT GetVirtualKey (HWND hWnd, HWND ComboWindow); L_INT SearchForFirstSelectedCell (HDISPCONTAINER hCon); L_VOID OpenCursorDialog (HWND hWndButton, HCURSOR * phCursor); L_INT SetNumericEditBox (HWND hEditWnd, L_DOUBLE dMinRange, L_DOUBLE dMaxRange, L_DOUBLE dIncrement, L_UINT uPrecesion, L_BOOL bIsDouble); L_INT EditNumericEditBox (HWND hEditWnd, L_DOUBLE dMinRange, L_DOUBLE dMaxRange, L_DOUBLE dIncrement, L_UINT uPrecesion, L_BOOL bIsDouble, L_UINT uFlags); COLORREF ShowColorDialog (HWND hWnd, COLORREF crOldColor); L_VOID MoveDialogToMiddle (HWND hWnd); L_BOOL OpenImage (HWND hWnd, L_INT nIndex); #endif