Creating a Transparent Editbox with No Redraw Problems

Environment: Tested Platforms: Windows 98, Windows 2000, Windows NT

I have written this article to make an edit box transparent. It is very easy to make it transparent when there isn't a bitmap image in the dialog background. But, if you have a bitmap in your dialog background and you make editbox transparent, it will become transparent but will not be redrawn properly.

I have found many programmers suffering with this problem, including me, until I wrote this article. The problem was that making an edit box transparent is very easy in a common case, but whenever you use a bitmap background, it will become a little hard to do. The main problem is that the contents of the edit box will not be redrawn properly.

Here, with this cool code, I have solved this problem. I hope it will be helpful to someone.

About the Author

Hi! Guys,
I am not a well experienced programmer but always try to do my best. So, that's why I wrote this useful article. I am working in a company as senior programmer. We develop software and hardware related to video mixing and photography. My desire is to do a lot in the graphics and image processing fields (using VC++). This is my beginning, so maybe you will not be comfortable with my code. But, your appreciation will become an inspiration for me.

Downloads

Download source - 35 Kb


Comments

  • Is there a simple functin like the inputbox in visual basic?

    Posted by Legacy on 08/19/2003 12:00am

    Originally posted by: schunter

    Reply
  • Doesn't run in WinXP

    Posted by Legacy on 03/05/2003 12:00am

    Originally posted by: youkefei

    as title.

    • Not working in W2K as well...

      Posted by myron on 03/23/2006 10:49pm

      No transparent effect. (At least on my local test.)

      Reply
    Reply
  • transparent edit ctrl

    Posted by Legacy on 02/01/2003 12:00am

    Originally posted by: malavika

    Reply
  • Something wrong......

    Posted by Legacy on 01/26/2003 12:00am

    Originally posted by: Tome

    If you set multiline property of edit control, and when scroll the edit content, the background bitmap scroll too, how to solve this problem?

    ==============================================
    SkinMagic SDK Library for C/C++
    The better solution for skinnable application
    http://www.appspeed.com/
    ===============================================

    Reply
  • How about multiline edit?

    Posted by Legacy on 01/26/2003 12:00am

    Originally posted by: Tome

    If set multiline property, when scroll the text, background image be scrolled too, how to sovle this problem?

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The rapid evolution of enterprise storage technologies, combined with external forces, like the explosion of big data, can cause Linux® and server administrators to play catch-up when it comes to storage. Running a bunch of monolithic storage devices and proprietary, disconnected technologies forces administrators to spend valuable time creating and managing complex solutions. To reduce complexity and enable rapid deployment of new technologies and applications, server administrators need a single open …

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds