Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:43:39+00:00 2026-06-03T22:43:39+00:00

I am using WS_EX_COMPOSITED style in my application but its running the CPU to

  • 0

I am using WS_EX_COMPOSITED style in my application but its running the CPU to 100%, is there way to stop my application drawing for a while and to resume only when i need ?
Some people are suggesting to use Sleep’s but where exactly in WndProc do i put sleeps ?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:43:40+00:00Added an answer on June 3, 2026 at 10:43 pm

    Don’t use Sleep. It is the solution to almost no problems.

    It’s true that WS_EX_COMPOSITED can hog CPU but mostly on XP in my experience. There is a much less significant performance hit on Vista and up. However, if your app is idle then it won’t be repainting. If your CPU is 100% and the app is idle then you are doing something wrong in your WM_PAINT handling. What you describe sounds like an endless loop of paint cycles. If you do things right, that won’t happen, even if you use WS_EX_COMPOSITED.

    As regards the right way to do double buffering, BeginBufferedPaint is the modern way to do this, on Vista and up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code to make a form transparent, but when the application
I know how to make my own application transparent using Layered Windows but I
I'm using WS class and it gave me error when I run the application:
I'm using JAX-WS web services (client and exposed services), is there any API to
I'm trying to put together a contract-first web application using Spring-WS. I want to
I am using the WM_EX_TRANSPARENT window style on some windows in an attempt to
I have a VS2008 C++ application for Windows XP SP3 developed using WTL 8.1.
I'm using Peter Below's PBThreadedSplashForm to display during application startup. It gets updated as
So I've got an OpenGL application running that can toggle between fullscreen mode and
When I enable common control visual style support (InitCommonControls()) and I am using any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.