Thread: confusion from an MFC NOOB

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937

    confusion from an MFC NOOB

    I'm creating (perhaps that's a strong word) a multiple document web browser. I made the program skeleton using MSVC++6's MFC wizard- a multiple document viewing app loaded up with CHtmlView. What I'm trying to do is get a button on the toolbar to chnge the page that is currently being displayed. The problem is, the class that the toolbar function is in doesn't have access to the HtmlView functions, or access to any of the app's other classes that do. In the case that I include a header file of a class that does, I get flooded with errors. So tell me, how do I call Navigate2() from a toolbar?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    One solution is messages. Send a messages to main frame and have it dispatch an appropriate function.

    Kuphryn

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    And how might I do that?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Here are some essential Win32 API for sending messages.

    SendMessage()
    PostMessage()
    SendNotifyMessage()

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Noob Class Confusion
    By Freestyler in forum C++ Programming
    Replies: 16
    Last Post: 06-11-2009, 03:19 AM
  2. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  3. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 06:42 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 01:33 AM