www.pudn.com > ExpBar_src.zip > explorerbar.h


#ifndef _INC_EXPBARDLL_H_ 
#define _INC_EXPBARDLL_H_ 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
#include  
#include  
 
BOOL APIENTRY InitExpBarDll ( void ); 
 
void APIENTRY CleanUpExpBarDll ( void ); 
 
HIMAGELIST APIENTRY CreateImageList ( HINSTANCE     hInstance, 
                                      UINT          uResourceId, 
                                      UINT          uIconWidth, 
                                      COLORREF      rgbTransparent, 
                                      PUINT         puNumIcons, 
                                      PUINT         puIconHeight,     // may be NULL 
                                      HIMAGELIST   *phIListDisabled,  // may be NULL 
                                      HIMAGELIST   *phIListCold );    // may be NULL 
 
#define WM_CALCDIMENSIONS     (WM_USER+0x1000) 
#define WM_GETORIGDIMENSIONS  (WM_USER+0x1001) 
#define WM_GETDLGITEM         (WM_USER+0x1002) 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#define COLXPBARCLASSNAMEW    L"CollapseXPStyleBar32" 
#define COLXPBARCLASSNAMEA    "CollapseXPStyleBar32" 
 
#ifdef  UNICODE 
#define COLXPBARCLASSNAME     COLXPBARCLASSNAMEW 
#else 
#define COLXPBARCLASSNAME     COLXPBARCLASSNAMEA 
#endif 
 
HWND APIENTRY CreateColXPBar ( HWND hwndParent, UINT uStyle, UINT uExStyle, 
                               int x, int y, int cx, int cy ); 
 
void APIENTRY DestroyColXPBar ( HWND hwndBar ); 
 
typedef struct tagPANEDEF               PANEDEF, *PPANEDEF; 
typedef struct tagRELAYMSG              RELAYMSG, *PRELAYMSG; 
 
struct tagPANEDEF 
{ 
  int                     cbSize; 
 
  UINT                    uPaneId;              // app. globally unique pane id (user defined) 
                                                // must NOT match any control id in the pane dialog 
 
  BOOL                    bManualLayout;        // has manual layout (CURRENTLY NOT IMPLEMENTED) 
 
  HINSTANCE               hInstance; 
  LPCTSTR                 lpcszDlgTemplate;     // dialog box must NOT have WS_VISIBLE style !!! 
 
  DLGPROC                 pDialogProc;          // either this dialog procedure is used OR 
  HWND                    hwndMsg;              // this message window (checked in this order!) 
 
  UINT                    uHeaderStyle; 
  UINT                    uHeaderExStyle; 
  LPCTSTR                 lpcszHeaderTitle; 
 
  HIMAGELIST              hPaneIcon;            // NULL: no icon 
  int                     iPaneIconIdx; 
 
  LPARAM                  lUserData[4];         // any user data 
}; 
 
struct tagRELAYMSG 
{ 
  HWND                    hwndDlg; 
  UINT                    uPaneId; 
  UINT                    message; 
  WPARAM                  wParam; 
  LPARAM                  lParam; 
}; 
 
typedef struct tagBKGNDFILL       BKGNDFILL, *PBKGNDFILL; 
 
struct tagBKGNDFILL 
{ 
  int             cbSize; 
  HDC             hDC;          // origin always 0,0 
  int             iWidth; 
  int             iHeight; 
  COLORREF        crColor;      // current background color 
  LPRECT          lpFillRect;   // if NULL: fill entire iWidth,iHeight (hDC=dialog box) 
}; 
 
#define CBM_ACTIVATE          (WM_USER+0x0001) 
#define CBM_FILLBKGND         (WM_USER+0x0002) 
 
#define CBM_ADDPANE           (WM_USER+0x0003) 
#define CBM_DELPANE           (WM_USER+0x0004) 
#define CBM_EXPANDPANE        (WM_USER+0x0005) 
#define CBM_COLLAPSEPANE      (WM_USER+0x0006) 
 
#define CBM_DELPANEBYID       (WM_USER+0x0007) 
#define CBM_EXPANDPANEBYID    (WM_USER+0x0008) 
#define CBM_COLLAPSEPANEBYID  (WM_USER+0x0009) 
 
#define CBM_GETPANEHEADER     (WM_USER+0x000A) 
#define CBM_GETPANEDIALOG     (WM_USER+0x000B) 
 
#define CBM_GETPANEHEADERBYID (WM_USER+0x000C) 
#define CBM_GETPANEDIALOGBYID (WM_USER+0x000D) 
 
#define CBM_NEWPANELAYOUT     (WM_USER+0x000E)  // currently not implemented 
#define CBM_NEWPANELAYOUTBYID (WM_USER+0x000F)  // currently not implemented 
 
#define CBM_SIMPLEMODE        (WM_USER+0x0010)  // currently not implemented 
 
#define CBM_GETPANEDEF        (WM_USER+0x0011) 
#define CBM_GETPANEDEFBYID    (WM_USER+0x0012) 
 
#define CBM_SCROLLVISIBLE     (WM_USER+0x0013) 
#define CBM_SCROLLVISIBLEBYID (WM_USER+0x0014) 
 
#define CBN_EXPANDED          0 
#define CBN_COLLAPSED         1 
 
#define CPDLGM_CALCLAYOUT     (WM_USER+0x0100)    // calc layout (currently not implemented) 
#define CPDLGM_CALCDISPLAYOUT (WM_USER+0x0101)    // calc display layout (currently not implemented) 
 
#define CBM_RELAYMSG          (WM_USER+0x01FF) 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#define TASKLINKCLASSNAMEW    L"TaskLink32" 
#define TASKLINKCLASSNAMEA    "TaskLink32" 
 
#ifdef  UNICODE 
#define TASKLINKCLASSNAME     TASKLINKCLASSNAMEW 
#else 
#define TASKLINKCLASSNAME     TASKLINKCLASSNAMEA 
#endif 
 
// TLS_NOAUTOSIZE 
#define TLS_reserved          0x00000010L     // precedence over TLS_END_ELLIPSIS and TLS_WORDBREAK 
 
#define TLS_TOOLTIP           0x00000001L 
#define TLS_FOCUSRECT         0x00000002L 
#define TLS_PLAYSOUND         0x00000004L 
#define TLS_NOSETFOCUSONCLICK 0x00000008L 
#define TLS_DONTRELAYLBDNUP   0x00000020L 
#define TLS_BOLD              0x00000040L 
#define TLS_NORMUNDERLINE     0x00000080L 
#define TLS_HOTUNDERLINE      0x00000100L 
#define TLS_END_ELLIPSIS      0x00000200L     // only used if !CHS_WORDBREAK 
#define TLS_WORDBREAK         0x00000400L      
#define TLS_ICONRIGHT         0x00000800L     // place icon right 
 
#define TLS_LEFT              0x00000000L 
#define TLS_RIGHT             0x00001000L 
#define TLS_CENTER            0x00002000L 
 
#define TLS_MIDDLE            0x00000000L 
#define TLS_TOP               0x00004000L 
#define TLS_BOTTOM            0x00008000L 
 
#define TLS_HALIGNMASK        0x00003000L 
#define TLS_VALIGNMASK        0x0000C000L 
 
#define TLM_SETFONTS          (WM_USER+0x0001) 
#define TLM_SETCOLORS         (WM_USER+0x0002) 
#define TLM_SETIMAGES         (WM_USER+0x0003) 
#define TLM_GETTTCTRL         (WM_USER+0x0004) 
#define TLM_SETCURSOR         (WM_USER+0x0006) 
#define TLM_SETHSPACE         (WM_USER+0x0007) 
#define TLM_GETHSPACE         (WM_USER+0x0008) 
#define TLM_ACTIVATE          (WM_USER+0x0009) 
 
#define TLN_GETDISPINFO       ((UINT)(-10000)) 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#define COLHEADERCLASSNAMEW     L"CollapsibleHeader32" 
#define COLHEADERCLASSNAMEA     "CollapsibleHeader32" 
 
#ifdef  UNICODE 
#define COLHEADERCLASSNAME      COLHEADERCLASSNAMEW 
#else 
#define COLHEADERCLASSNAME      COLHEADERCLASSNAMEA 
#endif 
 
#define CHS_TOOLTIP             0x00000001L 
#define CHS_reserved            0x00000002L 
#define CHS_DONTRELAYLBDNUP     0x00000004L 
#define CHS_FOCUSRECT           0x00000008L 
#define CHS_NOSETFOCUSONCLICK   0x00000010L 
#define CHS_END_ELLIPSIS        0x00000020L     // only used if !CHS_WORDBREAK 
#define CHS_WORDBREAK           0x00000040L 
#define CHS_PLAYSOUND           0x00000080L 
 
#define CHS_PANEHEADER          0x00000100L     // is pane header (bitmap) ? 
#define CHS_SPECIALGROUP        0x00000200L     // only recognized if CHS_PANEHEADER 
#define CHS_CUSTOMBACKGND       0x00000400L     // only recognized if CHS_PANEHEADER 
 
#define CHS_CREATEEXPANDED      0x00000800L 
#define CHS_ANIMATEFADE         0x00001000L     // flag for controlled pane NOT for control itself 
#define CHS_ANIMATEROLL         0x00002000L     // flag for controlled pane NOT for control itself 
                                                // for group headers: only roll mode available 
 
#define CHM_SETFORMAT           (WM_USER+0x0001) 
#define CHM_GETFORMAT           (WM_USER+0x0002) 
#define CHM_GETTTCTRL           (WM_USER+0x0003) 
#define CHM_SETSTATE            (WM_USER+0x0004) 
#define CHM_GETSTATE            (WM_USER+0x0005) 
#define CHM_ACTIVATE            (WM_USER+0x0006) 
#define CHM_SETLEFTMARGIN       (WM_USER+0x0007) 
#define CHM_SETICON             (WM_USER+0x0008) 
 
#define CHN_GETDISPINFO         ((UINT)(-10001)) 
#define CHN_EXPANDED            ((UINT)(-10002))  // WM_COMMAND 
#define CHN_COLLAPSED           ((UINT)(-10003))  // WM_COMMAND 
 
typedef struct tagCHFORMAT      CHFORMAT, *PCHFORMAT; 
 
#define CH_LEFT                 0x00L 
#define CH_CENTER               0x01L 
#define CH_RIGHT                0x02L 
 
struct tagCHFORMAT 
{ 
  int               cbSize; 
 
  int               iFontSize;                // in pt's, if NULL: use default GUI font 
  TCHAR             szFontFace[MAX_PATH];     // ignored if CHS_PANEHEADER 
 
  int               iFWNormal;                // ignored if CHS_PANEHEADER 
  BOOL              bULNormal;                // ignored if CHS_PANEHEADER 
  BOOL              bItalicNormal;            // ignored if CHS_PANEHEADER 
 
  int               iFWHot;                   // ignored if CHS_PANEHEADER 
  BOOL              bULHot;                   // ignored if CHS_PANEHEADER 
  BOOL              bItalicHot;               // ignored if CHS_PANEHEADER 
 
  COLORREF          crNormal;                 // ignored if CHS_PANEHEADER 
  COLORREF          crHot;                    // ignored if CHS_PANEHEADER 
 
  UINT              uAlign;                   // ignored if CHS_PANEHEADER 
 
  UINT              uBorderTop; 
  UINT              uBorderBottom; 
  UINT              uBorderLeft; 
  UINT              uGap; 
  UINT              uBorderRight; 
 
  HCURSOR           hCursor;                  // may be NULL (hand) 
 
  HIMAGELIST        hIList;                   // may be NULL (no icon), ignored if !CHS_PANEHEADER 
  int               iIIdx; 
}; 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#define COLBARSTATICCLASSNAMEW  L"CBStatic32" 
#define COLBARSTATICCLASSNAMEA  "CBStatic32" 
 
#ifdef  UNICODE 
#define COLBARSTATICCLASSNAME   COLBARSTATICCLASSNAMEW 
#else 
#define COLBARSTATICCLASSNAME   COLBARSTATICCLASSNAMEA 
#endif 
 
#define CBSS_NOAUTOSIZE         0x00000001L     // precedence over CBSS_END_ELLIPSIS and CBSS_WORDBREAK 
#define CBSS_BOLD               0x00000002L 
#define CBSS_UNDERLINE          0x00000004L 
#define CBSS_ITALIC             0x00000008L 
#define CBSS_END_ELLIPSIS       0x00000010L     // only used if !CBSS_WORDBREAK 
#define CBSS_WORD_ELLIPSIS      0x00000020L     // only used if !CBSS_WORDBREAK 
#define CBSS_PATH_ELLIPSIS      0x00000040L     // only used if !CBSS_WORDBREAK 
#define CBSS_WORDWRAP           0x00000080L 
 
#define CBSS_LEFT               0x00000000L 
#define CBSS_CENTER             0x00000100L 
#define CBSS_RIGHT              0x00000200L 
 
#define CBSS_HALIGNMASK         0x00000300L 
 
#define CBSS_MIDDLE             0x00000000L 
#define CBSS_TOP                0x00000400L 
#define CBSS_BOTTOM             0x00000800L 
 
#define CBSS_VALIGNMASK         0x00000C00L 
 
#define CBSS_NOPREFIX           0x00001000L 
#define CBSS_OWNERDRAW          0x00002000L 
 
#define CBSS_NOTIFY             0x00004000L 
#define CBSS_EDITCONTROL        0x00008000L 
 
// WM_SETFONT, WM_CTLCOLORSTATIC, WM_SYSCOLORCHANGE 
 
#define CBSM_SETITEMDATA        (WM_USER+0x0002) 
#define CBSM_GETITEMDATA        (WM_USER+0x0003) 
 
#define CBSN_CLICKED            0 
#define CBSN_DBLCLK             1 
#define CBSN_ENABLE             2 
#define CBSN_DISABLE            3 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#define COLBARBUTTONCLASSNAMEW  L"CBButton32" 
#define COLBARBUTTONCLASSNAMEA  "CBButton32" 
 
#ifdef  UNICODE 
#define COLBARBUTTONCLASSNAME   COLBARBUTTONCLASSNAMEW 
#else 
#define COLBARBUTTONCLASSNAME   COLBARBUTTONCLASSNAMEA 
#endif 
 
#define CBBS_NOAUTOSIZE         0x00000001L     // precedence over CBBS_END_ELLIPSIS and CBBS_WORDBREAK 
#define CBBS_END_ELLIPSIS       0x00000002L     // only used if !CBBS_WORDBREAK, precedence over path_ell 
#define CBBS_WORDBREAK          0x00000004L 
#define CBBS_LEFTTEXT           0x00000008L 
#define CBBS_RIGHTBUTTON        CBBS_LEFTTEXT 
 
#define CBBS_PUSHBUTTON         0x00000000L 
#define CBBS_DEFPUSHBUTTON      0x00000010L 
#define CBBS_CHECKBOX           0x00000020L 
#define CBBS_AUTOCHECKBOX       0x00000030L 
#define CBBS_RADIOBUTTON        0x00000040L 
#define CBBS_3STATE             0x00000050L 
#define CBBS_AUTO3STATE         0x00000060L 
#define CBBS_AUTORADIOBUTTON    0x00000070L 
#define CBBS_TYPEMASK           0x00000070L 
 
#define CBBS_FOCUSRECT          0x00000080L 
#define CBBS_NOSETFOCUSONCLICK  0x00000100L 
 
//#define CBBS_PUSHLIKE           0x00000200L 
#define CBBS_NOTIFY             0x00000400L 
#define CBBS_FLAT               0x00000800L 
 
#define CBBS_LEFT               0x00001000L 
#define CBBS_RIGHT              0x00002000L 
#define CBBS_CENTER             0x00004000L 
 
#define CBBN_CLICKED            0 
#define CBBN_DOUBLECLICKED      3 
#define CBBN_DBLCLK             CBBN_DOUBLECLICKED 
#define CBBN_SETFOCUS           4 
#define CBBN_KILLFOCUS          5 
#define CBBN_HOTITEMCHANGE      6 
 
#define CBBM_GETCHECK           (WM_USER+0x0002) 
#define CBBM_SETCHECK           (WM_USER+0x0003) 
#define CBBM_GETSTATE           (WM_USER+0x0004) 
#define CBBM_SETSTATE           (WM_USER+0x0005) 
#define CBBM_SETSTYLE           (WM_USER+0x0006) 
#define CBBM_CLICK              (WM_USER+0x0007) 
#define CBBM_SETCURSOR          (WM_USER+0x0008) 
 
#define CBBST_UNCHECKED         0x0000 
#define CBBST_CHECKED           0x0001 
#define CBBST_INDETERMINATE     0x0002 
#define CBBST_PUSHED            0x0004 
#define CBBST_FOCUS             0x0008 
 
//////////////////////////////////////////////////////////////////////////////////////////////////////// 
 
#ifdef __cplusplus 
} 
#endif 
#endif