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. XP CFileDialog & RichEdit multithreaded app

XP CFileDialog & RichEdit multithreaded app

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

    I have an app whs entering MTA instead STA by calling HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); Now on Windows XP OS all common openfile dialogs behave 'microsoft way' Any FileOpen Dialog even the style is OFN_EXLORER, or not, or even I am using extended structure to get the XP left crap I get folowings. Current browsing folder have only bmp files. In FileType Combobox I have 2 file filters, eg. (*.bmp) and (*jpg) Default selection is bmp. I see the bmp files in the listview. I am changing the File Types: to jpg. The list view is empty. Now I change back to bmp. The list box is still empty !!!. There is no way to repopulate the list view unless I type explicit the *.bmp in the File Name Edit Control. Also none of the rich edit controls work. They crash. If I join a STA CoInitialize() everithing is OK but I need the MTA. If you know any work around couse I searched at msdn and ... Thank you.

    S 1 Reply Last reply
    0
    • S suiram40

      I have an app whs entering MTA instead STA by calling HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); Now on Windows XP OS all common openfile dialogs behave 'microsoft way' Any FileOpen Dialog even the style is OFN_EXLORER, or not, or even I am using extended structure to get the XP left crap I get folowings. Current browsing folder have only bmp files. In FileType Combobox I have 2 file filters, eg. (*.bmp) and (*jpg) Default selection is bmp. I see the bmp files in the listview. I am changing the File Types: to jpg. The list view is empty. Now I change back to bmp. The list box is still empty !!!. There is no way to repopulate the list view unless I type explicit the *.bmp in the File Name Edit Control. Also none of the rich edit controls work. They crash. If I join a STA CoInitialize() everithing is OK but I need the MTA. If you know any work around couse I searched at msdn and ... Thank you.

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

      RIch Edit is still screwed up at least I solve it with the dialog: 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; }

      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