No announcement yet.

King of Z hill

  • Filter
  • Time
  • Show
Clear All
new posts

  • King of Z hill

    I'm running an app from the PB IDE while the IDE is maximized.

    My app gets to a point where there is one dialog active which is
    also maximized. When selecting a button from that dialog, I would
    like to create another dialog (not maximized) which allows the user
    to edit some data. Both dialogs are MODELESS.

    My goals:

    1) Have main app dialog DISABLED, but visible underneath second dialog.

    2) When second dialog terminates, have main dialog ENABLED again.

    Currently, I'm using DIALOG DISABLE & DIALOG ENABLE on the main dialog
    and it works as far as disabling/enabling. The problem is that when
    the main dialog is ENABLED, it is also sent to the back of desktop.
    Ie.: The PB IDE gains the focus of the desktop.

    I have tried using:

    SetForegroundWindow hDlg&


    BringWindowToTop hDlg&

    and they work, but they create a noticable screen redraw. Is there any
    way to achieve my goal without having to have the screen flicker?

    Bernard Ertl
    Bernard Ertl
    InterPlan Systems

  • #2
    when calling the new dialog(2) make 1 NOT disabled until 2 has the focus.
    On wm_close(when the 2nd dialog get's unloaded) enable 1, do nothing but unload 2 now.

    You can also provide the handle from 1 in the dialog new from 2.
    And show 2 modal.



    • #3
      Thanks Edwin!

      Problem solved.

      Bernard Ertl
      Bernard Ertl
      InterPlan Systems