1 // Windows/Control/ReBar.h 2 3 #ifndef __WINDOWS_CONTROL_REBAR_H 4 #define __WINDOWS_CONTROL_REBAR_H 5 6 #include "../Window.h" 7 8 namespace NWindows { 9 namespace NControl { 10 11 class CReBar: public NWindows::CWindow 12 { 13 public: SetBarInfo(LPREBARINFO barInfo)14 bool SetBarInfo(LPREBARINFO barInfo) 15 { return LRESULTToBool(SendMsg(RB_SETBARINFO, 0, (LPARAM)barInfo)); } InsertBand(int index,LPREBARBANDINFO bandInfo)16 bool InsertBand(int index, LPREBARBANDINFO bandInfo) 17 { return LRESULTToBool(SendMsg(RB_INSERTBAND, index, (LPARAM)bandInfo)); } SetBandInfo(unsigned index,LPREBARBANDINFO bandInfo)18 bool SetBandInfo(unsigned index, LPREBARBANDINFO bandInfo) 19 { return LRESULTToBool(SendMsg(RB_SETBANDINFO, index, (LPARAM)bandInfo)); } MaximizeBand(unsigned index,bool ideal)20 void MaximizeBand(unsigned index, bool ideal) 21 { SendMsg(RB_MAXIMIZEBAND, index, BoolToBOOL(ideal)); } SizeToRect(LPRECT rect)22 bool SizeToRect(LPRECT rect) 23 { return LRESULTToBool(SendMsg(RB_SIZETORECT, 0, (LPARAM)rect)); } GetHeight()24 UINT GetHeight() 25 { return (UINT)SendMsg(RB_GETBARHEIGHT); } GetBandCount()26 UINT GetBandCount() 27 { return (UINT)SendMsg(RB_GETBANDCOUNT); } DeleteBand(UINT index)28 bool DeleteBand(UINT index) 29 { return LRESULTToBool(SendMsg(RB_DELETEBAND, index)); } 30 }; 31 32 }} 33 34 #endif 35