WTL. MDI - close file
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: WTL. MDI - close file

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    67

    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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,051

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

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

    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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,051

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

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

    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
    67

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center