Results 1 to 5 of 5
  1. #1
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425

    message handler macro for OnVisible method

    does anyone know what macro i need to add to the message map in order to use the OnVisible() method in the CHtmlView class. what i want to do is allow the user be able to show or not show the web browser (chtml view object). this is how i am currently doing it. i call the OnVisible method and pass a boolean value (i overloaded OnVisible() in the CHtmlView class). Then the OnVisible method calls the SetVisible method of the chtmlview object and passes the boolean value passed to the OnVisible method. Am i doing this correctly? shouldn't there be a macro in the message map since the method OnVisible is an event? if anyone can clear up how to properly do this i would greatly appreciate it.

    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425
    bumpity bump bump
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound

  3. #3
    Moderator smcd's Avatar
    Join Date
    Jun 2004
    Posts
    2,503
    I don't use MFC (mainly for reasons such as this problem, and the others you have with it) or I'd answer you to keep the bumpity down

  4. #4
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425
    here's the solution to anyone who might be interested in the future. took me alot of reading in msdn to figure this out.

    CWnd *pBrowser;
    pBrowser = GetDlgItem(IDC_WEB_BROWSER);
    pBrowser->ShowWindow(TRUE);

    i think this can probably be used for most MFC crontrols (static controls, buttons, etc). The GetDlgItem() method recieves the resource id of the control whose view you want to toggle, and the ShowWindow() method recieves either TRUE or FALSE, TRUE if you want to show the control, FALSE if you want to hide the control.
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound

  5. #5
    Moderator smcd's Avatar
    Join Date
    Jun 2004
    Posts
    2,503
    Ah, I don't think I initially understood exactly what you wanted to do. Glad to see you got it working & shared for anyone who might use it in the future.

Similar Threads

  1. Zero is innocent! could be?
    By Renegade in forum Talk of the Town
    Replies: 72
    Last Post: March 17th, 2002, 12:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •