Announcement

Collapse
No announcement yet.

Forcing a Dll to top

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forcing a Dll to top

    Here is the senario:
    I have a pbdll exe as a menu.
    One of the options calls a pbcc program with shell.
    Within the pbcc program, one of the options calls
    a dll (written with pbdll using a modal dialog).
    Here is the dialog new statment using in the dll
    DIALOG NEW 0,dTitle$,,,280,130,%DS_3DLOOK AND %DS_SETFOREGROUND, %WS_EX_TOPMOST AND %WS_EX_LEFT AND %DS_CENTER TO hDlg2

    Now, it all works fine. The only problem is, the dll
    does not come up on top. It is in the task bar and
    I can click on it for it to come up.
    After I have used it, if I use it again in the same
    session it usually does come up on top (i suppose it
    has to do with clicking on it previously in the taskbar.
    Is there a way to force it on top of the console app always when
    called ?
    Thanks


    ------------------
    Client Writeup for the CPA

    buffs.proboards2.com

    Links Page

  • #2
    Buff --

    You say the GUI window has its own task bar button... That tells me that it is operating as an "independent" window. You need to make the GUI window a child of the console window. Since you are a Console Tools user, you can use the hConsoleWindow function to obtain the handle you need.

    Mixing GUI and console windows can be difficult, but it's not impossible if you have the right Tools.

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    [This message has been edited by Eric Pearson (edited February 23, 2001).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Thanks Eric, that did it.
      I added something like hHndl&=hConsoleWindow
      right before the dll call which I moidified to include the
      hHndl& as the first parameter and replaced the
      dialog new 0....
      with
      dialog new hHndl&
      in the dll and it worked like a charm.


      ------------------
      Client Writeup for the CPA

      buffs.proboards2.com

      Links Page

      Comment

      Working...
      X