123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- #ifndef NULLOSFT_DROPBOX_PLUGIN_COMMANDLINK_HEADER
- #define NULLOSFT_DROPBOX_PLUGIN_COMMANDLINK_HEADER
- #if defined(_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
- #endif
- #include <wtypes.h>
- #define NWC_COMMANDLINKA "NullsoftCommandLink"
- #define NWC_COMMANDLINKW L"NullsoftCommandLink"
- #ifdef UNICODE
- #define NWC_COMMANDLINK NWC_COMMANDLINKW
- #else
- #define NWC_COMMANDLINK NWC_COMMANDLINKA
- #endif
- #define CLS_HOTTRACK 0x0001
- #define CLS_TRACKVISITED 0x0002
- #define CLS_DEFAULTCOLORS 0x0008
- #define CLS_ALWAYSUNDERLINE 0x0010
- #define CLS_HIGHLIGHTCOLOR 0x0020
- #define CLIS_VISITED 0x0001
- #define CLIS_HOT 0x0002
- #define CLIS_PRESSED 0x0004
- #define CLIS_FOCUSED 0x0008
- #define CLIS_HIDEFOCUS 0x0010
- #define CommandLink_CreateWindow(__windowStyleEx, __linkText, __windowStyle, __x, __y, __cx, __cy, __parentWindow, __controlId)\
- CreateWindowEx((__windowStyleEx), NWC_COMMANDLINK, (__linkText), (__windowStyle),\
- (__x), (__y), (__cx), (__cy), (__parentWindow), (HMENU)(INT_PTR)(__controlId), NULL, 0)
-
- #define CLM_FIRST (WM_USER + 1)
- #define CLM_GETIDEALHEIGHT (CLM_FIRST + 0)
- #define CommandLink_GetIdealHeight(__hwnd)\
- ((INT)SendMessageW((__hwnd), CLM_GETIDEALHEIGHT, 0, 0L))
- #define CLM_GETIDEALSIZE (CLM_FIRST + 1)
- #define CommandLink_GetIdealSize( __hwnd, __sizeOut)\
- ((BOOL)SendMessageW((__hwnd), CLM_GETIDEALSIZE, 0, (LPARAM)(__sizeOut)))
- #define CLM_RESETVISITED (CLM_FIRST + 2)
- #define CommandLink_ResetVisited(__hwnd)\
- (SendMessageW((__hwnd), CLM_RESETVISITED, 0, 0L))
- #define CLM_GETMARGINS (CLM_FIRST + 3)
- #define CommandLink_GetMargins( __hwnd, __rectOut)\
- ((BOOL)SendMessageW((__hwnd), CLM_GETMARGINS, 0, (LPARAM)(__rectOut)))
- #define CLM_SETMARGINS (CLM_FIRST + 4)
- #define CommandLink_SetMargins( __hwnd, __rectIn)\
- ((BOOL)SendMessageW((__hwnd), CLM_SETMARGINS, 0, (LPARAM)(__rectIn)))
- #define CLM_SETBACKCOLOR (CLM_FIRST + 5)
- #define CommandLink_SetBackColor( __hwnd, __rgb)\
- ((BOOL)SendMessageW((__hwnd), CLM_SETBACKCOLOR, 0, (LPARAM)(__rgb)))
- #define CLM_GETBACKCOLOR (CLM_FIRST + 6)
- #define CommandLink_GetBackColor( __hwnd)\
- ((COLORREF)SendMessageW((__hwnd), CLM_GETBACKCOLOR, 0, 0L))
- #define CLM_SETTEXTCOLOR (CLM_FIRST + 7)
- #define CommandLink_SetTextColor( __hwnd, __rgb)\
- ((BOOL)SendMessageW((__hwnd), CLM_SETTEXTCOLOR, 0, (LPARAM)(__rgb)))
- #define CLM_GETTEXTCOLOR (CLM_FIRST + 8)
- #define CommandLink_GetTextColor( __hwnd)\
- ((COLORREF)SendMessageW((__hwnd), CLM_GETTEXTCOLOR, 0, 0L))
- #define CLM_SETVISITEDCOLOR (CLM_FIRST + 9)
- #define CommandLink_SetVisitedColor( __hwnd, __rgb)\
- ((BOOL)SendMessageW((__hwnd), CLM_SETVISITEDCOLOR, 0, (LPARAM)(__rgb)))
- #define CLM_GETVISITEDCOLOR (CLM_FIRST + 10)
- #define CommandLink_GetVisitedColor( __hwnd)\
- ((COLORREF)SendMessageW((__hwnd), CLM_GETVISITEDCOLOR, 0, 0L))
- #define CLM_SETHIGHLIGHTCOLOR (CLM_FIRST + 11)
- #define CommandLink_SetHighlightColor( __hwnd, __rgb)\
- ((BOOL)SendMessageW((__hwnd), CLM_SETHIGHLIGHTCOLOR, 0, (LPARAM)(__rgb)))
- #define CLM_GETHIGHLIGHTCOLOR (CLM_FIRST + 12)
- #define CommandLink_GetHighlightColor( __hwnd)\
- ((COLORREF)SendMessageW((__hwnd), CLM_GETHIGHLIGHTCOLOR, 0, 0L))
- EXTERN_C BOOL CommandLink_RegisterClass(HINSTANCE hInstance)
- #endif
|