FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error TKButton en windows Transparente
Posts: 485
Joined: Fri Feb 09, 2007 10:34 AM
Error TKButton en windows Transparente
Posted: Thu Sep 24, 2009 05:59 PM

Muy buenas, tengo este codigo y va perfectamente pero no me deja poner un TKButton, ¿alguien sabe por que?
No da error de compilacion sino de ejecucion de Windows.

define WINDOW oWnd STYLE WS_POPUP COLOR "W/R"
oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, iif(nRow<=33,(lDrag := .T., oWnd:oCursor := oCrsHand),lDrag:=.f.) }
oWnd:bMMoved = { | nRow, nCol | If( lDrag .and. nRow<=46, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
oWnd:nLeft + nCol - nColPos,,, .T. ),) }
oWnd:bLButtonUp := { |nRow,nCol| lDrag := .F., oWnd:oCursor := nil }
oWnd:SetSize( 448, 321 )
oWnd:Center()

    //redefine coralbutton aoBtns[1] id 301 bitmap &quot;ALPHA_OK&quot; overbitmap &quot;ALPHA_OK_OVER&quot;  PRESSED &quot;ALPHA_OK_PRESS&quot; of oDlg action  ;    
    @ 10,10 kbutton oBtn SIZE 25,25 BITMAP &quot;ALPHA_X&quot; of oWnd action msginfo(&quot;X&quot;)
     // New &quot;Shape&quot; feature in TSButton
  //@ 60, 300 SBUTTON aoBtns[1] OF oWnd SIZE 74, 26 PIXEL NOBOX RESOURCE &quot;X&quot; ACTION oWnd:End() TRANSPARENT
  //aoBtns[1]:bAction:=bBlockAction
  aoBtns[1]:ltransparent:=.t.
  //aoBtns[1]:nClrFore:=bColorFore
  //aoBtns[1]:nClrBack:=bColorBack


activate WINDOW oWnd ;
  on init  SetTransparent( oWnd ) ; 
  on paint PaintTransparent( hDC, oBmp:hBitmap, 0, 0 ) ;
  on right click oWnd:End()

Un Saludo.

Continue the discussion