Thread: MFC :: WM_SIZE message causes access violation?

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Unhappy MFC :: WM_SIZE message causes access violation?

    Hello there. I am currently developing a simple web browser application using MFC, MS Visual C++ 6.0. That is not the difficult part. I have the navigation toolbar (Back, Forward, Stop, Refresh, and Home buttons), the address bar (CComboBox for typing a URL, etc.) and the "Go" button. I also have a working progress bar as a child of the status bar. As a matter of fact, I am using my browser right now. It is mostly functional, except I don't have the history, favorites, and a few more things completed. Along with that, I have a general preferences option. That's where you can clear the history and set the home page.

    Usually when a web browser application is created using MFC (CHtmlView) it uses MS Internet Explorer's settings, but I am changing mine around so it uses its own independent settings. Instead of the default "GoHome()" function, I have created an overloaded "GoHome()" function that reads the user's home page our of the registry (under MY OWN registry key) =). Anyhow, I am trying to use the WM_SIZE message (CMyView::OnSize) function to resize the status bar, but it comes up with an access violation. It just takes me to an Assembly debug window when I choose to debug.

    Do I need to do something like this before I resize the status bar?:

    if (m_wndStatusBar)
    {
    // Blah, Blah, Blah
    // ..........
    }

    Any help is appreciated!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    How are you sending the WM_SIZE message to the control?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FtpFileFind access violation with MS VC++ 6.0
    By earth_angel in forum C++ Programming
    Replies: 3
    Last Post: 09-22-2005, 07:02 PM
  2. MFC Assertion Failure
    By maxthecat in forum Windows Programming
    Replies: 5
    Last Post: 08-01-2002, 09:58 AM
  3. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Sending CChildView a Message :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-06-2002, 03:00 PM