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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Trouble with dialogs/views //HELP REALLY NEEDED

Trouble with dialogs/views //HELP REALLY NEEDED

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 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.
  • K Offline
    K Offline
    klm
    wrote on last edited by
    #1

    Hello friends, i have a CView (fullscreen) on the bottom (in x-axis) and i would like to show a modeless CDialog (fullscreen) on the CView. And then i would like to show an another modeless CDialog (quarder-screen) on the CDialog (fullscreen). I would like to create (and delete) all dialogs in the CView, and the user should operate with all dialogs at the same time. I have try that, and my problem is this: I see the fullscreen dialog and the quarderscreen dialog (that is right), but i don't can operate with quarder-screen dialog (that is the problem). That dialog get no mouse-messages, and the buttons (on the quarderscreen dialog) don't move down when i try to click on it. Here is a code-snipet (that i use to create one of the dialogs): void CViewPMain::CreatePFkt3Zeile() { CRect DlgPFkt3Zeile, View; if (!m_DlgPFkt3Zeile) { GetClientRect(View); m_DlgPFkt3Zeile = new CDlgPFkt3Zeile; if (!::IsWindow(m_DlgPFkt3Zeile->GetSafeHwnd())) m_DlgPFkt3Zeile->Create(IDD_P_FKT_3ZEILE, this); m_DlgPFkt3Zeile->GetWindowRect(DlgPFkt3Zeile); ASSERT(m_DlgPFkt3Zeile->SetWindowPos(NULL , View.Width() - DlgPFkt3Zeile.Width() //int x , View.Height() - DlgPFkt3Zeile.Height() //int y , DlgPFkt3Zeile.Width() //int cx , DlgPFkt3Zeile.Height() //int cy , SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOZORDER)); m_DlgPFkt3Zeile->ShowWindow(SW_SHOW); } else { delete m_DlgPFkt3Zeile; m_DlgPFkt3Zeile = 0; } } At the SetWindowPos-function i have tryed a lot of parameters for the first and the last parameter, but ever i don't can operate with the second dialog. What make i wrong at the "create" of the dialogs? Or is "multiple dialogs" not aviable? Is there any other solution that i can do? Thank you very much for your help! PS: Sorry for my bad english.

    P 1 Reply Last reply
    0
    • K klm

      Hello friends, i have a CView (fullscreen) on the bottom (in x-axis) and i would like to show a modeless CDialog (fullscreen) on the CView. And then i would like to show an another modeless CDialog (quarder-screen) on the CDialog (fullscreen). I would like to create (and delete) all dialogs in the CView, and the user should operate with all dialogs at the same time. I have try that, and my problem is this: I see the fullscreen dialog and the quarderscreen dialog (that is right), but i don't can operate with quarder-screen dialog (that is the problem). That dialog get no mouse-messages, and the buttons (on the quarderscreen dialog) don't move down when i try to click on it. Here is a code-snipet (that i use to create one of the dialogs): void CViewPMain::CreatePFkt3Zeile() { CRect DlgPFkt3Zeile, View; if (!m_DlgPFkt3Zeile) { GetClientRect(View); m_DlgPFkt3Zeile = new CDlgPFkt3Zeile; if (!::IsWindow(m_DlgPFkt3Zeile->GetSafeHwnd())) m_DlgPFkt3Zeile->Create(IDD_P_FKT_3ZEILE, this); m_DlgPFkt3Zeile->GetWindowRect(DlgPFkt3Zeile); ASSERT(m_DlgPFkt3Zeile->SetWindowPos(NULL , View.Width() - DlgPFkt3Zeile.Width() //int x , View.Height() - DlgPFkt3Zeile.Height() //int y , DlgPFkt3Zeile.Width() //int cx , DlgPFkt3Zeile.Height() //int cy , SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOZORDER)); m_DlgPFkt3Zeile->ShowWindow(SW_SHOW); } else { delete m_DlgPFkt3Zeile; m_DlgPFkt3Zeile = 0; } } At the SetWindowPos-function i have tryed a lot of parameters for the first and the last parameter, but ever i don't can operate with the second dialog. What make i wrong at the "create" of the dialogs? Or is "multiple dialogs" not aviable? Is there any other solution that i can do? Thank you very much for your help! PS: Sorry for my bad english.

      P Offline
      P Offline
      perlmunger
      wrote on last edited by
      #2

      > PS: Sorry for my bad english. It's very difficult to understand what you are asking here, but I'll try to answer your question. First you'll have to answer some questions. 1. Are you using splitters? I don't understand what you mean by "i have a CView (fullscreen) on the bottom (in x-axis)". On the bottom of what? 2. When you say you want a Dialog in the view, do you mean you are using a form view or do you want a dialog whose parent is a CView? 3. Can you provide me with a better explanation of what this application looks like and does? Let's start there. Just answer these questions and maybe I'll be able to understand better. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

      K 1 Reply Last reply
      0
      • P perlmunger

        > PS: Sorry for my bad english. It's very difficult to understand what you are asking here, but I'll try to answer your question. First you'll have to answer some questions. 1. Are you using splitters? I don't understand what you mean by "i have a CView (fullscreen) on the bottom (in x-axis)". On the bottom of what? 2. When you say you want a Dialog in the view, do you mean you are using a form view or do you want a dialog whose parent is a CView? 3. Can you provide me with a better explanation of what this application looks like and does? Let's start there. Just answer these questions and maybe I'll be able to understand better. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

        K Offline
        K Offline
        klm
        wrote on last edited by
        #3

        Hello perlmunger, Thank you very very much that you try to help me! My answers of your questions: 1. I mean i don't use splitters(but i don't know what splitter is). I have a view (from CView - class), that show a dialog resoucre. With on the bottom i mean, that i create the CView first. "in x-axis" is wrong, i mean in z-axis, sorry. 2. I don't know that the dialog is the right solution (i am new in VC++), i try to explain what i want: The CView must be the "master", i mean he should create and delete all my dialogs. The dialogs should modeless, without titlebar... and the user should not see/know that the dialogs are not the view(i mean the user should mean that he see only one dialog/view). The view should create some dialogs, that all activate. When the user click a button on a dialog, the dialog should send a user message to the view. I have try that: the view create a dialog and then he create a second dialog, but i don't can operate with the second dialog (he recieve no messages) but i see the dialog. 3. a little background: I port a HMI from C and a realtime-OS to win32. This part is the process visualisation. First you see a dialog that the machine is run up. Then you see a a lot of dialogs, what the machine is doing at the moment. Sometimes i show a dialog with function-keys/buttons. The problem is that i don't show only one dialog at the same time. Do you understand my problem now?

        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