Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB

  1. /****************************************************************************
  2. *
  3. * FILE: CallingBar.h
  4. *
  5. * CREATED: George Pitt 1-22-99
  6. *
  7. ****************************************************************************/
  8. #ifndef _CALLINGBAR_H_
  9. #define _CALLINGBAR_H_
  10. #include "GenContainers.h"
  11. #include "GenControls.h"
  12. #include "ConfUtil.h"
  13. class CConfRoom;
  14. struct RichAddressInfo;
  15. // We are making some changes specifically for OSR2 beta, but we should rip them out afterwards
  16. #define OSR2LOOK
  17. class CCallingBar : public CToolbar, public IComboBoxChange
  18. {
  19. public:
  20. CCallingBar();
  21. BOOL Create(CGenWindow *pParent, CConfRoom *pConfRoom);
  22. virtual HRESULT STDMETHODCALLTYPE QueryInterface(
  23. /* [in] */ REFIID riid,
  24. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
  25. {
  26. return(CToolbar::QueryInterface(riid, ppvObject));
  27. }
  28. virtual ULONG STDMETHODCALLTYPE AddRef( void)
  29. {
  30. return(CToolbar::AddRef());
  31. }
  32. virtual ULONG STDMETHODCALLTYPE Release( void)
  33. {
  34. return(CToolbar::Release());
  35. }
  36. virtual void OnTextChange(CComboBox *pEdit);
  37. virtual void OnFocusChange(CComboBox *pEdit, BOOL bSet);
  38. virtual void OnSelectionChange(CComboBox *pCombo);
  39. int GetText(LPTSTR szText, int nLen);
  40. void SetText(LPCTSTR szText);
  41. protected:
  42. virtual ~CCallingBar();
  43. virtual LRESULT ProcessMessage(HWND hwnd, UINT uCmd, WPARAM wParam, LPARAM lParam);
  44. virtual void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  45. private:
  46. // A pointer back to the global ConfRoom object for some functionality
  47. CConfRoom *m_pConfRoom;
  48. // The last rich address we were given
  49. RichAddressInfo *m_pAddr;
  50. // The edit text control in the bar
  51. CComboBox *m_pEdit;
  52. ITranslateAccelerator *m_pAccel;
  53. // Last font set on the edit control
  54. BOOL m_bUnderline : 1;
  55. void SetEditFont(BOOL bUnderline, BOOL bForce=FALSE);
  56. void ClearAddr(RichAddressInfo **ppAddr);
  57. void ClearCombo();
  58. void OnNewAddress(RichAddressInfo *pAddr);
  59. } ;
  60. #endif // _CALLINGBAR_H_