Archived

This topic is now archived and is closed to further replies.

brassfish89

child windows

Recommended Posts

I want to create a custom toolbar for my paint program (kinda like the ms paint toolbar except wider and on the other side). I made a topmost child window and resized and repositioned it every time the parent window's size changed. That worked find, but I also have other child windows and when I maximize it it just goes underneath the toolbar. How can you make it to maximize to the full window? for example, in pixia (another paint program) it has a custom toolbar (its not created by CreateToolbarEx), and when I maximize a child window it puts all of the boxes in the menu to the far right and it fills up the whold client area except the toolbar. How can I do that? Also, one more Q. My child windows are always grayed for some reason. I click on there title bar and they stay grayed. Also, when I put one over another and click on the bottom one and move it, it doesn't repaint its client area. thx brassfish
-If you see this image I may or may not be online My website

Share this post


Link to post
Share on other sites
hmm... If I understand your question, I think the solution is to catch the WM_SIZE message in your child windows which you want to resize. And then check wParam for SIZE_MAXIMIZED. And then get the left and right position of your tool window and set the size of the child window which you are maximizing to this.

Your child windows grayed? hmm that sound like you are calling the wrong defwindow procedure... Try calling DefMDIChildProc instead.

Share this post


Link to post
Share on other sites
quote:

hmm... If I understand your question, I think the solution is to catch the WM_SIZE message in your child windows which you want to resize. And then check wParam for SIZE_MAXIMIZED. And then get the left and right position of your tool window and set the size of the child window which you are maximizing to this.


Yeah, that''s what I wanted to do origanally. But can you change the size of a maximized window and still keep the minimize button?
quote:

Your child windows grayed? hmm that sound like you are calling the wrong defwindow procedure... Try calling DefMDIChildProc instead.


Oops, I was using defwindowprocedure I''ll try that.



-If you see this image I may or may not be online
My website

Share this post


Link to post
Share on other sites
quote:

Yeah, that''s what I wanted to do origanally. But can you change the size of a maximized window and still keep the minimize button?


Yes that must be possible, otherwise microsoft has made a big screw-up. However the best way to find out is try it

Share this post


Link to post
Share on other sites