ComboListCtrl.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. // ComboBoxListCtrl.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ComboListCtrl.h"
  5. #include <windowsx.h>
  6. #include "ylgl.h"
  7. #include "ChooseReason.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. #define IDC_ComboBox 0X01
  14. #define PROPERTY_ITEM 0x02
  15. #define PROPERTY_SUB 0x03
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CComboBoxListCtrl
  18. extern CFont g_listctrlfont;
  19. CComboBoxListCtrl::CComboBoxListCtrl()
  20. {
  21. m_ComboBox.m_hWnd = NULL;
  22. m_bNeedSel=0;
  23. }
  24. CComboBoxListCtrl::~CComboBoxListCtrl()
  25. {
  26. }
  27. BEGIN_MESSAGE_MAP(CComboBoxListCtrl, CListCtrl)
  28. //{{AFX_MSG_MAP(CComboBoxListCtrl)
  29. ON_WM_LBUTTONDBLCLK()
  30. ON_WM_PARENTNOTIFY()
  31. ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomdrawList)
  32. //}}AFX_MSG_MAP
  33. ON_MESSAGE(WM_USER_ComboBox_END,OnComboBoxEnd)
  34. END_MESSAGE_MAP()
  35. void CComboBoxListCtrl::OnCustomdrawList ( NMHDR* pNMHDR, LRESULT* pResult )
  36. {
  37. NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
  38. // Take the default processing unless we set this to something else below.
  39. *pResult = 0;
  40. // First thing - check the draw stage. If it's the control's prepaint
  41. // stage, then tell Windows we want messages for every item.
  42. if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
  43. {
  44. *pResult = CDRF_NOTIFYITEMDRAW;
  45. }
  46. else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
  47. {
  48. // This is the prepaint stage for an item. Here's where we set the
  49. // item's text color. Our return value will tell Windows to draw the
  50. // item itself, but it will use the new color we set here.
  51. // We'll cycle the colors through red, green, and light blue.
  52. COLORREF crText;
  53. int pos=pLVCD->nmcd.dwItemSpec;
  54. if(pos%2)
  55. {
  56. pLVCD->clrTextBk = g_gridcol1;
  57. }
  58. else
  59. {
  60. pLVCD->clrTextBk = g_gridcol2;
  61. }
  62. // Tell Windows to paint the control itself.
  63. *pResult = CDRF_DODEFAULT;
  64. }
  65. }
  66. void CComboBoxListCtrl::OnLButtonDblClk(UINT nFlags, CPoint point)
  67. {
  68. CRect rcCtrl;
  69. LVHITTESTINFO lvhti;
  70. lvhti.pt = point;
  71. int nItem = CListCtrl::SubItemHitTest(&lvhti);
  72. if(nItem == -1)
  73. return;
  74. int nSubItem = lvhti.iSubItem;
  75. CListCtrl::GetSubItemRect(nItem,nSubItem,LVIR_LABEL,rcCtrl);
  76. rcCtrl.top -=4;
  77. rcCtrl.bottom +=200;
  78. if(nSubItem==4||nSubItem==6||nSubItem==8||nSubItem==10||nSubItem==12||nSubItem==14)
  79. ShowComboBox(TRUE,nItem,nSubItem,rcCtrl); // Jeff.这里处理下拉列表;
  80. CListCtrl::OnLButtonDblClk(nFlags, point);
  81. }
  82. void CComboBoxListCtrl::ShowComboBox(BOOL bShow,int nItem,int nIndex,CRect rcCtrl)
  83. {
  84. if(m_ComboBox.m_hWnd == NULL)
  85. {
  86. m_ComboBox.Create(WS_VSCROLL|WS_CHILD|CBS_DROPDOWNLIST,CRect(0,0,0,0),this,IDC_ComboBox);
  87. m_ComboBox.ShowWindow(SW_HIDE);
  88. }
  89. if(bShow == TRUE)
  90. {
  91. if(nIndex==6 && GetItemText(nItem,4).IsEmpty ())
  92. return;
  93. CString strItem = CListCtrl::GetItemText(nItem,nIndex);
  94. m_ComboBox.MoveWindow(rcCtrl);
  95. m_ComboBox.ShowWindow(SW_SHOW);
  96. ::SetFocus(m_ComboBox.GetSafeHwnd());
  97. m_ComboBox.ResetContent ();
  98. if(nIndex==4)
  99. {
  100. m_ComboBox.AddString ("");
  101. for(int i=0; i<g_List1array.GetSize (); i++)
  102. m_ComboBox.AddString ("已发"+g_List1array.ElementAt (i).ElementAt (1));
  103. }
  104. else if(nIndex==6)
  105. {
  106. m_ComboBox.AddString ("返工");
  107. m_ComboBox.AddString ("");
  108. m_ComboBox.AddString (strItem);
  109. m_bNeedSel=1;
  110. }
  111. else if(nIndex==8)
  112. {
  113. m_ComboBox.AddString ("OK");
  114. m_ComboBox.AddString ("未完成");
  115. }
  116. #ifdef LKAY_VERSION
  117. else if(nIndex==10)
  118. {
  119. m_ComboBox.AddString ("OK");
  120. m_ComboBox.AddString ("未组");
  121. }
  122. else if(nIndex==12)
  123. {
  124. m_ComboBox.AddString ("OK");
  125. m_ComboBox.AddString ("未转");
  126. }
  127. else if(nIndex==14)
  128. {
  129. m_ComboBox.AddString ("OK");
  130. m_ComboBox.AddString ("未取");
  131. }
  132. #else
  133. else if(nIndex==10)
  134. {
  135. m_ComboBox.AddString ("OK");
  136. m_ComboBox.AddString ("未取");
  137. }
  138. #endif
  139. m_ComboBox.SetCurSel (m_ComboBox.FindString (0, strItem));
  140. m_ComboBox.SetCtrlData(MAKEWPARAM(nIndex,nItem));
  141. }
  142. else
  143. m_ComboBox.ShowWindow(SW_HIDE);
  144. }
  145. #ifdef VC_60
  146. void CComboBoxListCtrl::OnComboBoxEnd(WPARAM wParam,LPARAM lParam)
  147. {
  148. if(wParam == TRUE)
  149. {
  150. CString strText(_T(""));
  151. int pos=m_ComboBox.GetCurSel ();
  152. if(pos!=-1)
  153. {
  154. m_ComboBox.GetLBText (pos, strText);
  155. DWORD dwData = m_ComboBox.GetCtrlData();
  156. int nItem= dwData>>16;
  157. int nIndex = dwData&0x0000ffff;
  158. CListCtrl::SetItemText(nItem,nIndex,strText);
  159. //printf("Jeff:%d,%d,%s\n",nItem,nIndex,strText);
  160. strText.TrimLeft(" ");
  161. strText.TrimRight(" ");
  162. if(nIndex==4 && strText.IsEmpty())
  163. {
  164. SetItemText(nItem,6,"");
  165. SetItemText(nItem,5,""); // Jeff.add 若选择回空,则清空日期;
  166. }
  167. if(nIndex==4) // 发件;
  168. {
  169. //printf("Jeff:nIndex=4,%s\n",m_sparray->ElementAt(nItem).ElementAt(4));
  170. //if(strText!=m_sparray->ElementAt(nItem).ElementAt(4)) // Jeff.delete 4:dindansp.status1;
  171. if( strText != "")
  172. SetItemText(nItem,5,g_date+"/"+g_user.name);
  173. else
  174. SetItemText(nItem,5,""); // Jeff.add 若选择回空,则清空日期;
  175. }
  176. else if(nIndex==6)
  177. {
  178. // MessageBox(strText);
  179. if(strText.Find("返工")!=-1 && m_bNeedSel)
  180. {
  181. m_bNeedSel=0;
  182. //SetItemText(nItem,7,g_date+"/"+g_user.name);
  183. CChooseReason dlg;
  184. if(dlg.DoModal ()==IDOK)
  185. {
  186. SetItemText( nItem, 6,"返工/("+dlg.sRet+")");
  187. m_ComboBox.SetCurSel (-1);
  188. }
  189. SetItemText(nItem,7,g_date+"/"+g_user.name);
  190. }
  191. else if( strText == "") // Jeff.add.若选择回空,则清空日期;
  192. {
  193. SetItemText(nItem,7,"");
  194. }
  195. }
  196. else if(nIndex==8)
  197. {
  198. //printf("Jeff:nIndex=8,%s\n",m_sparray->ElementAt(nItem).ElementAt(6));
  199. //if(strText!=m_sparray->ElementAt (nItem).ElementAt (6)) // Jeff.delete 6:dindansp.autoid;
  200. if( strText == "OK")
  201. SetItemText(nItem,9,g_date+"/"+g_user.name);
  202. else// Jeff.add.若选择回空,则清空日期;
  203. SetItemText(nItem,9,"");
  204. }
  205. #ifdef LKAY_VERSION
  206. else if(nIndex==10)
  207. {
  208. if(strText!=m_sparray->ElementAt (nItem).ElementAt (23))
  209. SetItemText(nItem,11,g_date+"/"+g_user.name);
  210. else // Jeff.add.若选择回空,则清空日期;
  211. SetItemText(nItem,11,"");
  212. }
  213. else if(nIndex==12)
  214. {
  215. if(strText!=m_sparray->ElementAt (nItem).ElementAt (24))
  216. SetItemText(nItem,13,g_date+"/"+g_user.name);
  217. else // Jeff.add.若选择回空,则清空日期;
  218. SetItemText(nItem,13,"");
  219. }
  220. else if(nIndex==14)
  221. {
  222. if(strText!=m_sparray->ElementAt (nItem).ElementAt (7))
  223. SetItemText(nItem,15,g_date+"/"+g_user.name);
  224. else // Jeff.add.若选择回空,则清空日期;
  225. SetItemText(nItem,15,"");
  226. }
  227. #else
  228. else if(nIndex==10)
  229. {
  230. //printf("Jeff:nIndex=10,%s\n",m_sparray->ElementAt(nItem).ElementAt(7));
  231. //if(strText!=m_sparray->ElementAt(nItem).ElementAt(7)) // Jeff.delete 7:dindansp.spid;
  232. if( strText == "OK")
  233. SetItemText(nItem,11,g_date+"/"+g_user.name);
  234. else // Jeff.add.若选择回空,则清空日期;
  235. SetItemText(nItem,11,"");
  236. }
  237. #endif
  238. }
  239. }
  240. else
  241. {
  242. }
  243. if(lParam == FALSE)
  244. m_ComboBox.ShowWindow(SW_HIDE);
  245. }
  246. #else
  247. LRESULT CComboBoxListCtrl::OnComboBoxEnd(WPARAM wParam,LPARAM lParam)
  248. {
  249. if(wParam == TRUE)
  250. {
  251. CString strText(_T(""));
  252. int pos=m_ComboBox.GetCurSel ();
  253. if(pos!=-1)
  254. {
  255. m_ComboBox.GetLBText (pos, strText);
  256. DWORD dwData = m_ComboBox.GetCtrlData();
  257. int nItem= dwData>>16;
  258. int nIndex = dwData&0x0000ffff;
  259. CListCtrl::SetItemText(nItem,nIndex,strText);
  260. //printf("Jeff:%d,%d,%s\n",nItem,nIndex,strText);
  261. strText.TrimLeft(" ");
  262. strText.TrimRight(" ");
  263. if(nIndex==4 && strText.IsEmpty())
  264. {
  265. SetItemText(nItem,6,"");
  266. SetItemText(nItem,5,""); // Jeff.add 若选择回空,则清空日期;
  267. }
  268. if(nIndex==4) // 发件;
  269. {
  270. //printf("Jeff:nIndex=4,%s\n",m_sparray->ElementAt(nItem).ElementAt(4));
  271. //if(strText!=m_sparray->ElementAt(nItem).ElementAt(4)) // Jeff.delete 4:dindansp.status1;
  272. if( strText != "")
  273. SetItemText(nItem,5,g_date+"/"+g_user.name);
  274. else
  275. SetItemText(nItem,5,""); // Jeff.add 若选择回空,则清空日期;
  276. }
  277. else if(nIndex==6)
  278. {
  279. // MessageBox(strText);
  280. if(strText.Find("返工")!=-1 && m_bNeedSel)
  281. {
  282. m_bNeedSel=0;
  283. //SetItemText(nItem,7,g_date+"/"+g_user.name);
  284. CChooseReason dlg;
  285. if(dlg.DoModal ()==IDOK)
  286. {
  287. SetItemText( nItem, 6,"返工/("+dlg.sRet+")");
  288. m_ComboBox.SetCurSel (-1);
  289. }
  290. SetItemText(nItem,7,g_date+"/"+g_user.name);
  291. }
  292. else if( strText == "") // Jeff.add.若选择回空,则清空日期;
  293. {
  294. SetItemText(nItem,7,"");
  295. }
  296. }
  297. else if(nIndex==8)
  298. {
  299. //printf("Jeff:nIndex=8,%s\n",m_sparray->ElementAt(nItem).ElementAt(6));
  300. //if(strText!=m_sparray->ElementAt (nItem).ElementAt (6)) // Jeff.delete 6:dindansp.autoid;
  301. if( strText == "OK")
  302. SetItemText(nItem,9,g_date+"/"+g_user.name);
  303. else// Jeff.add.若选择回空,则清空日期;
  304. SetItemText(nItem,9,"");
  305. }
  306. #ifdef LKAY_VERSION
  307. else if(nIndex==10)
  308. {
  309. if(strText!=m_sparray->ElementAt (nItem).ElementAt (23))
  310. SetItemText(nItem,11,g_date+"/"+g_user.name);
  311. else // Jeff.add.若选择回空,则清空日期;
  312. SetItemText(nItem,11,"");
  313. }
  314. else if(nIndex==12)
  315. {
  316. if(strText!=m_sparray->ElementAt (nItem).ElementAt (24))
  317. SetItemText(nItem,13,g_date+"/"+g_user.name);
  318. else // Jeff.add.若选择回空,则清空日期;
  319. SetItemText(nItem,13,"");
  320. }
  321. else if(nIndex==14)
  322. {
  323. if(strText!=m_sparray->ElementAt (nItem).ElementAt (7))
  324. SetItemText(nItem,15,g_date+"/"+g_user.name);
  325. else // Jeff.add.若选择回空,则清空日期;
  326. SetItemText(nItem,15,"");
  327. }
  328. #else
  329. else if(nIndex==10)
  330. {
  331. //printf("Jeff:nIndex=10,%s\n",m_sparray->ElementAt(nItem).ElementAt(7));
  332. //if(strText!=m_sparray->ElementAt(nItem).ElementAt(7)) // Jeff.delete 7:dindansp.spid;
  333. if( strText == "OK")
  334. SetItemText(nItem,11,g_date+"/"+g_user.name);
  335. else // Jeff.add.若选择回空,则清空日期;
  336. SetItemText(nItem,11,"");
  337. }
  338. #endif
  339. }
  340. }
  341. else
  342. {
  343. }
  344. if(lParam == FALSE)
  345. m_ComboBox.ShowWindow(SW_HIDE);
  346. return 0;
  347. }
  348. #endif
  349. void CComboBoxListCtrl::OnParentNotify(UINT message, LPARAM lParam)
  350. {
  351. CListCtrl::OnParentNotify(message, lParam);
  352. //////////////////////////////////////////////////////////////////////////
  353. CHeaderCtrl* pHeaderCtrl = CListCtrl::GetHeaderCtrl();
  354. if(pHeaderCtrl == NULL)
  355. return;
  356. CRect rcHeader;
  357. pHeaderCtrl->GetWindowRect(rcHeader);
  358. ScreenToClient(rcHeader);
  359. //The x coordinate is in the low-order word and the y coordinate is in the high-order word.
  360. CPoint pt;
  361. pt.x = GET_X_LPARAM(lParam);
  362. pt.y = GET_Y_LPARAM(lParam);
  363. if(rcHeader.PtInRect(pt) && message == WM_LBUTTONDOWN)
  364. {
  365. if(m_ComboBox.m_hWnd != NULL)
  366. {
  367. DWORD dwStyle = m_ComboBox.GetStyle();
  368. if((dwStyle&WS_VISIBLE) == WS_VISIBLE)
  369. {
  370. m_ComboBox.ShowWindow(SW_HIDE);
  371. }
  372. }
  373. }
  374. }
  375. BOOL CComboBoxListCtrl::PreTranslateMessage(MSG* pMsg)
  376. {
  377. if(0)//pMsg->message == WM_KEYDOWN)
  378. {
  379. if(pMsg->wParam == VK_TAB && m_ComboBox.m_hWnd!= NULL)
  380. {
  381. DWORD dwStyle = m_ComboBox.GetStyle();
  382. if((dwStyle&WS_VISIBLE) == WS_VISIBLE)
  383. {
  384. OnComboBoxEnd(TRUE,TRUE);
  385. CRect rcCtrl;
  386. int nItem;
  387. int nSub;
  388. if(FALSE == Key_Ctrl(nItem,nSub))
  389. Key_Shift(nItem,nSub);
  390. CListCtrl::GetSubItemRect(nItem,nSub,LVIR_LABEL,rcCtrl);
  391. CPoint pt(rcCtrl.left+1,rcCtrl.top+1);
  392. OnLButtonDblClk(0,pt);
  393. POSITION pos = CListCtrl::GetFirstSelectedItemPosition();
  394. if (pos == NULL)
  395. {
  396. }
  397. else
  398. {
  399. while (pos)
  400. {
  401. int ntpItem = CListCtrl::GetNextSelectedItem(pos);
  402. CListCtrl::SetItemState(ntpItem,0,LVIS_SELECTED);
  403. }
  404. }
  405. CListCtrl::SetItemState(nItem, LVIS_SELECTED, LVIS_SELECTED);
  406. return TRUE;
  407. }
  408. }
  409. }
  410. return CListCtrl::PreTranslateMessage(pMsg);
  411. }
  412. BOOL CComboBoxListCtrl::Key_Shift(int& nItem,int& nSub)
  413. {
  414. int nItemCount = CListCtrl::GetItemCount();
  415. DWORD dwData = m_ComboBox.GetCtrlData();
  416. nItem= dwData>>16;
  417. nSub = dwData&0x0000ffff;
  418. CHeaderCtrl* pHeader = CListCtrl::GetHeaderCtrl();
  419. if(pHeader == NULL)
  420. return FALSE;
  421. short sRet = GetKeyState(VK_SHIFT);
  422. int nSubcCount = pHeader->GetItemCount();
  423. sRet = sRet >>15;
  424. if(sRet == 0)
  425. {
  426. nSub += 1;
  427. if(nSub >= nSubcCount)
  428. {
  429. if(nItem == nItemCount-1)
  430. {
  431. nItem = 0;
  432. nSub = 0;
  433. }
  434. else
  435. {
  436. nSub = 0;
  437. nItem += 1;
  438. }
  439. }
  440. if(nItem >= nItemCount)
  441. nItem = nItemCount-1;
  442. return FALSE;
  443. }
  444. else
  445. {
  446. nSub -= 1;
  447. if(nSub < 0)
  448. {
  449. nSub = nSubcCount -1;
  450. nItem --;
  451. }
  452. if(nItem < 0)
  453. nItem = nItemCount-1;
  454. return TRUE;
  455. }
  456. return FALSE;
  457. }
  458. BOOL CComboBoxListCtrl::Key_Ctrl(int& nItem,int &nSub)
  459. {
  460. short sRet = GetKeyState(VK_CONTROL);
  461. DWORD dwData = m_ComboBox.GetCtrlData();
  462. nItem= dwData>>16;
  463. nSub = dwData&0x0000ffff;
  464. sRet = sRet >>15;
  465. int nItemCount = CListCtrl::GetItemCount();
  466. if(sRet == 0)
  467. {
  468. }
  469. else
  470. {
  471. nItem = nItem >=nItemCount-1? 0:nItem+=1;
  472. return TRUE;
  473. }
  474. return FALSE;
  475. }
  476. //////////////////////////////////////////////////////////////////////////
  477. //////////////////////////////////////////////////////////////////////////
  478. //////////////////////////////////////////////////////////////////////////
  479. CListCtrlComboBox::CListCtrlComboBox()
  480. {
  481. }
  482. CListCtrlComboBox::~CListCtrlComboBox()
  483. {
  484. }
  485. BEGIN_MESSAGE_MAP(CListCtrlComboBox, CComboBox)
  486. //{{AFX_MSG_MAP(CListCtrlComboBox)
  487. ON_WM_KILLFOCUS()
  488. ON_WM_SETFOCUS()
  489. ON_CONTROL_REFLECT(CBN_CLOSEUP, OnCloseup)
  490. //}}AFX_MSG_MAP
  491. END_MESSAGE_MAP()
  492. /////////////////////////////////////////////////////////////////////////////
  493. // CListCtrlComboBox message handlers
  494. void CListCtrlComboBox::SetCtrlData(DWORD dwData)
  495. {
  496. m_dwData = dwData;
  497. }
  498. DWORD CListCtrlComboBox::GetCtrlData()
  499. {
  500. return m_dwData;
  501. }
  502. void CListCtrlComboBox::OnKillFocus(CWnd* pNewWnd)
  503. {
  504. CComboBox::OnKillFocus(pNewWnd);
  505. CWnd* pParent = this->GetParent();
  506. ::PostMessage(pParent->GetSafeHwnd(),WM_USER_ComboBox_END,m_bExchange,0);
  507. }
  508. BOOL CListCtrlComboBox::PreTranslateMessage(MSG* pMsg)
  509. {
  510. if(pMsg->message == WM_KEYDOWN)
  511. {
  512. if(pMsg->wParam == VK_RETURN)
  513. {
  514. CWnd* pParent = this->GetParent();
  515. m_bExchange = TRUE;
  516. ::PostMessage(pParent->GetSafeHwnd(),WM_USER_ComboBox_END,m_bExchange,0);
  517. }
  518. else if(pMsg->wParam == VK_ESCAPE)
  519. {
  520. CWnd* pParent = this->GetParent();
  521. m_bExchange = FALSE;
  522. ::PostMessage(pParent->GetSafeHwnd(),WM_USER_ComboBox_END,m_bExchange,0);
  523. }
  524. }
  525. return CComboBox::PreTranslateMessage(pMsg);
  526. }
  527. void CListCtrlComboBox::OnSetFocus(CWnd* pOldWnd)
  528. {
  529. CComboBox::OnSetFocus(pOldWnd);
  530. m_bExchange = TRUE;
  531. }
  532. void CComboBoxListCtrl::InitStyle()
  533. {
  534. SetFont (&g_listctrlfont);
  535. SetExtendedStyle(LVS_EX_FLATSB|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_HEADERDRAGDROP);
  536. }
  537. void CListCtrlComboBox::OnCloseup()
  538. {
  539. // TODO: Add your control notification handler code here
  540. CWnd* pParent = this->GetParent();
  541. ::PostMessage(pParent->GetSafeHwnd(),WM_USER_ComboBox_END,m_bExchange,0);
  542. }
  543. #undef SubclassWindow
  544. void CComboBoxListCtrl::PreSubclassWindow()
  545. {
  546. // the list control must have the report style.
  547. CListCtrl::PreSubclassWindow();
  548. m_ctlHeader.SubclassWindow ( GetHeaderCtrl()->GetSafeHwnd());
  549. }