In my previous question I have sorted out how to create container dependent control. Now, I am getting problem in that control. the design of control is little bit confusing. the design is looks like this.
In this design, developer could not add control outside the Page Control. The PageControl will be added automatically in the client area. I want to prevent user to add control outside the PageControl. I am not going to make confusion any more. So, my question is how do I do this?
You can see class declaration in my previous question
If you have any other idea to do this then please suggest me.
UPDATE:
Control should look like this.
but, After assigning non-client area the placed control goes inside the client area. I want to prevent user to add control in that portion.
The easy way
The easiest way is to recalculate the bounds of the
XWizardPage
whenever the size of its parent changes.The hard way
The hard way requires native calls. I cannot append a complete solution as this is pretty complex, though doable. The term you're looking for is nonclient area. There are many tutorials on the web, and you should do a search.
The following code is just an example to show you where to start and is not a final solution. For this to work perfect, you'll need to handle
Window redraw
,Mouse events
etc.