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