Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. hello problem with displaying the controls

hello problem with displaying the controls

Scheduled Pinned Locked Moved C / C++ / MFC
helpdelphitutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chethu665
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • C chethu665

      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

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #2

      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 ;)

      C 1 Reply Last reply
      0
      • N Nelek

        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 ;)

        C Offline
        C Offline
        chethu665
        wrote on last edited by
        #3

        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

        N 1 Reply Last reply
        0
        • C chethu665

          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

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #4

          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 ;)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups