Jump to content
  • Advertisement
Sign in to follow this  
Pete1051

[.net] User controls not redrawing...

This topic is 4491 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm rendering onto a Panel, which I set the WmPaint & Opaque for that panel to true, but now other normal controls, like my RichTextBox, are not properly refreshing. The aplication comes up and the DirectX render panel is there, but my RichTextBox has not painted itself. Once I move or re-size the form, it paints. And if I dock the two into a splitter, the RichTextBox wont re-paint when the splitter is re-sized, again I have to move the parent form to force it to repaint. Invalidating the RTBox dosent work. Dosen't seem like GDI and DirectX like to play nice with each other.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If what you are saying is that your controls don't paint when on top of a directx redered panel, then try rendering on PaintBackground event not on Paint.

Share this post


Link to post
Share on other sites
I don't see a "PaintBackground" event anywhere.


I'm using a Panel control to render DirectX.

I'm using a RichTextBox to display debug text.
(I'm also planning on adding some buttons other input controls)

I recently tried putting the RichTectBox on a different form, still comes up 1st time completely transparent through to behind the form. I move something over or across it or resize it, then it re-paints. It works a little better than when it was in the same form, but still buggy at startup.

Seems to me that DirectX really wants total control of the screen, and will fight with GDI in windowed mode.

I'm tryin to make an editor here. But looks like I'll be sidetracked making some basic UI controls in DirectX (I looked at the SDK samples, useless).

Oh well, the old fashoned GDI controls don't work right even by themselves, I like things to cleanly refresh any time you change them. Windows dosen't like to redraw all the time. Hopefully Vista will be a little nicer,maybe, after a couple service packs, somewhere around 2009. I'm expecting another "windows 95" situation though when they release it. Microsoft has a bad habit of releaseing incomplete software. But hopefully someday we can retire the buggy ass GDI.


...Still dont know where you get a "PaintBackground" event from.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!