Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
998 B

  1. #ifdef FORWARD_DECLS
  2. class CSelControlDlg;
  3. #else // FORWARD_DECLS
  4. #ifndef __SELCONTROLDLG_H__
  5. #define __SELCONTROLDLG_H__
  6. enum {
  7. SCDR_OK = 1,
  8. SCDR_CANCEL,
  9. SCDR_NOFREE,
  10. };
  11. class CSelControlDlg : public CFlexWnd
  12. {
  13. public:
  14. CSelControlDlg(CDeviceView &view, CDeviceControl &control, BOOL bReselect, DWORD dwOfs, const DIDEVICEINSTANCEW &didi);
  15. ~CSelControlDlg();
  16. int DoModal(HWND hParent);
  17. DWORD GetOffset() {return m_dwOfs;}
  18. protected:
  19. virtual void OnInit();
  20. virtual LRESULT OnCommand(WORD wNotifyCode, WORD wID, HWND hWnd);
  21. virtual BOOL OnEraseBkgnd(HDC) {return FALSE;}
  22. private:
  23. BOOL m_bReselect;
  24. DWORD m_dwOfs;
  25. BOOL m_bAssigned;
  26. const DIDEVICEINSTANCEW &m_didi;
  27. friend BOOL CALLBACK AddItem(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef);
  28. BOOL AddItem(const DIDEVICEOBJECTINSTANCE &doi);
  29. CDeviceControl &m_control;
  30. CDeviceView &m_view;
  31. HWND m_hList;
  32. BOOL m_bNoItems;
  33. int GetItemWithOffset(DWORD dwOfs);
  34. };
  35. #endif //__SELCONTROLDLG_H__
  36. #endif // FORWARD_DECLS