Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi!

I create Cdialog which contain different handlers. On this Cdialog I create CSizingControlBar: resizable control bar(who can dragged outside Dailog)
So, can I use Cdialog only as event handler and not to call .doModal() for him? In other words, I whant not to show Cdialog but his members(CSizingControlBars) shold be shown.

P.S. CSizingControlBar is a working bar which I can move across the screen. I can put to CSizingControlBar what ever I want.
http://www.datamekanix.com/sizecbar/
Posted

1 solution

I'm not sure that what you are asking is the best way to do what you want. I'd think if you don't actually want to show the CDialog, then you'd create the CSizingControlBar in some other parent window and use the handler there. In any case, to answer your question:

If you don't want to call DoModal() on your dialog, you'll need to create the window using Create():

http://msdn.microsoft.com/en-us/library/yhth57kd(v=vs.90)[^]

Typically for a non-modal dialog, you'd call Create() and then ShowWindow(SW_SHOW). See the example text in the link above.

However, you could call ShowWindow(SW_HIDE) if you want the dialog to be hidden. (You'd have to call ShowWindow on the child control I think.)
 
Share this answer
 
Comments
Diego2la 12-Apr-12 15:21pm    
Thanks, man, for the many good ideas !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900