CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    How to use "m_ofn.lpfnHook" to Customizing CFileDialog

    I want to custom a CFileDialog,
    but I don't know how to use "lpfnHook" attrib in "OPENFILENAME" struct.
    And I derive a new class from CFileDialog,
    how to get controls' message from CFileDialog after I custom a CFileDialog.


  2. #2
    Join Date
    Apr 1999
    Posts
    2

    Re: How to use "m_ofn.lpfnHook" to Customizing CFileDialog

    Well, if you haven't done it, check the Dev Studio help. Search for OPENFILENAME and then have a look at the Flags part way down, the flag OFN_EXPLORER will link you to an extensive help on the subject. I can give you a few hints from my memory though. Use the flags OFN_EXPLORER | OFN_ENABLEHOOK and then you need to set lpfnHook (in OPENFILENAME) to point to your Hook procedure (OFNHookProc type). You can also add controls by using a child template, add the flag OFN_ENABLETEMPLATE, and draw your template and set lpTemplateName (in OPENFILENAME) to the name of the template.
    Please reply if you still have problems and I should be able to dig up a directory browser class (derived from CFileDialog and using a child template) I made. I could post some code.

    /Magnus



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