Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Paint problem.

Paint problem.

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionc++graphics
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Martin Marvinski
    wrote on last edited by
    #1

    I have an MFC dialog app that has a Webbrowser object in it. I put a bitmap as a background to that application and now whenever something covers my dialog app, the webbrowser control doesn't get redrawn. How can I fix this problem? This is probably an easy question for many of you to solve, but embarrassingly it has left me scratching my head for the last half-hour. Your help in answering my question will be greatly appreciated. Thanks in advance. :-)

    T N 2 Replies Last reply
    0
    • M Martin Marvinski

      I have an MFC dialog app that has a Webbrowser object in it. I put a bitmap as a background to that application and now whenever something covers my dialog app, the webbrowser control doesn't get redrawn. How can I fix this problem? This is probably an easy question for many of you to solve, but embarrassingly it has left me scratching my head for the last half-hour. Your help in answering my question will be greatly appreciated. Thanks in advance. :-)

      T Offline
      T Offline
      Taka Muraoka
      wrote on last edited by
      #2

      I stumbled across an MSDN entry recently about something like this but I can't seem to find it now... :-( IIRC, the problem was related to the control's or the parent window's style not being set properly - you needed to add or remove WS_CLIPCHILDREN or WS_CLIPSIBLINGS. Something like that. Sorry for being so vague. HTH.


      You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica) Awasu 1.0[^]: A free RSS reader with support for Code Project.

      1 Reply Last reply
      0
      • M Martin Marvinski

        I have an MFC dialog app that has a Webbrowser object in it. I put a bitmap as a background to that application and now whenever something covers my dialog app, the webbrowser control doesn't get redrawn. How can I fix this problem? This is probably an easy question for many of you to solve, but embarrassingly it has left me scratching my head for the last half-hour. Your help in answering my question will be greatly appreciated. Thanks in advance. :-)

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #3

        I think the problem is the dialog has the CS_HREDRAW and CS_VREDRAW styles by default. In CDialog::PreCreateWindow register a new class without these styles. This will prevent the erasing of the entire window which is what these flags do when you move the window or some window comes on top. Now your browser control should hopefully stop behaving nastily :-) Nish


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups