• Main Page
  • Classes
  • Files
  • File List

UV4GUIClient/UserButtonC.h

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   // Interface CheckBox function
00020   bool GetCheck();
00021   void SetCheck(bool checked);
00022 
00023   // static text, edit box function
00024   LPCTSTR GetText();
00025   void SetText(LPCTSTR text);
00026 
00027   // combo box functions
00028   int GetCBCurSel();                                    // return current selected item index, -1 if combo box is empty
00029   LPCTSTR GetCBItem(int index);                         // return the string based on index
00030   UINT GetCBCount();                                    // return the number of items
00031   void RemoveAllCBItems();                              // remove all combo box items
00032   void SelectCBCurSel(int index);                       // select a CB item based on index
00033   UINT AddCBItem(LPCTSTR lpszItem, DWORD_PTR dwData=0); // return index of the last item
00034   DWORD_PTR GetCBItemData(int index);                   // return data associated with the item; or 0 if the item does not exist
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 

Generated on Fri Sep 17 2010 14:58:37 for RTOS_Viewer by  doxygen 1.7.1