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 4019868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:09:28+00:00 2026-05-20T10:09:28+00:00

My classmates started using Delphi with pascal but I as c++ porgrammer have to

  • 0

My classmates started using Delphi with pascal but I as c++ porgrammer have to use win32 API. They were changing background color so I need to know this aswell but there are some differencies.

In delphi each form looks like it has it’s own instance, and setting background color for one window is just a matter of changing one value. Not the case with win32 where when you change that value it affects every window using that class (after update ofc).

What I need to do is to clear/erase my window background. I can do that with FillRect(..) and it’s working very nicely, but I’ve found also WM_ERASEBKGND which seems to be doing exactly what I need. They mentioned that if this message gets proccessed I should return a non-zero, but they didn’t tell how to process it.

So could anything else then FillRect(and similliar) let me erase a window with a brush I defined and not with the default for class?

Thanks

  • 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-05-20T10:09:29+00:00Added an answer on May 20, 2026 at 10:09 am

    You process WM_ERASEBKGND simply by erasing the background (using FillRect() is fine).

    By returning a non-zero value, you are simply telling Windows that this message has been taken care of and no further action is needed. There is nothing more formal than that.

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

Sidebar

Related Questions

I have some java code that I want to share with some classmates however
While working on a larger project, a few lines of code using java.net.Socket failed
One of my old classmates just asked me this and I'm at a total
I shall be working with my classmates over a Flex project, and we would
I want to know when we need to use the abstract factory pattern. Here
I have a table that looks like this: ID / Description / textValue /
I have the following helper in my application_helper.rb file: def topmenu pages = {
How to hide a table row that has no unique id, but row just
I have two cocoa-touch apps in one Xcode project. Xcode gives me iPhone/iPad related
Some classmates and I are working on a homework assignment for Java that requires

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.