hello problem with displaying the controls
-
hello all, i have a problem with creating a dialog inside a dialog and removing it . i mean by creating dialog is embedding the dialog with the help of a picture frame and i did that by doing this piece of code m_GAUserEnteredOption.Create(this, IDC_S_VIEW_USERENTEREDOPTION, IDR_F6CP_MAINFRAME, RUNTIME_CLASS(CGADocument), RUNTIME_CLASS(CGAMainFrame), RUNTIME_CLASS(CDigitalUserOption), WS_CHILD | WS_VISIBLE, 0L); and i did this because on the original dialog i couldnt place anymore controls since it was overflowing (crossed 255) , but once i embedd this dialog i cant remove it. i tried using destroywindow() or closewindow() its not working . and i cant get to the original controls which are on this place before . how to remove this frame and dialog through code . if anybody knows it plz help me
"Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
-
hello all, i have a problem with creating a dialog inside a dialog and removing it . i mean by creating dialog is embedding the dialog with the help of a picture frame and i did that by doing this piece of code m_GAUserEnteredOption.Create(this, IDC_S_VIEW_USERENTEREDOPTION, IDR_F6CP_MAINFRAME, RUNTIME_CLASS(CGADocument), RUNTIME_CLASS(CGAMainFrame), RUNTIME_CLASS(CDigitalUserOption), WS_CHILD | WS_VISIBLE, 0L); and i did this because on the original dialog i couldnt place anymore controls since it was overflowing (crossed 255) , but once i embedd this dialog i cant remove it. i tried using destroywindow() or closewindow() its not working . and i cant get to the original controls which are on this place before . how to remove this frame and dialog through code . if anybody knows it plz help me
"Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
If you know that you will need it by all means, why dont you design it in your resource editor, stablish a class to it and use DoModal? It will be easier.
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)
-
If you know that you will need it by all means, why dont you design it in your resource editor, stablish a class to it and use DoModal? It will be easier.
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)
hi , its not supposed to be a child window but in the same dialog i need it . it doesnt have any ok or cancel button ,its just a formview class dialog attached to another dialog . like a patch of new set of controls it will attach to original dialog and it has another class also for that. but i cant remove through code once it is attached .
"Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
-
hi , its not supposed to be a child window but in the same dialog i need it . it doesnt have any ok or cancel button ,its just a formview class dialog attached to another dialog . like a patch of new set of controls it will attach to original dialog and it has another class also for that. but i cant remove through code once it is attached .
"Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal
And why dont u use a simple dialog and resize it to have more working surface? I have more than one VariabledSize Dialog in one project, and more than one view (up to 28 CFormViews in 4 types with different sizes according to the type they belong). But I didn't mix things, CFormViews are in independant frames, and Dialogs are "unique". To make the Dialog with variable size, I designed it in my resource editor with ALL the controls I needed and set them to not visible, then according to the parameters that determined how many of the should be visible... I used the SetWindowPos / MoveWindow to change the size and made visible just the controls that must be shown. does the idea help you? If not... I ask you for a better explanation, im not english speaker and I have not understood what you need
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)