(m_pEdit == NULL && m_pListCtrl == NULL);
ASSERT (m_font.GetSafeHandle());
SetFont(&m_font);
ModifyStyle(WS_OVERLAPPED , WS_TABSTOP);
m_pEdit = new CEdit();
m_pListCtrl = new CListCtrl();
if (m_pEdit->Create(WS_CHILD | WS_VISIBLE | defaultEditStyle, CRect(0,0,0,0), this, IDEDIT ))
{
ModifyStyleEx(0, WS_EX_STATICEDGE);
m_pEdit->SetFont(&m_font);
if (m_pListCtrl->Create(WS_BORDER | WS_CHILD | defaultListCtrlStyle , CRect(0,0,0,0), GetDesktopWindow(), IDLISTCTRL))
{
//Set the reference to this object in user data dword
::SetWindowLong(m_pListCtrl->m_hWnd, GWL_USERDATA, (long)this);
::SetWindowLong(m_pListCtrl->m_hWnd, GWL_STYLE, GetWindowLong(m_pListCtrl->m_hWnd, GWL_STYLE) | WS_CLIPSIBLINGS | WS_OVERLAPPED);
m_pListCtrl->ModifyStyleEx(0, WS_EX_TOOLWINDOW);
m_pListCtrl->SetWindowPos(&CWnd::wndTopMost,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE);
ListView_SetExtendedListViewStyle(m_pListCtrl->m_hWnd, LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
Resize();
m_wndProcs.AddEdit(GetEdit(), EditWindowProc);
m_wndProcs.AddListCtrl(GetListCtrl(), ListCtrlWindowProc);
m_wndProcs.AddParent(GetParent(), ParentWindowProc);
return TRUE;
}
}
return FALSE;
}
// Function name : CMultiColumnComboBox::PreSubclassWindow
// Description : Call to subclass window
// Return type : void
void CMultiColumnComboBox::PreSubclassWindow()
{
CWnd::PreSubclassWindow();
// If this is dynamical created then do not call OnInit
if (AfxGetThreadState()->m_pWndInit == 0)
OnInit();
}
// Function name : CMultiColumnComboBox::OnDestroy
上一篇:
mulThreadDlg.cpp
下一篇:
还记得,那年的风车吗?