Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WIndows Sucks...GetOpenFileName COInitializeEx(COINIT_MULTITHREADED)

WIndows Sucks...GetOpenFileName COInitializeEx(COINIT_MULTITHREADED)

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suiram40
    wrote on last edited by
    #1

    open dilaog after 15 years does not work propertly. Do a simple app. Make it enter MTA. Pop up a Common Open/Save File Dialog. On Win2K Hangs When Selecting topmost My Documents Folder. On Win XP, By selecting my computer the list view is empty. On both OS-es sometime list of files is chopped (if does not hang meanwhile). I would apreciate any workaround. But after 15 years they could not get it right a ... so common open dialog...

    S 1 Reply Last reply
    0
    • S suiram40

      open dilaog after 15 years does not work propertly. Do a simple app. Make it enter MTA. Pop up a Common Open/Save File Dialog. On Win2K Hangs When Selecting topmost My Documents Folder. On Win XP, By selecting my computer the list view is empty. On both OS-es sometime list of files is chopped (if does not hang meanwhile). I would apreciate any workaround. But after 15 years they could not get it right a ... so common open dialog...

      S Offline
      S Offline
      suiram40
      wrote on last edited by
      #2

      around.: [code] class COd : public CFileDialog { public: COd(BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST, LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL):CFileDialog(bOpenFileDialog, lpszDefExt , lpszFileName , dwFlags , lpszFilter , 0 ) { } int DoModal(){ return CFileDialog::DoModal(); } BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) { BOOL ret = CFileDialog::OnNotify(wParam, lParam, pResult); OFNOTIFY* pNotify = (OFNOTIFY*)lParam; switch(pNotify->hdr.code) { case CDN_TYPECHANGE: { CWnd* pWnd = GetActiveWindow(); CWnd* PDlg = pWnd; if(pWnd) { GetFocus()->PostMessage(WM_KEYDOWN,VK_RETURN,0); GetFocus()->PostMessage(WM_KEYUP,VK_RETURN,0); } } break; } return ret; } virtual void OnFolderChange() { TCHAR cs[128]; CWnd* pWnd = GetActiveWindow(); CWnd* PDlg = pWnd; CWnd* PSlv = 0; int relation = GW_CHILD|GW_HWNDFIRST; while(pWnd = pWnd->GetWindow(relation)) { GetClassName(pWnd->m_hWnd, cs,128); if(!strcmp("SHELLDLL_DefView",cs)) { CWnd* pSave = pWnd; int relation = GW_CHILD|GW_HWNDFIRST; while(pWnd = pWnd->GetWindow(relation)) { GetClassName(pWnd->m_hWnd, cs,128); if(!strcmp("SysListView32",cs)) { PSlv = pWnd; break; } relation = GW_HWNDNEXT; } pWnd = pSave; } relation = GW_HWNDNEXT; } } }; class DlgWrap { public: DlgWrap(BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL, DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEP

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups