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. GetOpenFileName

GetOpenFileName

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 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.
  • H Offline
    H Offline
    Hyien
    wrote on last edited by
    #1

    When calling GetOpenFileName w/ multi-select enabled, is there a way to determine the buffer space required by the lpstrFile pointer ?

    R PJ ArendsP 2 Replies Last reply
    0
    • H Hyien

      When calling GetOpenFileName w/ multi-select enabled, is there a way to determine the buffer space required by the lpstrFile pointer ?

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      I don't think so. GetOpenFileName() returns FALSE if you specify a buffer that's too small. I ran into this annoying problem some time ago, and now always allocate a generous (64K) buffer when I call the multiselect version of GetOpenFileName(). /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

      1 Reply Last reply
      0
      • H Hyien

        When calling GetOpenFileName w/ multi-select enabled, is there a way to determine the buffer space required by the lpstrFile pointer ?

        PJ ArendsP Offline
        PJ ArendsP Offline
        PJ Arends
        wrote on last edited by
        #3

        <click> This link is solution that works for win 98. I am trying to figure out how to do this with W2K without much luck so far. --- CPUA 0x5041 Sonork 100.11743 Chicken Little It may be that your sole purpose in life is simply to serve as a warning to others.

        Within you lies the power for good; Use it!

        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