Files
envi-code/SourceCode/Code2026/MFCCtrl/MfcGridCtrlCheckComboBox.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

61 lines
1.4 KiB
C++

#if !defined(__CMFCGRIDCTRLCHECKCOMBOBOX_H__)
#define __CMFCGRIDCTRLCHECKCOMBOBOX_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class THVAC_UIAPI CMfcGridCtrlCheckComboBox : public CComboBox
{
public:
CMfcGridCtrlCheckComboBox();
virtual ~CMfcGridCtrlCheckComboBox();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
// Selects all/unselects the specified item
INT SetCheck(INT nIndex, BOOL bFlag);
// Returns checked state
BOOL GetCheck(INT nIndex);
void SetMe();
// Selects all/unselects all
void SelectAll(BOOL bCheck = TRUE);
protected:
//{{AFX_VIRTUAL(CMfcGridCtrlCheckComboBox)
protected:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
//}}AFX_VIRTUAL
//{{AFX_MSG(CMfcGridCtrlCheckComboBox)
afx_msg LRESULT OnCtlColorListBox(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnGetText(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnGetTextLength(WPARAM wParam, LPARAM lParam);
afx_msg void OnDropDown();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
// Routine to update the text
void RecalcText();
// The subclassed COMBOLBOX window (notice the 'L')
HWND m_hListBox;
// The string containing the text to display
CString m_strText;
BOOL m_bTextUpdated;
// A flag used in MeasureItem, see comments there
BOOL m_bItemHeightSet;
};
//{{AFX_INSERT_LOCATION}}
#endif // !defined(__CMfcGridCtrlCHECKCOMBOBOX_H__)