Workaround cannot operate with keyboard when MenuButton has only 1 entry
[TortoiseGit.git] / ext / ResizableLib / ResizableComboBox.h
blob2f9321029ee06402e4c2cf70061f6daa445a432c
1 #if !defined(AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_)
2 #define AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
8 // ResizableComboBox.h : header file
9 //
10 /////////////////////////////////////////////////////////////////////////////
12 // Copyright (C) 2000-2004 by Paolo Messina
13 // (http://www.geocities.com/ppescher - ppescher@hotmail.com)
15 // The contents of this file are subject to the Artistic License (the "License").
16 // You may not use this file except in compliance with the License.
17 // You may obtain a copy of the License at:
18 // http://www.opensource.org/licenses/artistic-license.html
20 // If you find this code useful, credits would be nice!
22 /////////////////////////////////////////////////////////////////////////////
24 #include "ResizableComboLBox.h"
26 /////////////////////////////////////////////////////////////////////////////
27 // CResizableComboBox window
29 class CResizableComboBox : public CComboBox
31 friend class CResizableComboLBox;
33 // Construction
34 public:
35 CResizableComboBox();
37 // Attributes
38 public:
40 protected:
41 CResizableComboLBox m_ctrlListBox;
43 // Operations
44 public:
46 // Overrides
47 // ClassWizard generated virtual function overrides
48 //{{AFX_VIRTUAL(CResizableComboBox)
49 protected:
50 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
51 virtual void PreSubclassWindow();
52 //}}AFX_VIRTUAL
54 // Implementation
55 public:
56 virtual ~CResizableComboBox();
58 protected:
59 RECT m_rectDropDown;
60 BOOL m_bClipMaxHeight;
61 BOOL m_bIntegralHeight;
62 int m_iExtent;
64 void InitHorizontalExtent();
65 void UpdateHorizontalExtent(LPCTSTR szText);
66 int MakeIntegralHeight(const int height);
68 // Generated message map functions
69 protected:
70 //{{AFX_MSG(CResizableComboBox)
71 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
72 //}}AFX_MSG
74 DECLARE_MESSAGE_MAP()
77 /////////////////////////////////////////////////////////////////////////////
79 //{{AFX_INSERT_LOCATION}}
80 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
82 #endif // !defined(AFX_RESIZABLECOMBOBOX_H__CAEDF06D_C4F5_49E4_A783_AD7D894CF9A0__INCLUDED_)