CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    WTL. MDI - close file

    I added code in MainFrm for file closing like existing code for new file. But it does not work. What did I do wrong?
    Code:
    COMMAND_ID_HANDLER(ID_FILE_CLOSE, OnFileClose)
    
    LPRESULT OnFileClose(WORD, WORD, HWND, BOOL&)
    {
      return 0;
    }

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: WTL. MDI - close file

    In the above exemple you just handle a command message and do nothing in the handler function.
    What do you expect to happen?
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  3. #3
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: WTL. MDI - close file

    I need to get method call when file close event happens. Currently breakpoint does not work in this method.

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: WTL. MDI - close file

    Quote Originally Posted by user008 View Post
    Code:
    LPRESULT OnFileClose(WORD, WORD, HWND, BOOL&)
    OnFileClose has to be a class member function and yours is not.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  5. #5
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: WTL. MDI - close file

    Quote Originally Posted by ovidiucucu View Post
    OnFileClose has to be a class member function and yours is not.
    Why not?
    Code:
    class CMainFrame: ...
    {
    ...
    LPRESULT OnFileClose(WORD, WORD, HWND, BOOL&)
    {
    ...
    }
    ...
    }

  6. #6
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: WTL. MDI - close file

    Up

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