Beispiel #1
0
INT_PTR onListFinished (HWND hDlg, WPARAM wParam, LPARAM lParam)
{
	LTPD* ltpd = (LTPD*) lParam;
	HWND hPanel = GetDlgItem (hDlg, ltpd->itemId);
	UINT diskListId = (UINT) GetProp (hPanel, L"diskListId");
	EnableWindow (GetDlgItem(hDlg, diskListId), TRUE);
	SendMessage (hPanel, WM_SETREDRAW, (WPARAM) TRUE, 0);
	InvalidateRect (hPanel, NULL, NULL);
	removeOperationThread (hPanel);
	FmPanelProps* props = (FmPanelProps*) GetProp (hPanel, L"Props");
	NMLISTVIEW nmlv = {0};
	nmlv.iSubItem = props->sortColumnIndex;
	onColumnClick (hDlg, ltpd->itemId, (LPARAM) &nmlv);
	delete ltpd;	
	return 0;
}
Beispiel #2
0
   bool  ListView::onNotify(const UINT  iControlID, NMHDR*  pHeader)
   {
      bool   bResult = Unhandled;

      try
      {
         switch (pHeader->code)
         {
         case LVN_BEGINDRAG:     bResult = onBeginDrag(pHeader, reinterpret_cast<NMLISTVIEW*>(pHeader));             break;
         case LVN_COLUMNCLICK:   bResult = onColumnClick(pHeader, reinterpret_cast<NMLISTVIEW*>(pHeader));           break;
         case LVN_GETDISPINFO:   bResult = onRetrieveItem(pHeader, reinterpret_cast<NMLVDISPINFO*>(pHeader)->item);  break;
         case LVN_ENDLABELEDIT:  bResult = onLabelEditEnd(pHeader, reinterpret_cast<NMLVDISPINFO*>(pHeader)->item);  break;

         default:                bResult = BaseControl::onNotify(iControlID, pHeader);                                break;
         }

         return bResult;
      }
      catch (WindowsException&  ex) 
      {
         ex.Display(HERE, Handle);
         return Unhandled;
      }
   }