Okay, well I thought I might share what I've been working on recently. I have been in the process of making a new GUI library. It is going to have a lot of my customized controls, as well as some new ones. One major thing I am making is a Themed Window which allows the user to take control of all Nonclient messages in the form of events. Now most of the themed window work, but the parts that don't are a major problem. So here is the tutorial I am following: http://geekswithblogs.net/kobush/articl ... Forms.aspx
Now it seems as if the border only renders (or draws) when the form gets re-sized. It has the client area, but it takes that of the background behind the client area, Here's some pictures to show you what I mean:
Now that is when the form has focus, the user can start using the form. Even though you cannot see it, it does in fact have a client area. To prove it, drag it around!
Now as you can see, it took what was behind the form, and used it as the client area. Now as soon as we re-size the form it changes to this:
Now as you can obviously tell, it doesn't render an icon, caption buttons, or name of the form. It just renders the border, which is all I'm working on for now.
If anyone ever worked with this, and could provide some help, it would be greatly appreciated.
Custom UI Library Issues
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
- OwnZ joO
- Posts: 1197
- Joined: Sun Dec 09, 2007 4:46 pm
Re: Custom UI Library Issues
I haven't really messed with that, but did you download there example code and see if it had the same problem as yours. It seemed like they mentioned in their tutorial the problem of it not being drawn without handling some other windows messages as well, but I'm assuming you covered those as well and did the whole tutorial right?
- Click16
- Posts: 1941
- Joined: Mon Dec 31, 2007 4:36 am
- Location: United States
Re: Custom UI Library Issues
Yes, I did download the example code. I figured out the problem as well. On the Non client activate message, it doesn't fully get passed to the paint event. So when the non client area gets activated, I used the InvalidateWindow() method which re paints the whole form, instead of just the client area. So now it works! I also fixed a lot of the sizing errors with InvalidateWindow();OwnZ joO wrote:I haven't really messed with that, but did you download there example code and see if it had the same problem as yours. It seemed like they mentioned in their tutorial the problem of it not being drawn without handling some other windows messages as well, but I'm assuming you covered those as well and did the whole tutorial right?