OSDN Git Service

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