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

Post Reply
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

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

Post 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..
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

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

Post 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
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

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

Post 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!!
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

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

Post 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
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

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

Post 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
User avatar
kim yong woo
Posts: 55
Joined: Sun Apr 12, 2009 10:51 am
Location: Seoul, Korea
Contact:

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

Post by kim yong woo »

Dear Mr. Armando,and Mr.Rameshbabu

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