Results 1 to 2 of 2

Thread: Open, Save dialog

  1. #1

    Thread Starter
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335

    Open, Save dialog

    How can i show the open, save, and color dialog?

    I know to get the open i used
    VB Code:
    1. void OpenF(HWND hwnd,char *vFilen)
    2. {
    3.         OPENFILENAME ofn;
    4.     char szFileName1[MAX_PATH] = "";
    5.  
    6.     ZeroMemory(&ofn, sizeof(ofn));
    7.  
    8.     ofn.lStructSize = sizeof(ofn); // SEE NOTE BELOW
    9.     ofn.hwndOwner = hwnd;
    10.     ofn.lpstrTitle = "Open";
    11.     ofn.lpstrFilter = "Ini File (*.ini)\0*.txt\0All Files (*.*)\0*.*\0";
    12.     ofn.lpstrFile = szFileName1;
    13.     ofn.nMaxFile = MAX_PATH;
    14.     ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
    15.     ofn.lpstrDefExt = "ini";
    16.  
    17.     if(GetOpenFileName(&ofn))
    18.     {
    19.         vFilen = szFileName1;
    20.         // Do something usefull with the filename stored in szFileName1
    21.     }
    22.  
    23. }

    But i get a cancel error. How do i do this so i can intercept the cancel error and how do i show the save and color alos thanks in advance
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  2. #2

    Thread Starter
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335
    Is there a better dialog to use? And is there a site you can send me to ?
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width