CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    May 1999
    Location
    Toronto, Ontario, Canada
    Posts
    155

    OFN_DONTADDTORECENT

    Anyone know what value of this constant (OFN_DONTADDTORECENT) is?

    Thx

    -Safai


  2. #2
    Guest

    Re: OFN_DONTADDTORECENT

    Put the code below somewhere in your program


    CString msg;
    msg.Format("OFN_DONTADDTORECENT=%d",OFN_DONTADDTORECENT);
    AfxMessageBox(msg);






  3. #3
    Join Date
    May 1999
    Location
    Toronto, Ontario, Canada
    Posts
    155

    Re: OFN_DONTADDTORECENT

    If this constant is defined, I don't have to ask for, do I?


  4. #4
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: OFN_DONTADDTORECENT


    I searched through the C++ source code and found many other OFN_.... but not the one you are after

    however, all values from 0x00000000 upto 0x00800000 are used, so there are only 8 more values available

    I suggest trial and error, Safai

    Sally


  5. #5
    Join Date
    May 1999
    Location
    Toronto, Ontario, Canada
    Posts
    155

    Re: OFN_DONTADDTORECENT

    Hi Sally,

    Yeah...I searched through both VC5 and VC6 and couldn't find it. It is documented on MSDN. (although it said it is for Windows 2000) You see, I am having this problem. I use CFileDialog to prompt the user for a filename to a save file (a .bmp file). But it automatically adds it in the recent document list after I hit OK on the file dialog. I tried setting the remaining flags to "1" but it still put the file in the recent document list. It wouldn't be nice to have that file in the recent document list when my program fails to write the file for some reason. This might be Windows 98 specific problem. Maybe you know a way around this problem.

    Thanks again, Sally.

    -Safai


  6. #6
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: OFN_DONTADDTORECENT

    How about managing the recent list yourself?

    Sally


  7. #7
    Join Date
    May 1999
    Location
    Toronto, Ontario, Canada
    Posts
    155

    Re: OFN_DONTADDTORECENT

    You mean deleting the 'lnk' file in the recent file directory when my program fails to create the file?

    (The file save dialog puts a filename in the recent file list automatically, well, at least on Win98)

    -Safai

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

Featured