Thread: Open/Save Dialog with BC++ 6.0

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    81

    Open/Save Dialog with BC++ 6.0

    I'm trying to get the Common Open/Save dialogs to come up but they won't display no matter what I try, I'm using Borland C++ Builder 6.0 and i've tryed just about all the examples with getopenfilename on this forum and msdn site I could find. Nothing works.
    Code:
      case ID_FILE_LOAD:
      {
          char FileName[MAX_PATH];
          OPENFILENAME ofn;
          ZeroMemory(&ofn, sizeof(ofn));
          ofn.lStructSize = sizeof(ofn);
          ofn.hwndOwner = hwnd;
          ofn.lpstrFile = FileName;
          ofn.lpstrFile[0] = '\0';
          ofn.nMaxFile = sizeof(FileName);
          ofn.lpstrFilter = "All\0*.*\0Text\0*.TXT\0";
          ofn.nFilterIndex = 1;
          ofn.lpstrFileTitle = NULL;
          ofn.nMaxFileTitle = 0;
          ofn.lpstrInitialDir = NULL;
          ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
          GetOpenFileName(&ofn);
     } break;
    Last edited by ColdFire; 08-25-2003 at 05:55 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  3. Visual C++ 6.0 Sliders in Dialog Boxes
    By The Letter J in forum C++ Programming
    Replies: 24
    Last Post: 12-30-2004, 12:00 PM
  4. How to modify file open/save dialog?
    By _Elixia_ in forum Windows Programming
    Replies: 3
    Last Post: 07-05-2003, 11:41 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM