i need to make a class that have a pointer to mfc class and to turn on and off the gui and also开发者_C百科 to have the option to take data from the gui. thank you.
By "turn on and off the GUI" I will assume you mean hide or display the main window, since you haven't provided a good description of what you're looking for. You can use CWnd::ShowWindow with a parameter of SW_HIDE
to turn the window off, and use SW_SHOW
or SW_RESTORE
to show it again.
By "option to take data from the GUI" I will assume you want to do Copy and Paste from the GUI to another application. That's a much larger subject. Here's some sample code:
OpenClipboard();
EmptyClipboard();
SetClipboardData(CF_TEXT, dataHandle);
CloseClipboard();
You can find a lot more information in Microsoft's guide to Using the Clipboard.
精彩评论