topic
stringlengths
1
63
text
stringlengths
1
577k
BtnBmp desde código y recursos
No son ventanas, son dialogos con estilo WS_POPUP y sin Modalframe y sin caption. Tengo una función que pinta los bordes y la franja gris donde se encuentran los botones y otra que se encuentra en el caption para el título y mover el dialogo y la cruz para cerrarlo. El estilo de los get lo tomé del foro. Saludos
BtnBmp desde código y recursos
Flat ? SkinButtons()? Mejor, és BUTTONBMP Saludos.
BtnBmp desde código y recursos
Karinha, si no le pongo flat el botón parece hundido. Parece no tomar el estilo l2013 salvo por el borde derecho que si se pinta con el color del estilo pero no el resto de las lineas. No puedo cambiar a buttonbmp porque llevo muy avanzado el proyecto y además es en el único lugar donde uso un dialogo x código y me pasa esto. Saludos
BtnBmp desde código y recursos
Veamos, qué versión de Fw utilizas? Esta clase actualmente tiene las siguientes DATAS [code=fw:2gyhxjqs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lBorder AS LOGICAL <span style="color: #0000ff;">INIT</span> .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lRound AS LOGICAL <span style="color: #0000ff;">INIT</span> .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nRound <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">6</span><br /><span style="color: #B900B9;">// y</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nClrBorder <span style="color: #0000ff;">INIT</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">221</span>, <span style="color: #000000;">207</span>, <span style="color: #000000;">155</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lFlatStyle <span style="color: #0000ff;">INIT</span> .f.<br /><br />&nbsp;</div>[/code:2gyhxjqs]
BtnBmp desde código y recursos
Gracias Cristobal por responder, La única data que no tiene la clase es nRound. Utilizo FWH 17.01. Saludos
BtnBmp desde código y recursos
Imagino que el valor que tendrá es 6 Búscalo en funciones como RoundBox, CreateRoundRectRgn, crea la data y sustitúye el valor por la data Con la data nClrBorder podrás configurar el color del borde y con lFlatStyle puedes ver si se acerca a lo que necesitas
BtnBmp desde código y recursos
Gracias Cristobal, pruebo y comento . Saludos
BtnBmp en txbrowse
Hola: No logro ver la imagen en el btnbmp de una columna. WITH OBJECT :aCols[1] :AddResource("Lupa16") :nBtnBmp:=1 :cEditPicture:="@!" :bEditBlock:= {|nRow,nCol,oCol| DocBuscar(oCol,nRow,nCol)} :nEditType := EDIT_GET_BUTTON END ¿ Qué estoy haciendo mal? Gracias.
BtnBmp en txbrowse
Saludos Cesar. 1- verifica que el recurso este creado 2- verifca que el nombre del recuerso sea correcto 3- verifica que tengas un handle valido en el array de bitmap de la columna ( :aBitmaps[ 1 ][ 1 ] ) 4- si falla lo anterior, intenta agregar la imagen desde un archivo y no desde recurso 5- si falla que version estas usando de fivewin?
BtnBmp entre los Gets problema de Focu ???
Siempre que y uso el BtnBmp entre los Gets, tengo problemas com el retorno del SetFocus ;[code:2lkan09h] REDEFINE GET oGet&#91;1&#93; VAR oDbfCadaClie&#58;ArCodAll ID 21 OF oDlg PICTURE "999999" Update [/code:2lkan09h] [code:2lkan09h] REDEFINE BTNBMP oBtn&#91;1&#93; ID 701 RESOURCE "PESQ_CLI_24" OF oDlg NOBORDER Default ; ACTION &#40; IF&#40; Empty&#40;oDbfCadaClie&#58;ArCodAll&#41;, oGet&#91;2&#93;&#58;SetFocus&#40;&#41;, ; &#40; AchaClie&#40; StrZero&#40; Val&#40; oDbfCadaClie&#58;ArCodAll &#41;,6 &#41; &#41; &#41;; &#41;, ; Eval&#40; cBCpf &#41;, Eval&#40; cBRg &#41;, oDlg&#58;UpDate&#40;&#41; &#41; UpDate [/code:2lkan09h] [code:2lkan09h] REDEFINE GET oGet&#91;2&#93; VAR oDbfCadaClie&#58;ArNomCli ID 22 OF oDlg PICTURE "@!" UpDate [/code:2lkan09h] [code:2lkan09h] ******************************************************************************** STATIC FUNCTION AchaClie&#40; cCodClie &#41; ******************************************************************************** oDbfCadaClie&#58;GoTop&#40;&#41; IF !oDbfCadaClie&#58;Seek&#40;cCodClie&#41; &#40; IIF&#40; MsgYesNo&#40;"Código não Encontrado" + CRLF + "Deseja Fazer uma Busca por Cliente", "Selecione uma Opção"&#41;, ; &#40; BrwPesqClie&#40;&#41;,oGet&#91;5&#93;&#58;SetFocus&#40;&#41; &#41;,; // Eval&#40; cBCpf &#41;, Eval&#40; cBRg &#41;, oGet&#91;3&#93;&#58;SetFocus&#40;&#41; &#41;, ; &#40; oDbfCadaClie&#58;Blank&#40;&#41;, oGet&#91;2&#93;&#58;SetFocus&#40;&#41; &#41;&#41;&#41; //, oGet&#91;2&#93;&#58;SetFocus&#40;&#41; &#41; &#41; , oDlg&#58;UpDate&#40;&#41; &#41; ELSE oGet&#91;5&#93;&#58;SetFocus&#40;&#41; //--> * oBtn&#91;1&#93;&#58;oJump &#58;= oGet&#91;5&#93; //--> ** //xSetFocus&#40;oGet&#91;5&#93;&#41; ENDIF nVlrUnit &#58;= oDbfCadaClie&#58;ArVlrCli nVlrTt&#58;=nQtd * nVlrUnit oGet&#91;23&#93;&#58;Refresh&#40;&#41; RETURN &#46;T&#46; [/code:2lkan09h] [color=red:2lkan09h]* No retorna ao Focu estabelecido, o focu vai direto para oGet[2][/color:2lkan09h] [color=darkblue:2lkan09h]** tengo q colocar el jump, para funcionar correctamente, si y usar solamente o Jump, tambien no funciona, preciso siempre usar los 2 juntos.[/color:2lkan09h] Isto solo acontece usando el tecla Enter, si y clickar com el Mouse, ai funciona perfectamente solamente com o SetFocus ou solamente com el Jump. Outra forma que tambien funciona normal es usando el Function xsetFocus() [code:2lkan09h] FUNCTION XSetFocus&#40;oObj&#41; Local oTempo &#58;= "" Define Timer oTempo Interval 10 Of oObj&#58;oWnd Action &#40;oObj&#58;SetFocus&#40;&#41;,oObj&#58;SetPos&#40;0&#41;,oTempo&#58;Deactivate&#40;&#41;&#41; Activate Timer oTempo Retu&#40;""&#41; [/code:2lkan09h]Estas funcionam mui bem:1- oGet[5]:SetFocus() oBtn[1]:oJump := oGet[5]2-oBtn[1]:oJump := oGet[5]xSetFocus(oGet[5])3-oGet[5]:SetFocus() xSetFocus(oGet[5])Mi duda es, uno SetFocus no serio lo bastante para funcionar ?Sendo que, com el Mouse, lo retorno eh normal con uno Setfocus() apenas.E con <Enter> es preciso de usar lo SetFocus, combinado com el Jump ou la Funçao xSetFocus().Saludos Ale
BtnBmp entre los Gets problema de Focu ???
Ale,> Mi duda es, uno SetFocus no serio lo bastante para funcionar ?No, no es suficiente porque el proceso de perdida de foco es una secuencia que ha de completarse con una ganancia de foco. Es decir, si estas en una secuencia de cambio de foco controlada por Windows, no puedes interrumpirla. Por eso la opción del timer funciona, porque Windows ha terminado ya y entonces SI puedes cambiar el foco.
BtnBmp entre los Gets problema de Focu ???
Ahora Comprendo, Gracias.Saluds, Ale
BtnBmp error en METHOD LoadBitmaps 15.06
Algunos clientes los cuales le actualicé han venido reportando un error y sale un mensaje que dejó de funcionar se le hizo un seguimiento al HB_OUT.TXT en el cual el error da en METHOD LoadBitmaps Called from PALBMPNEW(0) Called from WNDREADPALBMPEX(588) in .\source\function\IMGTXTIO.PRG Called from (b)TWINDOW(551) in .\source\classes\WINDOW.PRG Called from TBTNBMP:READPALBMPEX(0) in .\source\classes\WINDOW.PRG Called from TBTNBMP:SETIMAGES(1004) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LOADBITMAPS(1031) in .\source\classes\BTNBMP.PRG revisando con versiones anteriores [code=fw:2e3js9fh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> LoadBitmaps<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                    cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">local</span> aBmpPal<br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName1 <span style="color: #000000;">&#41;</span><br />      aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName1 <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">hBitmap1</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">hPalette1</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap1</span>, BTN_UP <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName2 <span style="color: #000000;">&#41;</span><br />      aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName2 <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">hBitmap2</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">hPalette2</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span>, BTN_DOWN <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName3 <span style="color: #000000;">&#41;</span><br />      aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName3 <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">hBitmap3</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">hPalette3</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span>, BTN_DISABLE <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName4 <span style="color: #000000;">&#41;</span><br />      aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName4 <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">hBitmap4</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">hPalette4</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span>, BTN_OVERMOUSE <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />         aBmpPal     = PalBmpRead<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cBmpFile1 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">hBitmap1</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">hPalette1</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap1</span>, BTN_UP <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile2 <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile2 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">cBmpFile2</span> = cBmpFile2<br />         aBmpPal     = PalBmpRead<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cBmpFile2 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">hBitmap2</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">hPalette2</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span>, BTN_DOWN <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile3 <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile3 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">cBmpFile3</span> = cBmpFile3<br />         aBmpPal     = PalBmpRead<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cBmpFile3 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">hBitmap3</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">hPalette3</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span>, BTN_DISABLE <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile4 <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile4 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">cBmpFile4</span> = cBmpFile4<br />         aBmpPal     = PalBmpRead<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cBmpFile4 <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">hBitmap4</span>  = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">hPalette4</span> = aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span>, BTN_OVERMOUSE <span style="color: #000000;">&#41;</span><br />         ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">&#41;</span><br />      PalBmpNew<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hBitmap1</span>, ::<span style="color: #000000;">hPalette1</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span><br />      PalBmpNew<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hBitmap2</span>, ::<span style="color: #000000;">hPalette2</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">&#41;</span><br />      PalBmpNew<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hBitmap3</span>, ::<span style="color: #000000;">hPalette3</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span><br />      PalBmpNew<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hPalette4</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l2007</span><br />      <span style="color: #B900B9;">/*<br />      if Empty( ::hBitmap2 ) .and. ! Empty( ::hBitmap1 )<br />         ::hBitmap2 := ResizeImg( ::hBitmap1, nBmpWidth( ::hBitmap1 ) - 2, nBmpHeight( ::hBitmap1 ) - 2  )<br />         ::HasAlpha( ::hBitmap2, BTN_DOWN )<br />      endif<br />      if Empty( ::hBitmap3 ) .and. ! Empty( ::hBitmap1 )<br />         ::hBitmap3 := Blur( ::hBitmap1, 1 )<br />         ::HasAlpha( ::hBitmap3, BTN_DISABLE )<br />      endif<br />      if Empty( ::hBitmap4 ) .and. ! Empty( ::hBitmap1 )<br />         ::hBitmap4 := ResizeImg( ::hBitmap1, nBmpWidth( ::hBitmap1 ) + 6, nBmpHeight( ::hBitmap1 ) + 6  )<br />         ::HasAlpha( ::hBitmap4, BTN_OVERMOUSE )<br />      endif<br />      */</span><br />   <span style="color: #00C800;">endif</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2e3js9fh] Versión Actual [code=fw:2e3js9fh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> LoadBitmaps<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                    cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   ::<span style="color: #000000;">SetImages</span><span style="color: #000000;">&#40;</span> IfNil<span style="color: #000000;">&#40;</span> cResName1, cBmpFile1 <span style="color: #000000;">&#41;</span>, IfNil<span style="color: #000000;">&#40;</span> cResName2, cBmpFile2 <span style="color: #000000;">&#41;</span>, ;<br />                IfNil<span style="color: #000000;">&#40;</span> cResName3, cBmpFile3 <span style="color: #000000;">&#41;</span>, IfNil<span style="color: #000000;">&#40;</span> cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span>, .f.  <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*<br />   local aBmpPal<br />   local cSrc<br /><br />   if ! Empty( cSrc := IfNil( cResName1, cBmpFile1 ) )<br />      aBmpPal        = ::ReadPalBmpEx( cSrc,,::lGDIP )<br />      ::hBitmap1     = aBmpPal[ 1 ]<br />      ::hPalette1    = aBmpPal[ 2 ]<br />      ::aAlpha[ 1 ]  = aBmpPal[ 5 ]<br />      ::cBmpFile1    = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )<br />      ::cResName1    = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )<br />   endif<br /><br />   if ! Empty( cSrc := IfNil( cResName2, cBmpFile2 ) )<br />      aBmpPal        = ::ReadPalBmpEx( cSrc,,::lGDIP )<br />      ::hBitmap2     = aBmpPal[ 1 ]<br />      ::hPalette2    = aBmpPal[ 2 ]<br />      ::aAlpha[ 2 ]  = aBmpPal[ 5 ]<br />      ::cBmpFile2    = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )<br />      ::cResName2    = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )<br />   endif<br /><br />   if ! Empty( cSrc := IfNil( cResName3, cBmpFile3 ) )<br />      aBmpPal        = ::ReadPalBmpEx( cSrc,,::lGDIP )<br />      ::hBitmap3     = aBmpPal[ 1 ]<br />      ::hPalette3    = aBmpPal[ 2 ]<br />      ::aAlpha[ 3 ]  = aBmpPal[ 5 ]<br />      ::cBmpFile3    = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )<br />      ::cResName3    = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )<br />   endif<br /><br />   if ! Empty( cSrc := IfNil( cResName4, cBmpFile4 ) )<br />      aBmpPal        = ::ReadPalBmpEx( cSrc,,::lGDIP )<br />      ::hBitmap4     = aBmpPal[ 1 ]<br />      ::hPalette4    = aBmpPal[ 2 ]<br />      ::aAlpha[ 4 ]  = aBmpPal[ 5 ]<br />      ::cBmpFile4    = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )<br />      ::cResName4    = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )<br />   endif<br />*/</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2e3js9fh] El error es aqui ::SetImages( IfNil( cResName1, cBmpFile1 ), IfNil( cResName2, cBmpFile2 ), ; IfNil( cResName3, cBmpFile3 ), IfNil( cResName4, cBmpFile4 ), .f. ) no da todo el tiempo da trabajando 1 hora o 2 horas
BtnBmp error en METHOD LoadBitmaps 15.06
Hello , It's an old unsolved problem ( I have a same problem ) , now I will try with the last fw version and if it is possible simulate with a sample . <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=16168&p=97501&hilit=GPF+MAURIZIO#p97501">viewtopic.php?f=3&t=16168&p=97501&hilit=GPF+MAURIZIO#p97501</a><!-- l --> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=18604&p=97481&hilit=gpf+BTNBMP#p97481">viewtopic.php?f=6&t=18604&p=97481&hilit=gpf+BTNBMP#p97481</a><!-- l --> Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
BtnBmp error en METHOD LoadBitmaps 15.06
Luis, Puede estar directamente relacionado con el problema de consumo de memoria que nos has comentado. Obtén toda la información del administrador de tareas de la aplicación y publícala aquí, gracias
BtnBmp error en METHOD LoadBitmaps 15.06
Luis, Has comprobado el consumo de objetos GDI de tu aplicación usando CheckRes() ? [url:3e0i95eu]http&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=fivewin_function_checkres[/url:3e0i95eu]
BtnBmp error en METHOD LoadBitmaps 15.06
Maestro Andonio Error Completo [list:2x2svpu4] Application Internal Error - C:\AccaSoft\AccaSoft.exe Terminated at: 2016-08-31 08:54:41 Unrecoverable error 6005: Exception error: Exception Code:C0000005 ACCESS_VIOLATION Exception Address:00D7BF7D EAX:07AC5000 EBX:00000000 ECX:07AB8020 EDX:07AC5000 ESI:00000000 EDI:0179172B EBP:0084E7A8 CS:EIP:0023:00D7BF7D SS:ESP:002B:0084E7A4 DS:002B ES:002B FS:0053 GS:002B Flags:00010206 Exception Parameters: 00000000 07AC5008 CS:EIP: 8B 48 08 3B 0D 24 A3 94 01 75 09 C7 45 FC 01 00 SS:ESP: 07AB8020 0084E7D0 00D8DE9F 07AC5000 00001566 0084E7FC 00000000 07AB8020 76C4000C 86C31566 01791152 0084E7E8 00D7BFC4 03B40094 00D7BF70 00000000 C stack: EIP: EBP: Frame: OldEBP, RetAddr, Params... 00D7BF7D 0084E7A8 0084E7D0 00D8DE9F 07AC5000 00001566 0084E7FC 00000000 07AB8020 76C4000C 86C31566 01791152 00D8DE9F 0084E7D0 0084E7E8 00D7BFC4 03B40094 00D7BF70 00000000 00001566 00D7BFC4 0084E7E8 0084E810 00D7C055 0084E800 00000000 00000000 00000000 00780538 00000000 1B050D0D 00DF1A51 00D7C055 0084E810 0084E824 00D7C129 00780538 1B050D0D 00000000 00D7C129 0084E824 018DBCD8 00DFFD4D 0000010E 00000720 00A3A44C 00000000 00000000 00DFDD2D 00000003 0177A52C Modules: 00D20000 00C66000 C:\AccaSoft\AccaSoft.exe 773A0000 00157000 C:\Windows\SYSTEM32\ntdll.dll 755D0000 00130000 C:\Windows\SYSTEM32\KERNEL32.DLL 76C40000 000A6000 C:\Windows\SYSTEM32\KERNELBASE.dll 76DD0000 00116000 C:\Windows\SYSTEM32\USER32.dll 76B40000 000FD000 C:\Windows\SYSTEM32\GDI32.dll 74300000 00060000 C:\Windows\SYSTEM32\WINSPOOL.DRV 74BB0000 00087000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.dll 75740000 00089000 C:\Windows\SYSTEM32\COMDLG32.dll 74EA0000 000AE000 C:\Windows\SYSTEM32\ADVAPI32.dll 757D0000 010C5000 C:\Windows\SYSTEM32\SHELL32.dll 771C0000 00119000 C:\Windows\SYSTEM32\ole32.dll 76F90000 0008B000 C:\Windows\SYSTEM32\OLEAUT32.dll 74510000 00022000 C:\Windows\SYSTEM32\IPHLPAPI.DLL 748F0000 00008000 C:\Windows\SYSTEM32\VERSION.dll 74150000 00008000 C:\Windows\SYSTEM32\WSOCK32.dll 742F0000 00006000 C:\Windows\SYSTEM32\MSIMG32.dll 742D0000 0001D000 C:\Windows\SYSTEM32\oledlg.dll 75290000 00163000 C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9200.16384_none_ba245425e0986353\gdiplus.dll 76D10000 000B1000 C:\Windows\SYSTEM32\msvcrt.dll 75700000 00040000 C:\Windows\SYSTEM32\SHLWAPI.dll 754E0000 00034000 C:\Windows\SYSTEM32\sechost.dll 76900000 000AC000 C:\Windows\SYSTEM32\RPCRT4.dll 769B0000 00136000 C:\Windows\SYSTEM32\combase.dll 74E70000 00008000 C:\Windows\SYSTEM32\NSI.dll 744C0000 00008000 C:\Windows\SYSTEM32\WINNSI.DLL 76AF0000 00050000 C:\Windows\SYSTEM32\WS2_32.dll 74A40000 0001C000 C:\Windows\SYSTEM32\SspiCli.dll 74900000 00075000 C:\Windows\SYSTEM32\SHCORE.DLL 74A30000 00009000 C:\Windows\SYSTEM32\CRYPTBASE.dll 749D0000 00051000 C:\Windows\SYSTEM32\bcryptPrimitives.dll 74E80000 00020000 C:\Windows\system32\IMM32.DLL 75400000 000DC000 C:\Windows\SYSTEM32\MSCTF.dll 74240000 00088000 C:\Windows\system32\uxtheme.dll 73660000 00069000 C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll 74220000 00012000 C:\Windows\SYSTEM32\dhcpcsvc.DLL 76EF0000 00074000 C:\Windows\SYSTEM32\clbcatq.dll 74180000 000A0000 C:\Windows\SYSTEM32\sxs.dll 744A0000 0001A000 C:\Windows\SYSTEM32\CRYPTSP.dll 74460000 0003E000 C:\Windows\system32\rsaenh.dll 737A0000 00031000 C:\Windows\system32\wbem\wbemdisp.dll 73730000 00070000 C:\Windows\SYSTEM32\wbemcomn.dll 73720000 0000B000 C:\Windows\system32\wbem\wbemprox.dll 73700000 00019000 C:\Windows\system32\wbem\wmiutils.dll 736F0000 00010000 C:\Windows\system32\wbem\wbemsvc.dll 6BF50000 000C2000 C:\Windows\system32\wbem\fastprox.dll 74160000 00019000 C:\Windows\SYSTEM32\dwmapi.dll 73F80000 00050000 C:\Windows\SYSTEM32\oleacc.dll 73E50000 0012C000 C:\Program Files (x86)\Common Files\System\ado\msado15.dll 73E20000 00022000 C:\Windows\SYSTEM32\MSDART.DLL 73BA0000 000EB000 C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll 74420000 0001A000 C:\Windows\SYSTEM32\bcrypt.dll 73890000 00133000 C:\Windows\SYSTEM32\comsvcs.dll 73D60000 0009A000 C:\Program Files (x86)\Common Files\System\Ole DB\msdasql.dll 73D40000 0001C000 C:\Program Files (x86)\Common Files\System\Ole DB\MSDATL3.dll 73FD0000 000A1000 C:\Windows\SYSTEM32\ODBC32.dll 73B90000 0000F000 C:\Program Files (x86)\Common Files\System\Ole DB\MSDASQLR.DLL 75100000 00188000 C:\Windows\SYSTEM32\CRYPT32.dll 76CF0000 00012000 C:\Windows\SYSTEM32\MSASN1.dll 73B40000 00007000 C:\Windows\SYSTEM32\DPAPI.DLL 10000000 00242000 C:\Program Files (x86)\MySQL\Connector ODBC 5.1\myodbc5.dll 74140000 00010000 C:\Windows\system32\napinsp.dll 74120000 00014000 C:\Windows\system32\pnrpnsp.dll 74110000 00010000 C:\Windows\system32\NLAapi.dll 74980000 0004A000 C:\Windows\System32\mswsock.dll 74090000 00075000 C:\Windows\SYSTEM32\DNSAPI.dll 74080000 00009000 C:\Windows\System32\winrnr.dll 73CD0000 00007000 C:\Windows\System32\rasadhlp.dll 73C90000 0003F000 C:\Windows\System32\fwpuclnt.dll 737F0000 00092000 C:\Program Files (x86)\Common Files\System\msadc\msadce.dll 73B30000 00002000 C:\Program Files (x86)\Common Files\System\msadc\msadcer.dll 05450000 0056A000 C:\AccaSoft\freeimage.dll 73520000 00136000 C:\Windows\System32\Speech\Common\sapi.dll 73D10000 00021000 C:\Windows\SYSTEM32\WINMM.dll 73B10000 00014000 C:\Windows\SYSTEM32\MSACM32.dll 73B00000 0000B000 C:\Windows\SYSTEM32\msdmo.dll 73CE0000 0002A000 C:\Windows\SYSTEM32\WINMMBASE.dll 734D0000 0004D000 C:\Windows\System32\MMDevApi.dll 76F70000 0001E000 C:\Windows\SYSTEM32\DEVOBJ.dll 74C60000 00046000 C:\Windows\SYSTEM32\cfgmgr32.dll 733A0000 0012C000 C:\Program Files (x86)\Intel\iCLS Client\libeay32.dll 04B30000 00012000 C:\AppServ\Apache2.2\bin\zlib1.dll 73350000 0004F000 C:\Program Files (x86)\Intel\iCLS Client\ssleay32.dll 73230000 00119000 C:\Windows\SYSTEM32\PROPSYS.dll 743B0000 00011000 C:\Windows\SYSTEM32\profapi.dll 74A60000 0011E000 C:\Windows\SYSTEM32\urlmon.dll 77020000 0019B000 C:\Windows\SYSTEM32\iertutil.dll 74CB0000 001B9000 C:\Windows\SYSTEM32\WININET.dll 737E0000 00009000 C:\Windows\SYSTEM32\Secur32.dll 74F50000 001AF000 C:\Windows\SYSTEM32\SETUPAPI.dll 72FC0000 001F7000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16384_none_893961408605e985\comctl32.DLL 72E70000 00146000 C:\Windows\SYSTEM32\WindowsCodecs.dll 72E30000 0003D000 C:\Windows\system32\Ninput.dll 72E00000 0002C000 C:\Windows\system32\msdadiag.dll 72D50000 000A7000 C:\Windows\SYSTEM32\apphelp.dll 72CD0000 00080000 C:\Windows\system32\prnfldr.dll 72C50000 0007C000 C:\Windows\SYSTEM32\mscms.dll 736D0000 0001B000 C:\Windows\SYSTEM32\USERENV.dll 19600000 0000F000 C:\Users\Kavalia\AppData\Local\Temp\TeamViewer\Version6\tv_w32.dll 00CD0000 00027000 C:\Windows\SYSTEM32\CRTDLL.dll 727D0000 00098000 C:\Windows\SYSTEM32\mswstr10.dll Called from PALBMPNEW(0) Called from WNDREADPALBMPEX(588) in .\source\function\IMGTXTIO.PRG Called from (b)TWINDOW(551) in .\source\classes\WINDOW.PRG Called from TBTNBMP:READPALBMPEX(0) in .\source\classes\WINDOW.PRG Called from TBTNBMP:SETIMAGES(1004) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LOADBITMAPS(1031) in .\source\classes\BTNBMP.PRG Called from MESAPV(17509) in Accafun.prg Called from (b)SELMESA(36948) in AccaSoft.prg Called from TDIALOG:INITIATE(706) in .\source\classes\DIALOG.PRG Called from TDIALOG:HANDLEEVENT(898) in .\source\classes\DIALOG.PRG Called from DIALOGBOXINDIRECT(0) Called from TDIALOG:ACTIVATE(296) in .\source\classes\DIALOG.PRG Called from SELMESA(36948) in AccaSoft.prg Called from VALMESACR(17336) in Accafun.prg Called from (b)PVENTACR(32329) in AccaSoft.prg Called from TBTNBMP:CLICK(658) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LBUTTONUP(894) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LBUTTONDOWN(832) in .\source\classes\BTNBMP.PRG Called from TCONTROL:HANDLEEVENT(1718) in .\source\classes\CONTROL.PRG Called from TBTNBMP:HANDLEEVENT(1834) in .\source\classes\BTNBMP.PRG Called from _FWH(3305) in .\source\classes\WINDOW.PRG Called from DIALOGBOXINDIRECT(0) Called from TDIALOG:ACTIVATE(296) in .\source\classes\DIALOG.PRG Called from PVENTACR(32737) in AccaSoft.prg Called from PVENTA(26524) in AccaSoft.prg Called from (b)PANTALLAINICIAL(2977) in AccaSoft.prg Called from TBTNBMP:CLICK(658) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LBUTTONUP(894) in .\source\classes\BTNBMP.PRG Called from TBTNBMP:LBUTTONDOWN(832) in .\source\classes\BTNBMP.PRG Called from TCONTROL:HANDLEEVENT(1718) in .\source\classes\CONTROL.PRG Called from TBTNBMP:HANDLEEVENT(1834) in .\source\classes\BTNBMP.PRG Called from _FWH(3305) in .\source\classes\WINDOW.PRG Called from DIALOGBOXINDIRECT(0) Called from TDIALOG:ACTIVATE(296) in .\source\classes\DIALOG.PRG Called from PANTALLAINICIAL(3050) in AccaSoft.prg Called from MAIN(2667) in AccaSoft.prg ------------------------------------------------------------------------ [/list:u:2x2svpu4] Eso se produce después de trabajar 1 hora ejemplo y sucede con la versión 16.06 con la versión 15.06 no da ese error voy a copiar la clase de la 15.06 y voy a probar sin embargo voy a probar una solución de Daniel Garcia [code=fw:2x2svpu4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> PalBmpFree<span style="color: #000000;">&#40;</span> hBmp, hPal <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hPal <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2x2svpu4] lo importante es tratar de ver si se puede resolver para la versión 16.07
BtnBmp error en METHOD LoadBitmaps 15.06
Luis, Prueba a crear una función "dummy" en tu PRG: function PALBMPNEW() return nil y comprueba si asi desaparece el error, gracias
BtnBmp error en METHOD LoadBitmaps 15.06
Maestro Antonio al crear la función "dummy" se resolviò el problema function PALBMPNEW() return nil Muchas Gracias.
BtnBmp error en METHOD LoadBitmaps 15.06
Luis, muy bien. Al menos ya tenemos una solución temporal Vamos a revisar el código de PALBMPNEW() gracias
BtnBmp error en METHOD LoadBitmaps 15.06
Antonio, mine too Maurizio
BtnBmp error en METHOD LoadBitmaps 15.06
Maurizio, Did it solved your problem too ?
BtnBmp error en METHOD LoadBitmaps 15.06
Yes Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
BtnBmp error en METHOD LoadBitmaps 15.06
Antonio , nothing new about function PALBMPNEW() ? with MSVC to compile the function PALBMPNEW() I have to use -ldflag=/FORCE:multiple but I think the compiler takes that in the lib Maurizio
BtnBmp error en METHOD LoadBitmaps 15.06
Maurizio, It is fixed in FWH 16.08 to be published in a few days
BtnBmp from code and tooltip
As I see tooltip is not supported with BtnBmp created from code, isn't it ? Marco
BtnBmp from code and tooltip
Marco, oBtnBmp:cToolTip = "Tooltip text"
BtnBmp from resource how to resize at runtime ?
Hello, I have a small problem : I need a User-Resize of BTNPMP from resources and a Preview with the new Size. Is it possible ? I tested [color=#FF0000:1yu4mrak]oBtn:nHeight [/color:1yu4mrak]:= NewHvalue and [color=#FF0000:1yu4mrak]oBtn:nWidth [/color:1yu4mrak]:= NewWvalue but it doesn't work. For the new ButtonTools, I want to make it possible, that the User can create his own Buttons with a Preview from Source and Resources. REDEFINE BTNBMP oBtn1 ID 100 OF oDlg3 ; NOBORDER ; FILENAME "./project/palm.bmp" ; PROMPT "Button 1" ; FONT oFont1 ; RIGHT oBtn1:lTransparent = .t. oBtn1:cTooltip := "Button1" That doesn't work !!! --------------------------- obtn1:nHeight := nNewheight // User defined oBtn1:nWidth := nNewWidth Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BtnBmp from resource how to resize at runtime ?
Did you try oBtn:Move() method? EMG
BtnBmp from resource how to resize at runtime ?
Enrico, thank You very much. [color=#FF0000:1vgxxm9s]oBtn1:Move [/color:1vgxxm9s]does the resizing I need ( same like with Dlg3 ). The Move-method keeps the Top / Left position of the Resource with : [color=#FF0000:1vgxxm9s]oBtn1:nTop, oBtn1:nLeft[/color:1vgxxm9s] That is exactly, how I want to do it. ACTIVATE DIALOG oDlg3 CENTERED NOWAIT ; ON INIT ( oDlg3:Move( 80, 470, 440, 310, .f. ), [color=#FF0000:1vgxxm9s]oBtn1:Move( oBtn1:nTop, oBtn1:nLeft, 70, 40, .f. )[/color:1vgxxm9s] ) To show a Button with the same size from Source and Resource. Is it possible, to calculate the different values maybe with a factor ( [color=#FF0000:1vgxxm9s] 2.16 [/color:1vgxxm9s]) ? Resource : STATIC nButtonW := [color=#FF0000:1vgxxm9s]140[/color:1vgxxm9s] STATIC nButtonH := [color=#FF0000:1vgxxm9s]86[/color:1vgxxm9s] Source : @ 8, 5 BTNBMP oBtn1 OF oDlg1 ; SIZE [color=#FF0000:1vgxxm9s]65, 40 [/color:1vgxxm9s] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BtnBmp from resource how to resize at runtime ?
Uwe, You may also use: oControl:SetSize( nWidth, nHeight [, lRepaint ] )
BtnBmp icon resizing with recent FWH including 1501
To All I know there has been much done with the BtnBmp class .. I have just recently noticed several of my Bitmap icons on smaller dimension buttons have been resized to a tiny resolution. The Arrow bitmap is 48x48 and the Cancel bitmap is 16x16. The Arrow ( larger resolution ) is the bitmap being resized to appear much smaller than it used to be. I am sorry .. I just noticed this behavior and can not pin-point when the appearance changed. Old Buttons [img:rle5kul9]http&#58;//i62&#46;tinypic&#46;com/25tx3zk&#46;jpg[/img:rle5kul9] New Buttons [img:rle5kul9]http&#58;//i62&#46;tinypic&#46;com/k48sbc&#46;jpg[/img:rle5kul9] Here is the code [code=fw:rle5kul9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oB1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">140</span> <span style="color: #0000ff;">of</span> oCust   ;    <span style="color: #B900B9;">// Cancel</span><br />            <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CANCEL"</span>;<br />            <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"    Cancel"</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>;<br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oB2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">132</span> <span style="color: #0000ff;">of</span> oCust   ;    <span style="color: #B900B9;">// Save and Next</span><br />            <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"NEXT"</span> ;<br />            <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"  Next"</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>; <br /> </div>[/code:rle5kul9] Thanks Rick Lipkin
BtnBmp icon resizing with recent FWH including 1501
We shall check and get back to you. What would be the size of button in pixels? You can find out by ACTION MsgInfo( Str( oB1:nWidth ) + Str( oB1:nHeight ) ) The basic change is this. Now even very large images can be displayed in btnbmp. When the bitmap size exceeds the height or width ( in this case it must be height ) the bitmap is re-sized enough to fit within the size of bitmap.
BtnBmp icon resizing with recent FWH including 1501
Rao Thanks for the quick reply .. Both buttons are 96 29 Rick Lipkin
BtnBmp icon resizing with recent FWH including 1501
Rick, can You please check the image-size ( must be the same ) ? In case the picture-size ( inside the transparent-are ) is different, it could be the reason for the button-adjustment with different result. best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
BtnBmp icon resizing with recent FWH including 1501
[quote="Rick Lipkin":15s827ya]Rao Thanks for the quick reply .. Both buttons are 96 29 Rick Lipkin[/quote:15s827ya] That means the bitmap is re-sized in the ration 25/48. which is approx 24x24 As Mr Uwe suggested possibly the actual image area is much less than 48x48. I shall be glad if you can extract the bitmap from the res file and send to my email. Let us see how best we can improve the bmp rendering.
BtnBmp icon resizing with recent FWH including 1501
The Image shows what I mean. Both images are 32x32 in size, but the picture-size is different. The button displays the original size and not cropped to the picture. You can check these images with PIXELFORMER. [img:2qttjre8]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Button1&#46;jpg[/img:2qttjre8] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
BtnBmp icon resizing with recent FWH including 1501
Rao The bitmaps are on the way .. The Next.Bmp is 48x48 but there is a lot of dead space around the image. The old BtnBmp class somehow compensated for the out of range height of the dimensions of the button. I chose that particular bitmap based on the old class because the appearance was correct in production. Thanks for your Support! Rick Lipkin
BtnBmp icon resizing with recent FWH including 1501
Rick, same butto-nsize and different picture-size [img:2kjjsu7s]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Button2&#46;jpg[/img:2kjjsu7s] best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
BtnBmp in FwH 2.7
Hi All, yesterday i upgraded to fwH 2.7 for proper use with the latest xHarbour builder. One of my applications has a main dialog with some BtnBmp on it, which are not placed on a ButtonBar. When clicking on the dialog title a dotted line is painted around every button. To make this unwanted dots disappear i have to move the mouse cursor over all buttons. Can anybody confirm this strange behaviour? Regards, Detlef
BtnBmp in FwH 2.7
Please take the time to build a reduced and self-contained sample of the problem. EMG
BtnBmp in FwH 2.7
Thanks Enrico, Here you can find my example of a dialog with BtnBmp buttons: <!-- m --><a class="postlink" href="http://www.d-hoefner.de/files/x-po.zip">http://www.d-hoefner.de/files/x-po.zip</a><!-- m --> I used the latest FvH 2.7 together with xHarbourBuilder of March 2006. Regards, Detlef
BtnBmp in FwH 2.7
Sorry, I wasn't able to run your sample: [quote:3dh0k7x5]xHarbour Compiler build 0.99.61 (SimpLex) Copyright 1999-2006, <!-- m --><a class="postlink" href="http://www.xharbour.org">http://www.xharbour.org</a><!-- m --> <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland X-PO.c: Borland Resource Compiler Version 5.40 Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. Error X-PO.RC 23 13: Invalid bitmap format Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland[/quote:3dh0k7x5] [quote:3dh0k7x5]Error description: Error FiveWin/3 Cannot create Dialog Box: Resource: DLG_START[/quote:3dh0k7x5] EMG
BtnBmp in FwH 2.7
Enrico, i had this problem too with Borland Resource Workshop. But with xHarbour Builder i use Pelles C as Resource Editor which can handle this bitmap format. I modified the 4 bitmap files to indexed 256 Windows colors. <!-- m --><a class="postlink" href="http://www.d-hoefner.de/files/tmp.zip">http://www.d-hoefner.de/files/tmp.zip</a><!-- m --> Now brc can handle them. I tested this. But the result is still the same. When clicking the Dialog title the dotted lines appear. Thanks for your time, Detlef
BtnBmp in FwH 2.7
Ok, found! Just remove WS_TABSTOP style: [code:15bxpd76]CONTROL "", 201, "TBtnBmp", 0, 25, 33, 27, 23 CONTROL "", 202, "TBtnBmp", 0, 59, 33, 27, 23 CONTROL "", 203, "TBtnBmp", 0, 108, 33, 27, 23 CONTROL "", 204, "TBtnBmp", 0x00000008, 169, 33, 27, 23[/code:15bxpd76] EMG
BtnBmp in FwH 2.7
[quote="EnricoMaria":1670edd1]Ok, found! Just remove WS_TABSTOP style: [code:1670edd1]CONTROL "", 201, "TBtnBmp", 0, 25, 33, 27, 23 CONTROL "", 202, "TBtnBmp", 0, 59, 33, 27, 23 CONTROL "", 203, "TBtnBmp", 0, 108, 33, 27, 23 CONTROL "", 204, "TBtnBmp", 0x00000008, 169, 33, 27, 23[/code:1670edd1] EMG[/quote:1670edd1] Hi Enrico, you are right. <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> And i can can state that you're a real Sherlock Holmes for FiveWin internals. Thanks a lot. Detlef
BtnBmp in FwH 2.7
Enrico, Thanks as usual! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
BtnBmp in a dialog
Hello, is it possible that btnbmp in a dialog is not available yet? I have: message not found tbtnbmp:_ctooltip, tbtnbmp_ctooltip(169) Regards Thomas
BtnBmp in a dialog
[quote="Thomas Grueninger":1d5ewypd]Hello, is it possible that btnbmp in a dialog is not available yet? I have: message not found tbtnbmp:_ctooltip, tbtnbmp_ctooltip(169) Regards Thomas[/quote:1d5ewypd] Thomas Check the syntax, i have no problems with btnbmp. This is a sample of what i use, If you still have a problem, can you show the offending code ? HTH Richard @ 125, 20 BTNBMP FILE CurDir() + "\client.bmp" ; SIZE 30, 30 ; ACTION oSay:SetText( "Clients" )
BtnBmp in a dialog
Hello Richard, sorry, i forgot to wrote that the dialog is in a resource. Thomas
BtnBmp in a dialog
[quote="Thomas Grueninger":1977ile9]I have: message not found tbtnbmp:_ctooltip, tbtnbmp_ctooltip(169)[/quote:1977ile9] Tooltips are not available yet.
BtnBmp in a dialog
Hello Antonio, thanks for your answer. But i will not use tooltips. Thomas
BtnBmp in a dialog
Thomas, Do you get the error without using tooltips ? If so, how may we reproduce the error ? thanks.
BtnBmp is not transparent on a folder
This is a sample of the problem (please activate themes): [code=fw:2c4fdlm9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> oDlg, oFld<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />           <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"FOLDER"</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg;<br />             <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"Test"</span>;<br />             <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"TEST"</span><br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span>;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>;<br />             FILE <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\o</span>pen.bmp"</span>;<br />             NOBORDER<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span>;<br />             <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg;<br />             <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />             <span style="color: #0000ff;">CENTER</span><br /><br />    <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2c4fdlm9] The RC file: [code=fw:2c4fdlm9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">FOLDER</span> <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">49</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">365</span>, <span style="color: #000000;">295</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Folder test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">355</span>, <span style="color: #000000;">265</span><br /> CONTROL <span style="color: #ff0000;">"&Close"</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">275</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span><br /><span style="color: #000000;">&#125;</span><br /><br /><br />TEST <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">49</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">365</span>, <span style="color: #000000;">295</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TBtnBmp"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">25</span><br /><span style="color: #000000;">&#125;</span></div>[/code:2c4fdlm9] EMG
BtnBmp is not transparent on a folder
I see the button transparent without manifest and not transparent with manifest. Is that you see too?
BtnBmp is not transparent on a folder
Yes. EMG
BtnBmp is not transparent on a folder
Working well with this addition [code=fw:734ufo25]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp;<span style="color: #00C800;">if</span> IsAppThemed<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_BLACK, CLR_WHITE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:734ufo25]
BtnBmp is not transparent on a folder
Ok, but it is not the correct fix. We need the trasparence, right? EMG
BtnBmp is not transparent on a folder
I agree. This has been so all the time. This is only a workaround in the application. Btnbmp.prg needs to be modified.
BtnBmp is not transparent on a folder
Ok, thank you. EMG
BtnBmp on Main Window
I have placed a BtnBmp control on the main window of my application but the action clause does not work [code=fw:pcsjwfcn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oMainWnd &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> MainMenu<span style="color: #000000;">&#40;</span>cPath,lClose<span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> eval<span style="color: #000000;">&#40;</span>cTitle<span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'N/W*'</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MDI</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oMainWnd <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">" &nbsp;TechData Software "</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">220</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">of</span> oMainWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">70</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">'Button'</span> <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'here'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:pcsjwfcn] Is it because it is an MDI frame Thanks Colin
BtnBmp on Main Window
Hello Colin, I think it is not possible, to paint Buttons directly on a Main-Window ( MDI-frame ) Found a possible Solution to paint one or more Buttons. Transparent, Color, Gradient, Brush and Image : [img:sun0z7tw]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn1&#46;jpg[/img:sun0z7tw] [code=fw:sun0z7tw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">14853684</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndMain <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"I am the MDI Frame"</span> <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">BRUSH</span> oBrush <br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndEdit <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">80</span> ;<br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"I am a MDI Child"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R"</span><br /> <br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndEdit<br />   <br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWndEdit <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">"  TechData Software "</span> ;<br /><span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndMain <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> SHOW_BTN<span style="color: #000000;">&#40;</span>oWndMain, oBrush<span style="color: #000000;">&#41;</span> <br /><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">"  TechData Software "</span> ;<br /><span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span> <br /><br />oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <br /><br /><span style="color: #00C800;">RETURN</span> oWnd <br />  <br /><span style="color: #B900B9;">// -------- We need a Frame, to paint the Buttons ------------   </span><br /><br /><span style="color: #00C800;">FUNCTION</span> SHOW_BTN<span style="color: #000000;">&#40;</span>oWndMain, oBrush<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg1, oBtn1, oBtn2, oBtn3<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">BRUSH</span> oBrush ;<br /><span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span>WS_POPUP, WS_VISIBLE<span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">OF</span> oDlg1 ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span> , <span style="color: #000000;">40</span>  <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 1"</span> <span style="color: #000000;">2007</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br />TOP ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\e</span>dit.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'here'</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>      <br /><br />oBtn1:<span style="color: #000000;">cTooltip</span> :=  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Show Button 1"</span> + CRLF + ;<br />     <span style="color: #ff0000;">"on Main-Window"</span>,<span style="color: #ff0000;">"Button 1"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">&#125;</span><br /><br />@ <span style="color: #000000;">60</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">OF</span> oDlg1 ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span> , <span style="color: #000000;">40</span>  <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 2"</span> <span style="color: #000000;">2007</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br />TOP ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\f</span>ax.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'here'</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>      <br /><br />oBtn2:<span style="color: #000000;">cTooltip</span> :=  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Show Button 2"</span> + CRLF + ;<br />     <span style="color: #ff0000;">"on Main-Window"</span>,<span style="color: #ff0000;">"Button 2"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">&#125;</span><br /><br />@ <span style="color: #000000;">120</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> oBtn3 <span style="color: #0000ff;">OF</span> oDlg1 ;<br /><span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span> , <span style="color: #000000;">40</span>  <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Button 3"</span> <span style="color: #000000;">2007</span> ;<br /><span style="color: #0000ff;">FONT</span> oFont1 ;<br />TOP ;<br />NOBORDER ;<br />FILENAME <span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\m</span>agic.bmp"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'here'</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>      <br /><br />oBtn3:<span style="color: #000000;">cTooltip</span> :=  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Show Button 3"</span> + CRLF + ;<br />     <span style="color: #ff0000;">"on Main-Window"</span>,<span style="color: #ff0000;">"Button 3"</span>, <span style="color: #000000;">1</span>, CLR_BLACK, <span style="color: #000000;">14089979</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">NOWAIT</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg1:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">380</span>, .f.<span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:sun0z7tw] [img:sun0z7tw]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn2&#46;jpg[/img:sun0z7tw] [img:sun0z7tw]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn3&#46;jpg[/img:sun0z7tw] [img:sun0z7tw]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn4&#46;jpg[/img:sun0z7tw] We can use Images as well [img:sun0z7tw]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn5&#46;jpg[/img:sun0z7tw] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BtnBmp on Main Window
Collin and Uwe, There is no need to use a PUBLIC or to pass the main window object to another function. This object is stored in the function wndMain() so you can access it anywhere in your program. You can also access it using a kind of shorthand syntax: Instead of: local oWnd oWnd:= wndMain() oWnd:setColor(...) You can simply do: wndMain():setColor(...) Another example: define dialog oDlg ... of wndMain() Regards, James
BtnBmp on Main Window
Hi James Yes I tried that - but the oMainwWnd:bGotFocus does not seem to work except for the first time the main window is displayed. The only way I could find for the button to display was to mouse over it. Cheers Colin
BtnBmp on Main Window
Uwe and James Thanks for your replies I got the button to work but being a nonmodal dialog it was visible over child windows. [code=fw:2rnyebxh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">OF</span> oMainWnd <span style="color: #0000ff;">PIXEL</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span>WS_POPUP, WS_VISIBLE<span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">of</span> oDlg1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">size</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">20</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">'Button'</span> <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span>oDlg1:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,fnods<span style="color: #000000;">&#40;</span>oMainWnd,cPath<span style="color: #000000;">&#41;</span>,oDlg1:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg1 <span style="color: #0000ff;">NOWAIT</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg1:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">380</span>, .f.<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:2rnyebxh] Cheers Colin
BtnBmp on Main Window
Colin, It seems complicated but you could try hiding the dialog when a child window is opened, and showing it when the window is closed. This is one more reason I never use MDI. Regards, James
BtnBmp on Main Window
Hi James Yes it does seem complicated - I changed the way the menu calls options - this may give the client what he wants. Cheers Colin
BtnBmp on Main Window
Colin, I agree with James, I did a quick test with 2 embedded Dialogs and Nowait. It works fine with the same Result like 2 Windows ( MDI ) Moving the Dialog, it covers the Dialog with the Buttons. Is there maybe a special reason, You need MDI ? I will create a new sample tomorrow. Maybe it works for You. Showing Buttons inside a Dialog with no Border, no Sysmenu, no Title, is a nice Solution, to create a Buttonbar on any Screen-position. With a normal Buttonbar, You have fixed Positions ( TOP, LEFT, RIGHT, BOTTOM, FLOAT ). Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BtnBmp on Main Window
Hi Uwe I like MDI apps and so do my clients they quite often have the same screen open twice with different data selected. I must admit the visuals you create are amazing. Cheers Colin
BtnBmp on Main Window
Colin, >I like MDI apps and so do my clients they quite often have the same screen open twice with different data selected. You can do this with a main window and a splitter too. Just about anything you can do with MDI you can do with SDI. The main issue I have with MDI is all the window manipulation that the user has to do. This is just overhead work for them, that gets in the way of what they are trying to do. IMHO. Regards, James
BtnBmp on Main Window
Colin if you want work over MDI main window you should use DATA oWndClient like this [code=fw:38kxsvx4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMainWnd, oBtn<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oMainWnd &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"testing"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'N/W*'</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MDI</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oMainWnd <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">" &nbsp;TechData Software "</span> ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">220</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">of</span> oMainWnd:<span style="color: #000000;">oWndClient</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">70</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">'Button'</span> <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'here'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oMainWnd<br />&nbsp; &nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:38kxsvx4]
BtnBmp on Main Window
Hi Daniel Tht works fine except when you open a window over the button and then close the window the button does not show until you mouse over it - is there a way to refresh the main window and button. Cheers Colin
BtnBmp on Main Window
Colin, Maybe try: oMainWnd:bGotFocus:= {|| oBtn:refresh() } Regards, James
BtnBmp on Main Window
Colin, I added some more Functions to my Sample. All Buttons are working fine now ( changed from Dialog to MDI-child ). I hope, it will work for You <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn6&#46;jpg[/img:23v0gvft] You can create a extra Child, only for the Buttons. ( I can use the same Background like the Main-window to make it transparent looking ) It works exactly like I have done before with the Dialog, but now the Main-Child is on Top like expected and covers the Buttons. For the Screenshot-sample the Button-part ( Color-Background ) : .. .. [color=#0000FF:23v0gvft]DEFINE BRUSH oBrush3 COLOR 14853684[/color:23v0gvft] [color=#FF0000:23v0gvft]DEFINE WINDOW oWndBtn MDICHILD OF oWndMain FROM 50, 50 TO 350, 220 PIXEL ; BORDER NONE ; NOSYSMENU ; NOICONIZE ; NOCAPTION ; BRUSH oBrush3[/color:23v0gvft] [color=#0000FF:23v0gvft]@ 10, 10 BTNBMP oBtn1 OF oWndBtn PIXEL ; SIZE 150 , 80 PROMPT "Hide Child" 2007 ; FONT oFont1 ; TOP ; NOBORDER ; FILENAME ".\bitmaps\32x32\Hide.bmp" ; ACTION ( oWndEdit:Hide() ) oBtn1:SetColor( 128, ) oBtn1:cTooltip := { "Show Button 1" + CRLF + ; "on Main-Window","Button 1", 1, CLR_BLACK, 14089979 } @ 110, 10 BTNBMP oBtn2 OF oWndBtn PIXEL ; SIZE 150 , 80 PROMPT "Show Child" 2007 ; FONT oFont1 ; TOP ; NOBORDER ; FILENAME ".\bitmaps\32x32\Show.bmp" ; ACTION ( oWndEdit:Show() ) oBtn2:SetColor( 128, ) oBtn2:cTooltip := { "Show Button 2" + CRLF + ; "on Main-Window","Button 2", 1, CLR_BLACK, 14089979 } @ 210, 10 BTNBMP oBtn3 OF oWndBtn PIXEL ; SIZE 150 , 80 PROMPT "Exit" 2007 ; FONT oFont1 ; TOP ; NOBORDER ; FILENAME ".\bitmaps\32x32\Exit.bmp" ; ACTION ( oWndMain:End() ) oBtn3:SetColor( 128, ) oBtn3:cTooltip := { "Show Button 3" + CRLF + ; "on Main-Window","Button 3", 1, CLR_BLACK, 14089979 }[/color:23v0gvft] [color=#FF0000:23v0gvft]ACTIVATE WINDOW oWndBtn [/color:23v0gvft] ... ... Because it is not possible, to create a TRANSPARENT Child-window, that will show the Background from WndMain, it gets more tricky. [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn7&#46;jpg[/img:23v0gvft] 1. we have to make a Screencapture from the covered Wndmain-area. 2. we use this Capture ( Section ) as Brush Sample with captured Background-section : [color=#FF0000:23v0gvft]only needed if using Gradient or Image as WndMain-background !!![/color:23v0gvft] DEFINE BRUSH oBrush3 FILENAME [color=#FF0000:23v0gvft]cImage3A[/color:23v0gvft] // Screencapture-section DEFINE WINDOW oWndBtn MDICHILD OF oWndMain FROM 50, 50 TO 350, 220 PIXEL ; BORDER NONE ; NOSYSMENU ; NOICONIZE ; NOCAPTION ; BRUSH oBrush3 with Image-Background : [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/Capture1&#46;jpg[/img:23v0gvft] Captured-area defined as Child-background : [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn8&#46;jpg[/img:23v0gvft] [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn9&#46;jpg[/img:23v0gvft] [img:23v0gvft]http&#58;//www&#46;pflegeplus&#46;com/pictures/mdibtn10&#46;jpg[/img:23v0gvft] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
BtnBmp problems with 1502
To All Sorry to report that the BtnBmp bitmaps are off 'slightly' between FWH 1501 and 1502 .. notice the Cancel button . Rick Lipkin Fwh 1501 [img:2ywpefla]http&#58;//i59&#46;tinypic&#46;com/2saczk6&#46;jpg[/img:2ywpefla] Fwh 1502 [img:2ywpefla]http&#58;//i58&#46;tinypic&#46;com/2dw803s&#46;jpg[/img:2ywpefla] [code=fw:2ywpefla]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CANCEL"</span>, <span style="color: #ff0000;">"DCANCEL"</span>, <span style="color: #ff0000;">"DCANCEL"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lOK := .F., oDLG:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2ywpefla]
BtnBmp problems with 1502
Antonio,Rao Any answers ? Rick Lipkin
BtnBmp problems with 1502
Rick, I think it is a image problem. Can You post / add the used image original size, to make it possible to check it ? Maybe there is something wrong with the transparent area. Often it happens using small images. The problem I enlarged a image found in /samples/bitmaps/16x16 Like You can see, this image doesn't have any clear areas, can be painted transparent. [img:1ai6c3qm]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Delete1&#46;jpg[/img:1ai6c3qm] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
BtnBmp problems with 1502
Mr Rick Thanks for pointing out. Fixed. Revised build will be available shortly.
BtnBmp problems with 1502
Revised build is just published and this fix is included. Please test.
BtnBmp problems with 1502
Rao First chance I have had to download rev 2 .. here is the results .. I also tried to pad the front of the Prompt with extra spaces, but it had no effect. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Rick Lipkin [img:1h2sv6qt]http&#58;//i60&#46;tinypic&#46;com/2liwtxu&#46;jpg[/img:1h2sv6qt]
BtnBmp problems with 1502
Please check my email to you.
BtnBmp problems with 1502
Rao Thank you for your quick updates .. the BtnBmp and Bar updates worked GREAT! Rick Lipkin
BtnBmp problems with 1502
Hello: Is the rpreview.prg buttons propper appearance fixed with this fix?. Thank you very much.
BtnBmp problems with 1502
[quote="MOISES":34iv87vf]Hello: Is the rpreview.prg buttons propper appearance fixed with this fix?. Thank you very much.[/quote:34iv87vf] Yes
BtnBmp problems with 1502
Hello, When the revised build will be ready?. Thank You.
BtnBmp problems with 1502
Up please.
BtnBmp problems with 1502
Antonio, Can you please review it?. Thank you.
BtnBmp problems with 1502
I suppose 15.03 may be released any time, which includes all these fixes
BtnBmp prompt
I would like to change the prompt on a BtnBmp during program execution. Consider: ... REDEFINE BTNBMP oBtn1 RESOURCE "ADD" PROMPT "Add" .... Later I want to change the prompt to "Confirm" oBtn1:SetText("confirm") eliminates the bitmap and gives only a text button So what can I use to just change the prompt and nothing else ? Thanks Tim
BtnBmp prompt
Try this: [code=fw:3462sinq]<div class="fw" id="{CB}" style="font-family: monospace;">oBtn1:<span style="color: #000000;">cCaption</span>:=<span style="color: #ff0000;">"Confirm"</span><br />oBtn1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3462sinq]
BtnBmp prompt
Thanks
BtnBmp prompt
tim: Could you send me your email address. I notice in past you've been working with quick books. I'd like to ask you a few questions. Thanks send to <!-- e --><a href="mailto:hgoldstein@dslextreme.com">hgoldstein@dslextreme.com</a><!-- e -->
BtnBmp with Alpha Channel
I present another possible contribution, again presenting the prototype of what would change ... As discussed the matter on Alpha Channel to start implementing FW classes the general idea, just as we use the clause TRANSPARENT, i added ALPHA clause to say that we will use the features of a bitmap with Alpha Channel, this feature requires an amount of transparency (0-255), I have added a LEVEL clause to determine the percentages that transparency (0-100%), do not use 0-255, only number that expresses the percentage. Class TBTNBMP currently used by the 3 images (1-Status Normal, 2-Button pressed, 3-Button Disabled) for the next build, was added 4th image that will be used when the mouse cross over button by the use of these images have all the individual transparencies example @ X, y btnbmp .... ALPHA LEVEL 0,10,10,0 we can add transparency percentage to each image, by default would be 0% transparency ... No more words to leave them with an example I am attentive to the opinions and suggestions [url:1y324mjt]http&#58;//www&#46;sitasoft&#46;com/fivewin/test/testbtb2&#46;rar[/url:1y324mjt] [code=fw:1y324mjt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Slider.ch"</span><br /><br />procedure main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlgw<br /><span style="color: #00C800;">local</span> oBot01<br /><span style="color: #00C800;">local</span> oBar, oBotBar0, oBotBar1 <br /><span style="color: #00C800;">local</span> nVar1 := <span style="color: #000000;">80</span> &nbsp;<span style="color: #B900B9;">// transparence porcent</span><br /><span style="color: #00C800;">local</span> oSlide<br /><span style="color: #00C800;">local</span> lChk1 := .f.<br /><span style="color: #00C800;">local</span> lChk2 := .f.<br /><br /><br />SetBalloon<span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">dialog</span> oDlgw <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test BTNBMP Alpha Channel"</span> <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">700</span> <span style="color: #0000ff;">pixel</span><br /><br /><br />&nbsp; @ <span style="color: #000000;">50</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">BTNBMP</span> oBot01 <span style="color: #0000ff;">OF</span> oDlgw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">80</span> tooltip <span style="color: #ff0000;">"BTNBMP With Alpha Channel"</span> ;<br />&nbsp; &nbsp;file <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\e</span>xplorer.bmp"</span>,<span style="color: #00C800;">nil</span>,<span style="color: #00C800;">nil</span>,<span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\i</span>mac.bmp"</span> alpha level nVar1,,,<span style="color: #000000;">20</span><br />&nbsp; &nbsp;<br />&nbsp; @ <span style="color: #000000;">180</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">checkbox</span> lChk1 <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Adjust Image &nbsp; "</span> <span style="color: #0000ff;">of</span> oDlgw <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">change</span> <span style="color: #000000;">&#40;</span> oBot01:<span style="color: #000000;">lAdjust</span> := lChk1, oBot01:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; @ <span style="color: #000000;">200</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">checkbox</span> lChk2 <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"2007 Style &nbsp; &nbsp; "</span> <span style="color: #0000ff;">of</span> oDlgw <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">change</span> <span style="color: #000000;">&#40;</span> oBot01:<span style="color: #000000;">l2007</span> := lChk2, oBot01:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; @ <span style="color: #000000;">50</span>, <span style="color: #000000;">300</span> SLIDER oSlide <span style="color: #0000ff;">VAR</span> nVar1 <span style="color: #0000ff;">OF</span> oDlgw ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VERTICAL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RIGHT</span> DIRECTION ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RANGE <span style="color: #000000;">1</span>, <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MARKS <span style="color: #000000;">1</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXACT;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oBot01:<span style="color: #000000;">aLevel</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := nVar1, oBot01:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">160</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; <br />&nbsp;<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">dialog</span> oDlgw <br /><br /><span style="color: #00C800;">return</span></div>[/code:1y324mjt]
BtnBmp y XP
Los btnbmp no se ven igual a los button con los temas XP, eso puede corregirse o hay algún otro control nativo que permita un botón con imagen y se vea mejor? Uso FWH 7.01 y xHarbour distribuído con él.
BtnBmp y XP
Jose, Tienes que usar la Clase TButtonBmp. Revisa el ejemplo samples\TestBuBm.prg
BtnBmp.. I not understood this error
I have this error .... [code=fw:2kzf8kxr]<div class="fw" id="{CB}" style="font-family: monospace;">Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">10</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">22</span>, <span style="color: #000000;">21</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">40</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span>  No exported <span style="color: #00C800;">method</span>: <span style="color: #0000ff;">ACTIVATE</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = C   yellow<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N   <span style="color: #000000;">32</span><br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> = N   <span style="color: #000000;">4</span><br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> = O   TDIALOG<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> = L   .F.<br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => <span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">989</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1845</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2051</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3560</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">304</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">test</span>.prg => TESTBUTTON<span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span></div>[/code:2kzf8kxr] and on dialog I have only [code=fw:2kzf8kxr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><br /><span style="color: #00C800;">Function</span> TestButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oDlg<br /><span style="color: #00C800;">local</span> oBtn1<br /><span style="color: #00C800;">local</span> nColor1:=CLR_GRAY<br /><span style="color: #00C800;">local</span> nColor2:=CLR_GRAY<br /><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">400</span>  <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE;<br />   <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tavolozza colori numeri"</span><br /><br /><br />     @ <span style="color: #000000;">50</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1  ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">50</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT NOBORDER ;<br />      <span style="color: #0000ff;">COLOR</span> nColor1,nColor2 ;<br />       <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopup</span> := <span style="color: #000000;">&#123;</span> |oBtn| PicKColors<span style="color: #000000;">&#40;</span>oBtn,oDlg,,<span style="color: #ff0000;">"gray"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />                  ::<span style="color: #000000;">ShowPopUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                  ::<span style="color: #000000;">oPopup</span> := <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDLG  <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">return</span>  <span style="color: #00C800;">nil</span><br /><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> PicKColors<span style="color: #000000;">&#40;</span>ocontrol,oParent,lHex,cColore<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oDlgSel,oPanel<br /><span style="color: #00C800;">Local</span> aColors := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> aReturnvalue:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> nSelection:= <span style="color: #000000;">1</span><br /><br /><span style="color: #00C800;">DEFAULT</span>  lHex := .F.<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgSel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span><br /> oDlgSel:<span style="color: #000000;">nStyle</span>    = nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_BORDER, WS_VISIBLE,WS_POPUP <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgSel  <span style="color: #0000ff;">CENTERED</span>       <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /> </div>[/code:2kzf8kxr] PickColors is mine function you can use also choosecolor() I need a btnbmp with popup button but the popup must open My function where is a small dialog as this [img:2kzf8kxr]https&#58;//i&#46;postimg&#46;cc/YCsD5bSG/hh&#46;png[/img:2kzf8kxr] then I select the color the procedure make that error , but the error is come out also with choosecolor() [img:2kzf8kxr]https&#58;//i&#46;postimg&#46;cc/XYZ5X8V0/mm&#46;png[/img:2kzf8kxr] the black arrow come out then I press the button , why ?
BtnBmp: caption position
Dear friends, is it possible to put the BTNBMP caption to the top of the button? It seems that it is only go centered. EMG
BtnBmp: caption position
And what about to choose the color of the caption? EMG
BtnBmp: caption position
@ 1,2 BTNBMP oBtn ; PROMPT "Text" TOP ADJUST OF oDlg ; SIZE 100 , 100 ; FILE "BTN.BMP" NOBORDER ; FONT oFont1 UPDATE oBtn:SetColor( CLR_HBLUE ,CLR_WHITE) oBtn:nClrText( CLR_HRED ) oBtn:nClrText( CLR_HRED ) Regards MAurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
BtnBmp: caption position
Great! Thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> And what about the position? EMG