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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Urgent: ActiveX and repaint issues.

Urgent: ActiveX and repaint issues.

Scheduled Pinned Locked Moved C / C++ / MFC
c++comdebugginghelpquestion
2 Posts 2 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.
  • O Offline
    O Offline
    Oz Ben Eliezer
    wrote on last edited by
    #1

    Hey all! I'm semi-desperate. I developed an ActiveX control that runs within IE, using ATL. In it, I use owner-drawn controls and common controls (listview, tabbed control). Sometimes (more often on win98 than on win2k / xp), when a dialog (generated by the ActiveX or by another application) covers part of the ActiveX, and then is removed (closed, not dragged away) - some (or all) of the area that was previously covered is not repainted. This behavior startled me - so I decided to use remote debugging, to hunt down the WM_PAINT and related messages. I was able to recreate a procedure during which a dialog covered part of the ActiveX - and when I removed it - one of the owner-drawn buttons was not repainted (a grey rectangle appeared instead of the button's image). I put a breakpoint inside ATL's ProcessWindowMessage (the function that is inserted by the BEGIN_MSG_MAP() macro). After dismissing the dialog - NO MESSAGES WHATSOEVER were sent to the application! I also noticed that sometimes when a convering window is closed and the ActiveX seems to be properly repainted - no messages are received (as if Windows "remembered" the content of the control). Sometimes even tooltips leave a grey rectangle behind them when they disappear! (this happens a lot in Win98). The ActiveX control has its own HWND. Im not sure I fully understand the way the ActiveX control receives messages. Does its window receives messages directly from Windows, or do messages somehow pass through IE? And at any case - can anyone offer a solution to this problem? (or at least give me a lead...) Thanks a lot in advance! Oz

    D 1 Reply Last reply
    0
    • O Oz Ben Eliezer

      Hey all! I'm semi-desperate. I developed an ActiveX control that runs within IE, using ATL. In it, I use owner-drawn controls and common controls (listview, tabbed control). Sometimes (more often on win98 than on win2k / xp), when a dialog (generated by the ActiveX or by another application) covers part of the ActiveX, and then is removed (closed, not dragged away) - some (or all) of the area that was previously covered is not repainted. This behavior startled me - so I decided to use remote debugging, to hunt down the WM_PAINT and related messages. I was able to recreate a procedure during which a dialog covered part of the ActiveX - and when I removed it - one of the owner-drawn buttons was not repainted (a grey rectangle appeared instead of the button's image). I put a breakpoint inside ATL's ProcessWindowMessage (the function that is inserted by the BEGIN_MSG_MAP() macro). After dismissing the dialog - NO MESSAGES WHATSOEVER were sent to the application! I also noticed that sometimes when a convering window is closed and the ActiveX seems to be properly repainted - no messages are received (as if Windows "remembered" the content of the control). Sometimes even tooltips leave a grey rectangle behind them when they disappear! (this happens a lot in Win98). The ActiveX control has its own HWND. Im not sure I fully understand the way the ActiveX control receives messages. Does its window receives messages directly from Windows, or do messages somehow pass through IE? And at any case - can anyone offer a solution to this problem? (or at least give me a lead...) Thanks a lot in advance! Oz

      D Offline
      D Offline
      Douglas Troy
      wrote on last edited by
      #2

      Hey, you may already have the answer to your question, but if you don't I might be able to point you in the right direction. I recently dealt with a host of ActiveX issues myself, and I recalled reading that messages are dispatched to the container class, and you are responsible for getting those messages, and passing them through to your control. Check out the MSDN Topic "Active Technology" and go from there, I beleive you'll find at least an example of how messages are passed to the control. In terms of Win98 Repaint messages not being sent, don't know about that, but I would install the latest Service Pack and the latest Video Card drives on that machine before I started pulling my hair out. D.

      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