Opening an invisible dialog - Programmer

This is a discussion on Opening an invisible dialog - Programmer ; Hi, how do I open a modal dialog, which initially comes up invisible? I have tried ShowWindow(SW_HIDE) in OnInitDialog(), but it has no effect. I also tried overwriting PreCreateWindow(), but this is not called for dialogs. What to do? Regards, ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Opening an invisible dialog

  1. Opening an invisible dialog

    Hi,

    how do I open a modal dialog, which initially comes up invisible?
    I have tried
    ShowWindow(SW_HIDE)
    in OnInitDialog(), but it has no effect.
    I also tried overwriting PreCreateWindow(), but this is not called
    for dialogs.

    What to do?

    Regards, Stephan

  2. Re: Opening an invisible dialog

    Why on earth would you want an invisible MODAL dialog? Do you know what
    "modal" means? It means that it's set to capture all keyboard and mouse
    input -- to an invisible dialog! How are you going to click on an invisible
    button? Etc.

    --
    ---------------------------------------------------------------------
    DataGet & PocketLog www.dataget.com
    Data Collectors www.baxcode.com
    --------------------------------------------------------------------



    "Stephan Keil" wrote in message
    news:de1s25$fbe$1@beech.fernuni-hagen.de...
    > Hi,
    >
    > how do I open a modal dialog, which initially comes up invisible?
    > I have tried
    > ShowWindow(SW_HIDE)
    > in OnInitDialog(), but it has no effect.
    > I also tried overwriting PreCreateWindow(), but this is not called
    > for dialogs.
    >
    > What to do?
    >
    > Regards, Stephan




  3. Re: Opening an invisible dialog

    > Why on earth would you want an invisible MODAL dialog?

    What I asked for is to create the dialog INITIALLY invisble.
    It may become visible later (e.g. after some time period).

  4. Re: Opening an invisible dialog

    And for that time period, the user thinks his machine is dead. If that time
    period is very long, the user might well decide to reboot his machine.

    --
    ---------------------------------------------------------------------
    DataGet & PocketLog www.dataget.com
    Data Collectors www.baxcode.com
    --------------------------------------------------------------------



    "Stephan Keil" wrote in message
    news:de2hhr$dnq$1@beech.fernuni-hagen.de...
    > > Why on earth would you want an invisible MODAL dialog?

    >
    > What I asked for is to create the dialog INITIALLY invisble.
    > It may become visible later (e.g. after some time period).




  5. Re: Opening an invisible dialog

    This doesn't sound like a very good design to me. However if you really
    want to display a hidden model dialog, instead of changing the visible state
    of the window you can change the size of the window in the OnInitDialog to
    be 0 (MoveWindow(0,0,0,0) which should give you the same visual effect.
    Capture the window size and position right before the MoveWindow, then when
    you want to "make it visible" just call MoveWindow again.

    -Eric

    "Stephan Keil" wrote in message
    news:de1s25$fbe$1@beech.fernuni-hagen.de...
    > Hi,
    >
    > how do I open a modal dialog, which initially comes up invisible?
    > I have tried
    > ShowWindow(SW_HIDE)
    > in OnInitDialog(), but it has no effect.
    > I also tried overwriting PreCreateWindow(), but this is not called
    > for dialogs.
    >
    > What to do?
    >
    > Regards, Stephan




+ Reply to Thread