00001 #pragma once
00002 #include "afx.h"
00003 #include "..\ViewIntf.h"
00004 #include "DefClassNames.h"
00005
00006 class CUserToolBar;
00007
00008 class CUserButton : public CObject {
00009 friend class CUserToolBar;
00010 public:
00011 CUserButton(LRESULT RemoteButton, int index) {
00012 m_RemoteButton = RemoteButton;
00013 m_ButtonIndex = index;
00014 m_TLInfo.pObject = (CObject *)RemoteButton;
00015 }
00016
00017 virtual ~CUserButton(void);
00018
00019
00020 bool GetCheck();
00021 void SetCheck(bool checked);
00022
00023
00024 LPCTSTR GetText();
00025 void SetText(LPCTSTR text);
00026
00027
00028 int GetCBCurSel();
00029 LPCTSTR GetCBItem(int index);
00030 UINT GetCBCount();
00031 void RemoveAllCBItems();
00032 void SelectCBCurSel(int index);
00033 UINT AddCBItem(LPCTSTR lpszItem, DWORD_PTR dwData=0);
00034 DWORD_PTR GetCBItemData(int index);
00035
00036
00037 private:
00038
00039 void SetRemoteButton(LRESULT RemoteButton, int index) {
00040 m_RemoteButton = RemoteButton;
00041 m_ButtonIndex = index;
00042 m_TLInfo.pObject = (CObject *)RemoteButton;
00043 }
00044
00045 TLINFO m_TLInfo;
00046 int m_ButtonIndex;
00047 LRESULT m_RemoteButton;
00048 };
00049