Page 1 of 1

Can I show My Dialg Window in front of any other window?

Posted: Sun Sep 20, 2015 2:35 am
by kim yong woo
How Can I show NEW Dialog Window in front of any other window?

We are on programming a CID prg for Telephone Caller identification..

As you know, CID prg stay back and the users are on work with other software..
When there is phone Call, there should be "POP-UP" as following.
http://pharmalink.kr/images/stay_back1.jpg

But, in certain case, my "POP-UP" stay back behind other window...
http://pharmalink.kr/images/stay_back.jpg


How can I place my new "POP-UP" infront of any other window?

My prg starts as following..

Code: Select all

Main()
  DEFINE Window oWnd  TITLE "Caller ID"  ICON oIcon Menu BuildMenu()

   DEFINE BUTTONBAR oBar BUTTONSIZE 36, 36 3D TOP OF oWnd

   @ 0.4,220 say "" size 35, 18  of oBar

   DEFINE BUTTON oBtn resource "RED_1" of oBar 

  ACTIVATE WINDOW oWnd

return nil

Function EventCall()   //-- On evnet , Call Alarm()
  Alarm(Caller, Callee, cEvent, cCode) 
return nil

Function Alarm( Caller, Callee, cEvent, cCode) 
   Local oDlg, oBrush, oCursor
     Local nPos
     Local aInfo, uReturn

   DEFINE BRUSH oBrush COLOR CLR_BLUE // Transparent painting !

   DEFINE DIALOG oDlg ;
      FROM 0, nPos TO 132, nPos+370 ;
      STYLE WS_POPUP ;
      BRUSH oBrush PIXEL

      @ 19, 148  BUTTON "refuse(&X)" OF oDlg SIZE 30, 10   action  (nDap:=200, oDlg:end()) PIXEL   

   ACTIVATE DIALOG oDlg ;
      ON PAINT ( PalBmpDraw( oDlg:hDC, 0, 0, oBmp2:hBitmap, 0, 0, 0, SRCPAINT ),;
                 PalBmpDraw( oDlg:hDC, 0, 0, oBmp1:hBitmap, 0, 0, 0, SRCAND ) ,;
                 oDlg:Say( 43,147, aInfo[1,3],,, oFont,.t. ) ,oDlg:Say( 57, 147, aInfo[1,4],,, oFont, .T. ))  ; 
        ON LEFT CLICK (nDap:=100, oDlg:End()) ;
      ON INIT  SetTransparent( oDlg )

Return nil
 
Thanks..

Re: Can I show My Dialg Window in front of any other window?

Posted: Sun Sep 20, 2015 3:32 am
by carlos vargas
yes.

exist a style for windows for this.

i dont remmenber, sorry, please search in thes forums
http://forums.fivetechsupport.com/viewt ... ost#p74173
top most

Re: Can I show My Dialg Window in front of any other window?

Posted: Sun Sep 20, 2015 1:19 pm
by kim yong woo
Mr. Carlos vargas,

Thanks for your post..

But, in my case, I hope to show my new Dialog to be shown in front of other windows, as soon as generated...

Code: Select all

   DEFINE BRUSH oBrush COLOR CLR_BLUE 
   DEFINE DIALOG oDlg ;
      FROM 0, nPos TO 132, nPos+370 ;
      STYLE WS_POPUP ;
      BRUSH oBrush PIXEL

      @ 19, 148  BUTTON "Refuse(&X)" OF oDlg SIZE 30, 10   action  (nDap:=200, oDlg:end()) PIXEL       

   ACTIVATE DIALOG oDlg ;
      ON PAINT ( PalBmpDraw( oDlg:hDC, 0, 0, oBmp2:hBitmap, 0, 0, 0, SRCPAINT ),;
                 PalBmpDraw( oDlg:hDC, 0, 0, oBmp1:hBitmap, 0, 0, 0, SRCAND ) ,;
                 oDlg:Say( 43,147, aInfo[1,3],,, oFont,.t. ) ,oDlg:Say( 57, 147, aInfo[1,4],,, oFont, .T. ))  ; 
        ON LEFT CLICK (nDap:=100, oDlg:End()) ;
            ON INIT  SetTransparent( oDlg )                      //----------------Now...

         // ON INIT ( SetTransparent( oDlg ),   SetWindowPos( oDlg:hWnd, 0   , oDlg:nTop, oDlg:nLeft, 370, 132 ) )   //----> No change..
          //ON INIT  ( SetTransparent( oDlg ), SetForeGroundWindow( oDlg:hWnd ) )  //----? No Change also...
 
Advise... please!!

Re: Can I show My Dialg Window in front of any other window?

Posted: Sun Sep 20, 2015 3:34 pm
by Armando
Mr. Kim:

Try with ON TOP dialog as follow:

Code: Select all

    ACTIVATE DIALOG oDlg ON INIT SetWindowPos( oDlg:hWnd, -1, 0, 0, 0, 0, 3 )
 
With best regards

Re: Can I show My Dialg Window in front of any other window?

Posted: Mon Sep 21, 2015 12:47 am
by RAMESHBABU
Mr. Kim,

Try this

Code: Select all


ACTIVATE WINDOW oWnd ON PAINT ( SetWindowPos( oWnd:hWnd, - 1, 0, 0, 0, 0, 3 ),;
                                oWnd:Refresh() )
 
-RAMESH BABU

Re: Can I show My Dialg Window in front of any other window?

Posted: Mon Sep 21, 2015 1:28 am
by kim yong woo
Dear Mr. Armando,and Mr.Rameshbabu

Thanks for you comments...
I will try, and will report..