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. Problem with SetLayeredWindowAttribute

Problem with SetLayeredWindowAttribute

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 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.
  • C Offline
    C Offline
    Cold_Fearing_Bird
    wrote on last edited by
    #1

    I've got problem with SetLayeredWindowAttribute, ever since I had set it, it wouldn't receive WM_PAINT anymore. But I have critical code in WM_PAINT. How to get WM_PAINT again while having SetLayeredWindowAttributes called?

    I 1 Reply Last reply
    0
    • C Cold_Fearing_Bird

      I've got problem with SetLayeredWindowAttribute, ever since I had set it, it wouldn't receive WM_PAINT anymore. But I have critical code in WM_PAINT. How to get WM_PAINT again while having SetLayeredWindowAttributes called?

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      I've just done a quick search, and found the following msdn article: http://msdn.microsoft.com/en-us/library/ms997507.aspx[^] Have look at the "Layered Windows" paragraph, specifically the line: "This is because SetLayeredWindowAttributes turns on the redirection of the window's drawing..." I realised it would be hard to experiment with a "real" application - but if I am having trouble, I always make a simple small application to work with, and make changes on. Once you understand how to make your small application that does nothing more that show a small red rectangle on the screen with varying transparency (for example), then you can make educated changes to your real application. Good luck! Iain.

      I am one of "those foreigners coming over here and stealing our jobs". Yay me!

      C 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        I've just done a quick search, and found the following msdn article: http://msdn.microsoft.com/en-us/library/ms997507.aspx[^] Have look at the "Layered Windows" paragraph, specifically the line: "This is because SetLayeredWindowAttributes turns on the redirection of the window's drawing..." I realised it would be hard to experiment with a "real" application - but if I am having trouble, I always make a simple small application to work with, and make changes on. Once you understand how to make your small application that does nothing more that show a small red rectangle on the screen with varying transparency (for example), then you can make educated changes to your real application. Good luck! Iain.

        I am one of "those foreigners coming over here and stealing our jobs". Yay me!

        C Offline
        C Offline
        Cold_Fearing_Bird
        wrote on last edited by
        #3

        Thanks Iain.Your reply is of real help. I agree that we should always test a unknown technique within a small application that has all focus on it.

        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