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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:08:18+00:00 2026-06-08T04:08:18+00:00

I have created edit box using Win32 C++. I have subclassed it and overridden

  • 0

I have created edit box using Win32 C++. I have subclassed it and overridden OnPaint menthod in which I am filling it with some background color.

Now if I enter some text I am not able to see any text but I can see cursor moving.

If I dont put any background color I can see text in edit box.

Any idea why I am not getting text with background color?

  • 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-08T04:08:20+00:00Added an answer on June 8, 2026 at 4:08 am

    You are not supposed to handle WM_PAINT for the edit control. Here you are just trying to fill the background color, but in the process you are not allowing the original edit control procedure to paint the content, and in this case it is the text you entered. The cursor will be visible because it is shown using ShowCaret function.

    So if you want to just change the background color of the edit control, handle WM_CTLCOLOREDIT and WM_CTLCOLORSTATIC in the parent window and return the brush. Refer http://msdn.microsoft.com/en-us/library/windows/desktop/bb761691%28v=vs.85%29.aspx

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

Sidebar

Related Questions

So I have created a context box upon right click that has Add/Edit/Delete Rows.
How do I create an edit dialog box using jquery? Let say I have
I have successfully created a feature in sharepoint that modifies the existing edit dialog
I have created some JQuery that will expand a div 'popup' on hover and
I have created an android application that calls (using kSOAP library) a SOAP based
Hi I have created user control for re-sizable text box. <asp:Panel ID=PanelText runat=server CssClass=frameText>
I have recently begun learning the Win32 API using this tutorial: http://www.winprog.org/tutorial/ (though I'm
I am trying to use a textarea form entry which I have some javascript
I have created a new ASP.NET MVC project using the MVC Project Template. According
I have created an app that performs all CRUD operations remotely using Jquery. In

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.