简体   繁体   中英

How hide dialog MFC?

I need to create dialog and button.When I click on button with arrow dialog hide, it should looks like dialog moves to top and in ahother case shows for user. ShowWindow(SW_HIDE). I know about it. I guess to get CRect from window, change it and after that set it to ScreeToClient(). Probably somebody knows some examples with it or another ways? thanks

To hide or show a window, you use ShowWindow() as you indicated. No rectangle needed.

Otherwise, please re-explain your question, I can't make head or tails of it.

Normally, if you need to show a dialog that contains settings (similar to the Visual Studio "Options" dialog) then what you would typically do is this:

  • List item.
  • Create a CDialog-derived class.
  • Create an instance of that class.
  • call DoModal on that object. This shows the dialog.
  • Do nothing else. Once DoModal returns the dialog has been closed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM