topic
stringlengths
1
63
text
stringlengths
1
577k
¿ Cómo leer huella digital desde FiveWin y Harbour?
Hola, Puedes usar también WeTransfer y pegar aquí el link. Muchas gracias.
¿ Cómo leer huella digital desde FiveWin y Harbour?
ejemplo de sistema para crear tarjeta gana - puntos y validación de huella para asignar puntos en sistema de facturacion fivewin <!-- m --><a class="postlink" href="https://we.tl/t-agzNVUtpKX">https://we.tl/t-agzNVUtpKX</a><!-- m --> sdk DigitalPersona, incluye ejemplo para c++ <!-- m --><a class="postlink" href="https://we.tl/t-cedWeCru5s">https://we.tl/t-cedWeCru5s</a><!-- m --> Jonsson Russi
¿ Cómo poner los redefine gets FLAT ?
Estimados: He tratado de todo, vi muchos ejemplos; ingrese a los archivos rc y res lo logre en los otros controles pero no el los gets. Desde ya gracia por la ayuda.
¿ Cómo poner los redefine gets FLAT ?
wywerco: Intenta incluyendo el MANIFIEST en tu archivo de recursos. Saludos
¿ Cómo poner los redefine gets FLAT ?
ok
¿ Cómo poner los redefine gets FLAT ?
Excelente, muchas gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
¿ Cómo resto horas?
Eso mismo. Tengo 7:00 hs y 7:15 hs. Como hago para restar esos valores? gracias.
¿ Cómo resto horas?
listo. solucionado [code=fw:60besiba]<div class="fw" id="{CB}" style="font-family: monospace;">elaptime<span style="color: #000000;">&#40;</span>cHorainicio, cHorafin<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:60besiba] gracias.
¿ Cómo subo una imagen o vídeo al Foro ?
Buenos Días Compañeros ¿ Alguien podría enseñarme a subir una imagen o vídeo al foro ? Leí las preguntas frecuentes y dice que no la puedo subir del PC, entonces de donde lo hago, varios compañeros me han pedido que suba imagen y no he podido. observación: una imagen vale más que mil palabras. Desde ya muchas gracias... Atentos a su ayuda, Saludos Waldemar
¿ Cómo subo una imagen o vídeo al Foro ?
Por ejemplo en : [url:35n6kmg2]https&#58;//es&#46;imgbb&#46;com/[/url:35n6kmg2] [url:35n6kmg2]https&#58;//imgur&#46;com/[/url:35n6kmg2] [url:35n6kmg2]https&#58;//subefotos&#46;com/[/url:35n6kmg2]
¿ Cómo subo una imagen o vídeo al Foro ?
[quote="AngelSalom":34g5d0f9]Por ejemplo en : [url:34g5d0f9]https&#58;//es&#46;imgbb&#46;com/[/url:34g5d0f9] [url:34g5d0f9]https&#58;//imgur&#46;com/[/url:34g5d0f9] [url:34g5d0f9]https&#58;//subefotos&#46;com/[/url:34g5d0f9][/quote:34g5d0f9] Gracias Angel. Ok, subo la foto en estos lugares ¿ y luego ? Atentamente, Waldemar
¿ Cómo subo una imagen o vídeo al Foro ?
Cuando subes la imagen te da la opción de compartirla, debes buscar el formato "bbcode" y luego copiar y pegar el texto que te crea. Aquí lo acabo de hacer con el ejemplo que te comento en la primera de las webs : [url=https&#58;//ibb&#46;co/tPmTyLZ:23607sr1][img:23607sr1]https&#58;//i&#46;ibb&#46;co/x8CtVFm/2019-06-26-10h09-11&#46;png[/img:23607sr1][/url:23607sr1]
¿ Cómo subo una imagen o vídeo al Foro ?
[quote="AngelSalom":3gj31pcs]Cuando subes la imagen te da la opción de compartirla, debes buscar el formato "bbcode" y luego copiar y pegar el texto que te crea. Aquí lo acabo de hacer con el ejemplo que te comento en la primera de las webs : [url=https&#58;//ibb&#46;co/tPmTyLZ:3gj31pcs][img:3gj31pcs]https&#58;//i&#46;ibb&#46;co/x8CtVFm/2019-06-26-10h09-11&#46;png[/img:3gj31pcs][/url:3gj31pcs][/quote:3gj31pcs] Prueba: [url=https&#58;//ibb&#46;co/K7KyzpN:3gj31pcs][img:3gj31pcs]https&#58;//i&#46;ibb&#46;co/QnDmj38/Pantalla&#46;jpg[/img:3gj31pcs][/url:3gj31pcs] Muchas gracias Angel ¿ y los videos ? Bendiciones, Waldemar
¿ Cómo subo una imagen o vídeo al Foro ?
No he enviado vídeos al foro pero creo que se trata igual como una imagen pero guardada en formato GIF animado. Hay algunas aplicaciones para realizarlo, por ejemplo : [url:vvhahukd]https&#58;//www&#46;luisllamas&#46;es/capturar-la-pantalla-o-video-a-gif-animado-con-screentogif/[/url:vvhahukd]
¿ Cómo subo una imagen o vídeo al Foro ?
[quote="AngelSalom":3deo7sh3]No he enviado vídeos al foro pero creo que se trata igual como una imagen pero guardada en formato GIF animado. Hay algunas aplicaciones para realizarlo, por ejemplo : [url:3deo7sh3]https&#58;//www&#46;luisllamas&#46;es/capturar-la-pantalla-o-video-a-gif-animado-con-screentogif/[/url:3deo7sh3][/quote:3deo7sh3] Muchas gracias Angel me has ayudado mucho... Bendiciones, Waldemar
¿ Cómo subo una imagen o vídeo al Foro ?
[quote="wywerco":eudbbcdg][quote="AngelSalom":eudbbcdg]No he enviado vídeos al foro pero creo que se trata igual como una imagen pero guardada en formato GIF animado. Hay algunas aplicaciones para realizarlo, por ejemplo : [url:eudbbcdg]https&#58;//www&#46;luisllamas&#46;es/capturar-la-pantalla-o-video-a-gif-animado-con-screentogif/[/url:eudbbcdg][/quote:eudbbcdg] Muchas gracias Angel me has ayudado mucho... Bendiciones, Waldemar[/quote:eudbbcdg] Yo os doy las gracias a ambos, ya que queria preguntarlo hacia tiempo pero me daba verguenza , como solo pregunto chorradas... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Habia probado enviar como imagen y como url pero solo salia el enlace. Saludos Jose.
¿ Cómo subo una imagen o vídeo al Foro ?
Desde hace mucho tiempo, yo utilizo <!-- m --><a class="postlink" href="https://postimages.org/">https://postimages.org/</a><!-- m -->
¿ Error en el codigo de btnbmp ?
Es correcto este código ? , no tendriamos que liberar el dc creado en aBmpPal = PalBmpRead( ::GetDC(), cBmpFile1 ) con un ::ReleaseDC()? . Esto pasaría en varias partes del código y se podria solucionar pasando el primer ::ReleaseDc() para despues del "endif". Saludos. [code=fw:2tq2g583]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> LoadBitmaps<br /><br />&nbsp; &nbsp; ......<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> cBmpFile1, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;......<br /><br />&nbsp;</div>[/code:2tq2g583]
¿ Error en el codigo de btnbmp ?
Manuel, Corregido e incluido en la versión revisada de FWH 13.07, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
¿ Error en el codigo de btnbmp ?
Antonio, es correcto que quede asi el codigo, lo digo por que al pasar el ::ReleaseDC() despues del endif, estaria eliminando un DC, que en el caso de palbmpread es creado con ::GetDC(), pero no veo que se creee un DC en FWOpenPngFile otra pregunta, este cambio aplica para cada uno de los cBmpFIle1...4? [code=fw:2odiw4jm]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> upper<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">right</span><span style="color: #000000;">&#40;</span>cBmpFile1,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>=<span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:2odiw4jm]
¿ Error en el codigo de btnbmp ?
Carlos, Esa es una de las correcciones que hemos hecho. Hay que llamar a ::ReleaseDC() solo cuando se haya llamado previamente a ::GetDC()
¿ Error en el codigo de btnbmp ?
al final entonces como queda?
¿ Error en el codigo de btnbmp ?
Carlos, Aqui está la clase TBtnBmp actual completa: [code=fw:14qxtamz]<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: #00D7D7;">#define</span> LTGRAY_BRUSH        <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> RT_BITMAP           <span style="color: #000000;">2</span><br /><br /><span style="color: #00D7D7;">#define</span> OPAQUE              <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> TRANSPARENT         <span style="color: #000000;">1</span><br /><br /><span style="color: #00D7D7;">#define</span> COLOR_BTNFACE      <span style="color: #000000;">15</span><br /><span style="color: #00D7D7;">#define</span> COLOR_BTNSHADOW    <span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> COLOR_BTNHIGHLIGHT <span style="color: #000000;">20</span><br /><br /><span style="color: #00D7D7;">#define</span> NO_FOCUSWIDTH      <span style="color: #000000;">25</span><br /><span style="color: #00D7D7;">#define</span> GWL_STYLE         <span style="color: #000000;">-16</span><br /><br /><span style="color: #00D7D7;">#define</span> TME_LEAVE           <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> WM_MOUSELEAVE     <span style="color: #000000;">675</span><br /><br /><span style="color: #00D7D7;">#define</span> DT_TOP              <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> DT_LEFT             <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> DT_CENTER           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> DT_RIGHT            <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> DT_VCENTER          <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> DT_BOTTOM           <span style="color: #000000;">8</span><br /><span style="color: #00D7D7;">#define</span> DT_WORDBREAK       <span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> DT_SINGLELINE      <span style="color: #000000;">32</span><br /><span style="color: #00D7D7;">#define</span> DT_CALCRECT      <span style="color: #000000;">1024</span><br /><br /><span style="color: #00D7D7;">#define</span> BTN_UP              <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> BTN_DOWN            <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> BTN_DISABLE         <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> BTN_OVERMOUSE       <span style="color: #000000;">4</span><br /><br /><span style="color: #00D7D7;">#define</span> LAYOUT_CENTER  <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> LAYOUT_TOP     <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> LAYOUT_LEFT    <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> LAYOUT_BOTTOM  <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> LAYOUT_RIGHT   <span style="color: #000000;">4</span><br /><br /><span style="color: #00D7D7;">#define</span> DST_BITMAP      <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> DSS_UNION      <span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> DSS_DISABLED   <span style="color: #000000;">32</span><br /><span style="color: #00D7D7;">#define</span> DSS_MONO      <span style="color: #000000;">128</span><br /><br /><span style="color: #00D7D7;">#define</span> SRCCOPY      0x00CC0020<br /><br /><span style="color: #00D7D7;">#define</span> WM_SYSCHAR    <span style="color: #000000;">262</span>  <span style="color: #B900B9;">// 0x0106</span><br /><br /><span style="color: #00D7D7;">#define</span> NULL_BRUSH      <span style="color: #000000;">5</span><br /><br /><span style="color: #00C800;">static</span> aLayouts := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"TOP"</span>, <span style="color: #ff0000;">"LEFT"</span>, <span style="color: #ff0000;">"BOTTOM"</span>, <span style="color: #ff0000;">"RIGHT"</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> TBtnBmp <span style="color: #0000ff;">FROM</span> TControl<br /><br />   <span style="color: #00C800;">DATA</span>   bAction<br />   <span style="color: #00C800;">DATA</span>   cAction   <span style="color: #B900B9;">// A string description of the action</span><br />   <span style="color: #00C800;">DATA</span>   lPressed, lAdjust, lGroup AS LOGICAL<br />   <span style="color: #00C800;">DATA</span>   lWorking, lBtnUp, lBtnDown<br />   <span style="color: #00C800;">DATA</span>   lBoxSelect<br />   <span style="color: #00C800;">DATA</span>   hBitmap1, hPalette1<br />   <span style="color: #00C800;">DATA</span>   hBitmap2, hPalette2<br />   <span style="color: #00C800;">DATA</span>   hBitmap3, hPalette3<br />   <span style="color: #00C800;">DATA</span>   hBitmap4, hPalette4<br />   <span style="color: #00C800;">DATA</span>   hRgn<br />   <span style="color: #00C800;">DATA</span>   cResName1, cResName2, cResName3, cResName4<br />   <span style="color: #00C800;">DATA</span>   cBmpFile1, cBmpFile2, cBmpFile3, cBmpFile4<br />   <span style="color: #00C800;">DATA</span>   lProcessing AS LOGICAL <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span>   lBorder AS LOGICAL <span style="color: #0000ff;">INIT</span> .T.<br />   <span style="color: #00C800;">DATA</span>   lRound AS LOGICAL <span style="color: #0000ff;">INIT</span> .T.<br />   <span style="color: #00C800;">DATA</span>   lEllipse AS LOGICAL <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span>   oPopup<br />   <span style="color: #00C800;">DATA</span>   nLayout<br />   <span style="color: #00C800;">DATA</span>   lMOver <span style="color: #B900B9;">// mouse is over it</span><br />   <span style="color: #00C800;">DATA</span>   bClrGrad<br />   <span style="color: #00C800;">DATA</span>   l2007   <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span>   l2010   <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span>   lBarBtn <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span>   aAlpha<br />   <span style="color: #00C800;">DATA</span>   bAlphaLevel<br />   <span style="color: #00C800;">DATA</span>   hAlphaLevel<br />   <span style="color: #00C800;">DATA</span>   lDisColor <span style="color: #0000ff;">INIT</span> .T.<br />   <span style="color: #00C800;">DATA</span>   nClrTextDis<br /><br /><br />   CLASSDATA lRegistered AS LOGICAL<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight,;<br />               cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />               bAction, oWnd, cMsg, bWhen, lAdjust, lUpdate,;<br />               cPrompt, oFont, cResName3, cBmpFile3, lBorder, cLayout, ;<br />               l2007, cResName4, cBmpFile4, lTransparent, cToolTip,;<br />               lRound, bGradColors, lPixel, lDesign <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">METHOD</span> NewBar<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                  cMsg, bAction, lGroup, oBar, lAdjust, bWhen,;<br />                  cToolTip, lPressed, bDrop, cAction, nPos,;<br />                  cResName3, cBmpFile3, lBorder, cLayout, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                    cMsg, bAction, oBar, lAdjust, bWhen, lUpdate,;<br />                    cToolTip, cPrompt, oFont, cResName3,;<br />                    cBmpFile3, lBorder, cLayout, cResName4, cBmpFile4, lTransparent,;<br />                    lRound, bGradColors <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Display</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">BeginPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">EndPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span><br /><br />   <span style="color: #00C800;">METHOD</span> Disable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Enable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">INLINE</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> EraseBkGnd<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">1</span><br /><br />   <span style="color: #00C800;">METHOD</span> FreeBitmaps<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> GoUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lPressed</span> := ::<span style="color: #000000;">lBtnDown</span> := .F.,;<br />                        ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> GoDown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lPressed</span> := ::<span style="color: #000000;">lBtnDown</span> := .T.,;<br />                        ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> ResetBorder<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lBorder</span> := .F.,;<br />                        ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> cGenPRG<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> LButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> LButtonUp<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> LoadBitmaps<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2, cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> GotFocus<span style="color: #000000;">&#40;</span> hCtlLost <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> KeyChar<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> KeyDown<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> LostFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> MouseMove<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> DrawEllipse<span style="color: #000000;">&#40;</span> hDC, nRGBColor, n <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> DrawFocusEllipse<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> SetFile<span style="color: #000000;">&#40;</span> cBmpUpFile, cBmpDownFile <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> Toggle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lBtnDown</span> := ! ::<span style="color: #000000;">lBtnDown</span>,;<br />                          ::<span style="color: #000000;">lPressed</span> := ::<span style="color: #000000;">lBtnDown</span>,;<br />                          ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> HasAlpha<span style="color: #000000;">&#40;</span> hBitmap, nBtn <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">aAlpha</span><span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">MAX</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MAX</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MIN</span><span style="color: #000000;">&#40;</span> nBtn,<span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">MIN</span><span style="color: #000000;">&#40;</span> nBtn, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> := HasAlpha<span style="color: #000000;">&#40;</span> hBitmap <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> ShowPopup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> SetColor<span style="color: #000000;">&#40;</span> nClrText, nClrPane <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> nAlphaLevel<span style="color: #000000;">&#40;</span> nLevel <span style="color: #000000;">&#41;</span> SETGET<br /><br />   <span style="color: #00C800;">METHOD</span> aGrad<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bClrGrad</span> != <span style="color: #00C800;">nil</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bClrGrad</span>, <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .OR. ::<span style="color: #000000;">lPressed</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                         <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bClrGrad</span> != <span style="color: #00C800;">nil</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bClrGrad</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                         <br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nTop, nLeft, nWidth, nHeight,;<br />            cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />            bAction, oWnd, cMsg, bWhen, lAdjust, lUpdate,;<br />            cPrompt, oFont, cResName3, cBmpFile3, lBorder, cLayout, ;<br />            l2007, cResName4, cBmpFile4, lTransparent, cToolTip, lRound,;<br />            bGradColors, lPixel, lDesign <span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">DEFAULT</span> cMsg := <span style="color: #ff0000;">" "</span>, nTop := <span style="color: #000000;">0</span>, nLeft := <span style="color: #000000;">0</span>, nWidth := <span style="color: #000000;">20</span>, nHeight := <span style="color: #000000;">20</span>, lAdjust := .F.,;<br />           lUpdate := .F., oWnd := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lBorder := .T.,;<br />           l2007 := .F., cLayout := <span style="color: #ff0000;">"TOP"</span>, lTransparent := .F., lRound := .T.,;<br />           lPixel := .T., lDesign := .F.<br /><br />   ::<span style="color: #000000;">nStyle</span>    = nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_VISIBLE,; <span style="color: #B900B9;">// WS_CLIPSIBLINGS</span><br />                      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBorder, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> l2007, <span style="color: #000000;">0</span>, WS_BORDER <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />                      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBorder .and. ;<br />                      ! Upper<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> $ <span style="color: #ff0000;">"TBAR;TOUTLOOK;TXBROWSE"</span>, WS_TABSTOP, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />                      <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ! lBorder <span style="color: #000000;">&#41;</span> .and. oWnd:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span>, WS_TABSTOP, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                      <br />   ::<span style="color: #000000;">nId</span>       = ::<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">oWnd</span>      = oWnd<br />   ::<span style="color: #000000;">bAction</span>   = bAction<br />   ::<span style="color: #000000;">cMsg</span>      = cMsg<br />   ::<span style="color: #000000;">nTop</span>      = nTop<br />   ::<span style="color: #000000;">nLeft</span>     = nLeft<br />   ::<span style="color: #000000;">nBottom</span>   = nTop + nHeight - <span style="color: #000000;">1</span><br />   ::<span style="color: #000000;">nRight</span>    = nLeft + nWidth - <span style="color: #000000;">1</span><br />   ::<span style="color: #000000;">lPressed</span>  = .F.<br />   ::<span style="color: #000000;">lWorking</span>  = .F.<br />   ::<span style="color: #000000;">lAdjust</span>   = lAdjust<br />   ::<span style="color: #000000;">lDrag</span>     = lDesign<br />   ::<span style="color: #000000;">lCaptured</span> = .F.<br />   ::<span style="color: #000000;">bWhen</span>     = bWhen<br />   ::<span style="color: #000000;">nClrText</span>  = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nClrText</span><br />   ::<span style="color: #000000;">nClrPane</span>  = GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNFACE <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lUpdate</span>   = lUpdate<br />   ::<span style="color: #000000;">l97Look</span>   = !lBorder<br />   ::<span style="color: #000000;">lBorder</span>   = lBorder<br />   ::<span style="color: #000000;">lBtnDown</span>  = .F.<br />   ::<span style="color: #000000;">nLayout</span>   = AScan<span style="color: #000000;">&#40;</span> aLayouts, cLayout <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lRound</span>    = lRound<br /><br />   ::<span style="color: #000000;">lTransparent</span> = lTransparent<br /><br />   ::<span style="color: #000000;">cToolTip</span> = cToolTip<br /><br />   ::<span style="color: #000000;">lBoxSelect</span> = .T.<br /><br />   ::<span style="color: #000000;">aAlpha</span>    = <span style="color: #000000;">&#123;</span>.F.,.F.,.F.,.F.<span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//for all pisible bitmaps</span><br /><br />   ::<span style="color: #000000;">hAlphaLevel</span> = <span style="color: #000000;">255</span><br /><br />   ::<span style="color: #000000;">hBitmap1</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap2</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap3</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap4</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br /><br />   ::<span style="color: #000000;">cCaption</span>  = cPrompt<br />   ::<span style="color: #000000;">oFont</span>     := oFont<br />   ::<span style="color: #000000;">nDlgCode</span>  = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBAR"</span>, <span style="color: #00C800;">nil</span>, DLGC_WANTALLKEYS <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lMOver</span>    = .F.<br />   ::<span style="color: #000000;">l2007</span>     = l2007<br />   ::<span style="color: #000000;">l2010</span>     = l2007<br /><br />   ::<span style="color: #000000;">nClrTextDis</span> = ::<span style="color: #000000;">nClrText</span><br /><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">&#41;</span><br />      oWnd:<span style="color: #000000;">AddControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</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> bGradColors <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">bClrGrad</span> = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bClrGrad</span><br />   <span style="color: #00C800;">else</span>   <br />      ::<span style="color: #000000;">bClrGrad</span> = bGradColors<br />   <span style="color: #00C800;">endif</span>   <br /><br />   <span style="color: #00C800;">if</span> l2007<br />      <span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, ;<br />         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />           <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>,  <span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>  ;<br />         <span style="color: #000000;">&#125;</span>, ;<br />         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">221</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />           <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">217</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>  ;<br />         <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">endif</span><br />   <br />   ::<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                  cResName3, cBmpFile3, cResName4, cBmpFile4  <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> lDesign<br />      ::<span style="color: #000000;">CheckDots</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> NewBar<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2, cMsg, bAction,;<br />               lGroup, oBar, lAdjust, bWhen, cToolTip, lPressed,;<br />               bDrop, cAction, nPos, cPrompt, oFont, cResName3, cBmpFile3,;<br />               lBorder, oPopup, cLayout, cResName4, cBmpFile4, lTransparent<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">DEFAULT</span> cMsg := <span style="color: #ff0000;">""</span>, lAdjust := .F., lPressed := .F., lBorder := .T.,; <span style="color: #B900B9;">//ojo</span><br />           cLayout := <span style="color: #ff0000;">"TOP"</span>, lTransparent := .F.<br /><br />   <span style="color: #00C800;">if</span> oBar:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TBAR"</span> <span style="color: #000000;">&#41;</span> .and. <span style="color: #000000;">&#40;</span> oBar:<span style="color: #000000;">l2007</span> .or. oBar:<span style="color: #000000;">l2010</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">nStyle</span>    = nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_VISIBLE <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">l2007</span>     = oBar:<span style="color: #000000;">l2007</span><br />      ::<span style="color: #000000;">l2010</span>     = oBar:<span style="color: #000000;">l2010</span><br />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> oBar:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'TBAR'</span> <span style="color: #000000;">&#41;</span> .and. oBar:<span style="color: #000000;">l97Look</span> != <span style="color: #00C800;">nil</span><br />         lBorder  = ! oBar:<span style="color: #000000;">l97Look</span><br />      <span style="color: #00C800;">endif</span><br />      ::<span style="color: #000000;">nStyle</span>    = nOR<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBorder, WS_BORDER, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, WS_CHILD, WS_VISIBLE <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   <br />   ::<span style="color: #000000;">l97Look</span>   = !lBorder<br />   ::<span style="color: #000000;">nId</span>       = ::<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">oWnd</span>      = oBar<br />   ::<span style="color: #000000;">bAction</span>   = bAction<br />   ::<span style="color: #000000;">cMsg</span>      = cMsg<br />   ::<span style="color: #000000;">nTop</span>      = oBar:<span style="color: #000000;">GetBtnTop</span><span style="color: #000000;">&#40;</span> lGroup, nPos <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nLeft</span>     = oBar:<span style="color: #000000;">GetBtnLeft</span><span style="color: #000000;">&#40;</span> lGroup, nPos <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nBottom</span>   = ::<span style="color: #000000;">nTop</span> + oBar:<span style="color: #000000;">nBtnHeight</span> + <span style="color: #000000;">1</span> - <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBar:<span style="color: #000000;">l3D</span> .and. !oBar:<span style="color: #000000;">l2007</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nRight</span>    = ::<span style="color: #000000;">nLeft</span> + oBar:<span style="color: #000000;">nBtnWidth</span> - <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBar:<span style="color: #000000;">l3D</span> .and. !oBar:<span style="color: #000000;">l2007</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> + ;<br />                 <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oPopup != <span style="color: #00C800;">nil</span>, <span style="color: #000000;">13</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lPressed</span>  = lPressed<br />   ::<span style="color: #000000;">lCaptured</span> = .F.<br />   ::<span style="color: #000000;">lWorking</span>  = .F.<br />   ::<span style="color: #000000;">lDrag</span>     = .F.<br />   ::<span style="color: #000000;">lBtnDown</span>  = lPressed<br />   ::<span style="color: #000000;">lAdjust</span>   = lAdjust<br />   ::<span style="color: #000000;">lGroup</span>    = lGroup<br />   ::<span style="color: #000000;">bWhen</span>     = bWhen<br />   ::<span style="color: #000000;">nClrText</span>  = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nClrText</span><br />   ::<span style="color: #000000;">nClrPane</span>  = GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNFACE <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">oCursor</span>   = oBar:<span style="color: #000000;">oCursor</span><br />   ::<span style="color: #000000;">cToolTip</span>  = cToolTip<br />   ::<span style="color: #000000;">bDropOver</span> = bDrop<br />   ::<span style="color: #000000;">cResName1</span> = cResName1<br />   ::<span style="color: #000000;">cResName2</span> = cResName2<br />   ::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />   ::<span style="color: #000000;">cBmpFile2</span> = cBmpFile2<br />   ::<span style="color: #000000;">cAction</span>   = cAction<br />   ::<span style="color: #000000;">cCaption</span>  = cPrompt<br />   ::<span style="color: #000000;">oFont</span>     = oFont<br />   ::<span style="color: #000000;">lBorder</span>   = lBorder<br /><br />   ::<span style="color: #000000;">aAlpha</span>    = <span style="color: #000000;">&#123;</span> .F., .F., .F., .F. <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// for all possible bitmaps</span><br /><br />   ::<span style="color: #000000;">lTransparent</span> = lTransparent<br /><br />   ::<span style="color: #000000;">lBoxSelect</span> = .T.<br /><br />   ::<span style="color: #000000;">nLayout</span>   = AScan<span style="color: #000000;">&#40;</span> aLayouts, cLayout <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">hBitmap1</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap2</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap3</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap4</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br /><br />   ::<span style="color: #000000;">oPopup</span>    = oPopup<br />   ::<span style="color: #000000;">nDlgCode</span>  = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBAR"</span>, <span style="color: #00C800;">nil</span>, DLGC_WANTALLKEYS <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lMOver</span>    = .F.<br />   ::<span style="color: #000000;">lBarBtn</span>   = .T.<br /><br />   ::<span style="color: #000000;">nClrTextDis</span> = ::<span style="color: #000000;">nClrText</span><br /><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBar:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span>, nPos <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                  cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">bClrGrad</span> = <span style="color: #00C800;">nil</span><br /><br />   <span style="color: #00C800;">if</span> bWhen != <span style="color: #00C800;">nil</span> .and. ! ::<span style="color: #000000;">lWhen</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, cResName1, cResName2, cBmpFile1, cBmpFile2, cMsg,;<br />                 bAction, oBar, lAdjust, bWhen, lUpdate, cToolTip,;<br />                 cPrompt, oFont, cResName3, cBmpFile3, lBorder, cLayout, ;<br />                 l2007, cResName4, cBmpFile4, lTransparent, lRound, bGradColors <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">DEFAULT</span> cMsg := <span style="color: #ff0000;">""</span>, lAdjust := .F., lUpdate := .F., lBorder := .T.,;<br />           cLayout := <span style="color: #ff0000;">"TOP"</span>, l2007 := .F., oBar := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lRound := .T.<br /><br />   ::<span style="color: #000000;">l97Look</span>   = ! lBorder<br />   ::<span style="color: #000000;">nId</span>       = nId<br />   ::<span style="color: #000000;">oWnd</span>      = oBar<br />   ::<span style="color: #000000;">bAction</span>   = bAction<br />   ::<span style="color: #000000;">cMsg</span>      = cMsg<br />   ::<span style="color: #000000;">lPressed</span>  = .F.<br />   ::<span style="color: #000000;">lCaptured</span> = .F.<br />   ::<span style="color: #000000;">lWorking</span>  = .F.<br />   ::<span style="color: #000000;">lDrag</span>     = .F.<br />   ::<span style="color: #000000;">lAdjust</span>   = lAdjust<br />   ::<span style="color: #000000;">bWhen</span>     = bWhen<br />   ::<span style="color: #000000;">nClrPane</span>  = GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNFACE <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">lUpdate</span>   = lUpdate<br />   ::<span style="color: #000000;">cToolTip</span>  = cToolTip<br />   ::<span style="color: #000000;">cCaption</span>  = cPrompt<br />   ::<span style="color: #000000;">oFont</span>     = oFont<br />   ::<span style="color: #000000;">lBorder</span>   = lBorder<br />   ::<span style="color: #000000;">lBtnDown</span>  = .F.<br />   ::<span style="color: #000000;">nLayout</span>   = AScan<span style="color: #000000;">&#40;</span> aLayouts, cLayout <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nDlgCode</span>  = DLGC_WANTALLKEYS<br />   ::<span style="color: #000000;">lMOver</span>    = .F.<br /><br />   ::<span style="color: #000000;">aAlpha</span>    = <span style="color: #000000;">&#123;</span>.F.,.F.,.F.,.F.<span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//for all pisible bitmaps</span><br /><br />   ::<span style="color: #000000;">lTransparent</span> = lTransparent<br /><br />   ::<span style="color: #000000;">lBoxSelect</span> = .T.<br /><br />   ::<span style="color: #000000;">hAlphaLevel</span> = <span style="color: #000000;">255</span><br /><br />   ::<span style="color: #000000;">hBitmap1</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap2</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap3</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hBitmap4</span>  = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">lBarBtn</span>   = .F.<br />   ::<span style="color: #000000;">l2007</span>     = l2007<br />   ::<span style="color: #000000;">l2010</span>     = l2007<br />   ::<span style="color: #000000;">lRound</span>    = lRound<br /><br />   ::<span style="color: #000000;">nClrTextDis</span> = ::<span style="color: #000000;">nClrText</span><br /><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   oBar:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> bGradColors <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">bClrGrad</span> = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bClrGrad</span><br />   <span style="color: #00C800;">else</span>   <br />      ::<span style="color: #000000;">bClrGrad</span> = bGradColors<br />   <span style="color: #00C800;">endif</span><br />   <br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ! ::<span style="color: #000000;">lBarBtn</span> <span style="color: #000000;">&#41;</span> .and. l2007<br />      <span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, ;<br />         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">253</span>, <span style="color: #000000;">222</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">231</span>, <span style="color: #000000;">151</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />           <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>/<span style="color: #000000;">3</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>,  <span style="color: #000000;">84</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">233</span>, <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>  ;<br />         <span style="color: #000000;">&#125;</span>, ;<br />         <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">219</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">244</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">207</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">221</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />           <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>/<span style="color: #000000;">2</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">201</span><span style="color: #000000;">-50</span>, <span style="color: #000000;">217</span><span style="color: #000000;">-25</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>  ;<br />         <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   ::<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />                  cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bWhen</span> != <span style="color: #00C800;">NIL</span><br />      <span style="color: #00C800;">if</span> ! Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bWhen</span> <span style="color: #000000;">&#41;</span><br />         MsgBeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lProcessing</span> <span style="color: #B900B9;">// .and. ! ::lPressed</span><br />      ::<span style="color: #000000;">lProcessing</span> = .T.<br /><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bAction</span> != <span style="color: #00C800;">nil</span><br />         Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bAction</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br /><br />      ::<span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>         <span style="color: #B900B9;">// keep it here, the latest!</span><br />      ::<span style="color: #000000;">lProcessing</span> = .F.<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> GotFocus<span style="color: #000000;">&#40;</span> hCtlLost <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">local</span> nWidth, hPen, hDC, hOldBrush<br />   <span style="color: #00C800;">local</span> nAdj := <span style="color: #000000;">0</span><br /><br />   <span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">&#40;</span> GetWindowLong<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GWL_STYLE <span style="color: #000000;">&#41;</span>, WS_TABSTOP <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nWidth := ::<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > NO_FOCUSWIDTH<br />         <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lEllipse</span><br />            ::<span style="color: #000000;">DrawFocusEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            nAdj = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">l2007</span> .or. ::<span style="color: #000000;">l2010</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />            DrawFocusRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span> + nAdj, nWidth - <span style="color: #000000;">4</span> + nAdj <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</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;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">GotFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">local</span> uValue<br /><br />   ::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">&#41;</span><br /><br />   uValue = ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">cCaption</span> := GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> uValue<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> KeyChar<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">if</span> nKey == VK_RETURN .or. nKey == VK_SPACE<br />      ::<span style="color: #000000;">lPressed</span> = .T.<br />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">KeyChar</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> nAlphaLevel<span style="color: #000000;">&#40;</span> uNew <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">if</span> uNew != <span style="color: #00C800;">NIL</span><br />      ::<span style="color: #000000;">hAlphaLevel</span> := uNew<br />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bAlphaLevel</span> != <span style="color: #00C800;">NIL</span><br />         ::<span style="color: #000000;">hAlphaLevel</span> = eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bAlphaLevel</span>, <span style="color: #00C800;">Self</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;">return</span> ::<span style="color: #000000;">hAlphaLevel</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> LostFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">local</span> nWidth, nAdj<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l97Look</span> .and. ::<span style="color: #000000;">lBorder</span><br />      ReleaseCapture<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">lBorder</span> := .F.<br />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">&#40;</span> GetWindowLong<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GWL_STYLE <span style="color: #000000;">&#41;</span>, WS_TABSTOP <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nWidth := ::<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > NO_FOCUSWIDTH<br />         nAdj = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">l2007</span> .or. ::<span style="color: #000000;">l2010</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lEllipse</span><br />            DrawFocusRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span> + nAdj, nWidth - <span style="color: #000000;">4</span> + nAdj <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 />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">LostFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> cGenPRG<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">local</span> cPrg := <span style="color: #ff0000;">""</span><br /><br />   cPrg += CRLF + CRLF + <span style="color: #ff0000;">"   DEFINE BTNBMP OF oBar "</span> + ;<br />              <span style="color: #ff0000;">'ACTION MsgInfo( "Not defined yet" )'</span><br /><br /><span style="color: #00C800;">return</span> cPrg<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> LButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span> .or. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDragCursor</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">LButtonDown</span><span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   ::<span style="color: #000000;">lWorking</span> = .T.<br />   ::<span style="color: #000000;">lBtnUp</span>   = .F.<br /><br />   SetFocus<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// To let the main window child control</span><br />   SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>          <span style="color: #B900B9;">// process its valid</span><br /><br />   <span style="color: #00C800;">if</span> GetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == ::<span style="color: #000000;">hWnd</span><br />      ::<span style="color: #000000;">lCaptured</span> = .T.<br />      ::<span style="color: #000000;">lPressed</span>  = .T.<br />      ::<span style="color: #000000;">Capture</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// .F.</span><br />   <span style="color: #00C800;">endif</span><br /><br />   ::<span style="color: #000000;">lWorking</span> = .F.<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBtnUp</span><br />      ::<span style="color: #000000;">LButtonUp</span><span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">lBtnUp</span> = .F.<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:14qxtamz]
¿ Error en el codigo de btnbmp ?
Aqui la continuación del PRG: [code=fw:1v7f7j5l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> LButtonUp<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lClick := IsOverWnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, nRow, nCol <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span> .or. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDragCursor</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">LButtonUp</span><span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">bLButtonUp</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLButtonUp</span>, nRow, nCol<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lBtnUp</span> &nbsp;= .T.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lWorking</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lCaptured</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lCaptured</span> = .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReleaseCapture<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBtnDown</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lBtnDown</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> = .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lClick<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nCol >= ::<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">13</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span> != <span style="color: #00C800;">nil</span> .and. Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">Classname</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBAR"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd := ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd := ::<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">NcMouseMove</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// close the tooltip</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span> = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopup</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopUp</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oPopUp</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::oPopup:Activate( ::nTop + ::nHeight(), ::nLeft, oWnd, .F. )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span>:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span> + ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, oWnd, .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopUp</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">oPopUp</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">FreeBitmaps</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopUp</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'O'</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPopup</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawEllipse<span style="color: #000000;">&#40;</span> hDC, nRGBColor, n <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hOldBrush := SelectObject<span style="color: #000000;">&#40;</span> hDC, GetStockObject<span style="color: #000000;">&#40;</span> NULL_BRUSH <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hPen := CreatePen<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">1</span>, nRGBColor <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> n := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;Ellipse<span style="color: #000000;">&#40;</span> hDC, n, n, ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">1</span> - n, ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">1</span> - n, hPen <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hOldBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hPen <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawFocusEllipse<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPoints := <span style="color: #000000;">1.83</span> * SQRT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;DrawFocusEllipse<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, hDC, <span style="color: #000000;">10</span>, nPoints <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetFile<span style="color: #000000;">&#40;</span> cBmpUpFile, cBmpDownFile <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">FreeBitmaps</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, cBmpUpFile, cBmpDownFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> FreeBitmaps<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBitmap1</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; PalBmpFree<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap1</span>, ::<span style="color: #000000;">hPalette1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBitmap2</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; PalBmpFree<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span>, ::<span style="color: #000000;">hPalette2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBitmap3</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; PalBmpFree<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span>, ::<span style="color: #000000;">hPalette3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">hBitmap4</span> != <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; PalBmpFree<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hPalette4</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hBitmap1</span> &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hBitmap2</span> &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hBitmap3</span> &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hBitmap4</span> &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;afill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aAlpha</span>, .F. <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> LoadBitmaps<span style="color: #000000;">&#40;</span> cResName1, cResName2, cBmpFile1, cBmpFile2,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cResName3, cBmpFile3, cResName4, cBmpFile4 <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aBmpPal<br /><br />&nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> &nbsp;FindResource<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cResName1 , <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;!= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap1</span> &nbsp;= &nbsp;FILoadFromMemory<span style="color: #000000;">&#40;</span> cResToStr<span style="color: #000000;">&#40;</span> cResName1, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cResName1</span> = cResName1<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cBmpFile1</span> = cResName1<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;::<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 />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> &nbsp;FindResource<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cResName2 , <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;!= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap2</span> &nbsp;= &nbsp;FILoadFromMemory<span style="color: #000000;">&#40;</span> cResToStr<span style="color: #000000;">&#40;</span> cResName2, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cResName2</span> = cResName2<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap2</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile2</span> = cResName2<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName3 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> &nbsp;FindResource<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cResName3 , <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;!= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap3</span> &nbsp;= &nbsp;FILoadFromMemory<span style="color: #000000;">&#40;</span> cResToStr<span style="color: #000000;">&#40;</span> cResName3, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cResName3</span> = cResName3<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName3 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap3</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile3</span> = cResName3<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cResName4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> &nbsp;FindResource<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cResName4 , <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;!= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap4</span> &nbsp;= &nbsp;FILoadFromMemory<span style="color: #000000;">&#40;</span> cResToStr<span style="color: #000000;">&#40;</span> cResName4, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cResName4</span> = cResName4<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBmpPal = PalBmpLoad<span style="color: #000000;">&#40;</span> cResName4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap4</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile4</span> = cResName4<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> cBmpFile1, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette1</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap1</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile1</span> = cBmpFile1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile2</span> = cBmpFile2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> cBmpFile2, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap2</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette2</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap2</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile2</span> = cBmpFile2<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile3 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile3 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile3</span> = cBmpFile3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> cBmpFile3, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap3</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile3 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette3</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap3</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile3</span> = cBmpFile3<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cBmpFile4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> File<span style="color: #000000;">&#40;</span> cBmpFile4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile4</span> = cBmpFile4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> cBmpFile4, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"PNG"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap4</span> &nbsp;= FWOpenPngFile<span style="color: #000000;">&#40;</span> cBmpFile4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hPalette4</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aBmpPal &nbsp; &nbsp; = 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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hBitmap4</span> &nbsp;= aBmpPal<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cBmpFile4</span> = cBmpFile4<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; 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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; 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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; 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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; 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 />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> MouseMove<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lMOver</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">lMOver</span> = .T.<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span> .or. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDragCursor</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">MouseMove</span><span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">MouseMove</span><span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">l2007</span> .or. ::<span style="color: #000000;">l2010</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> IsOverWnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, nRow, nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !::<span style="color: #000000;">lCaptured</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l97Look</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Capture</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lBorder</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">lBorder</span> = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lCaptured</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l97Look</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ReleaseCapture<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBorder</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">lBorder</span> = .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lBorder</span> &nbsp;= &nbsp;! ::<span style="color: #000000;">l97Look</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> = .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">SetMsg</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cMsg</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;TrackMouseEvent<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, TME_LEAVE <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hOldFont, nRow, nCol, nWidth, nHeight<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hDC, hPen, hOldPen, hDarkPen, hLightPen, lDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aInfo := ::<span style="color: #000000;">DispBegin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBmpOld, nZeroZeroClr, nOldClr, oFont, hBmp, nClr<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nTop, nLeft, hOlFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nBmpHeight := <span style="color: #000000;">0</span>, nBmpWidth := <span style="color: #000000;">0</span>, nBmpTop := <span style="color: #000000;">0</span>, nBmpLeft := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nTxtTop := <span style="color: #000000;">0</span>, nTxtLeft := <span style="color: #000000;">6</span>, nTxtRight := ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">6</span>, nTxtHeight<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nFontHeight := <span style="color: #000000;">11</span>, nStyle := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lMultiLine &nbsp;:= .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hBlackBrush, hOldBrush<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAdjustBorder := <span style="color: #000000;">0</span>, nAdjust := <span style="color: #000000;">0</span>, nAlphaLevel<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nBtn := <span style="color: #000000;">1</span>, nLine:=<span style="color: #000000;">1</span>, nOffset := <span style="color: #000000;">0</span>, nMaxWidth := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cWord := <span style="color: #ff0000;">""</span>, cWord2 := <span style="color: #ff0000;">""</span>, nLayOut := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRect<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; nTxtRight -= <span style="color: #000000;">12</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBarBtn</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">lRound</span> = .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oFont</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oFont</span> == <span style="color: #00C800;">nil</span> .and. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;hBmp = <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> &nbsp;empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ! IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> .and. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap3</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nBtn = <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> &nbsp;empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ! IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> .and. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">3</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;lMultiLine = ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span> .and. CRLF $ ::<span style="color: #000000;">cCaption</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lMultiLine<br />&nbsp; &nbsp; &nbsp; cWord = cStrWord<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span>, nOffset, CRLF <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">while</span> nOffset < len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nMaxWidth = <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nMaxWidth, len<span style="color: #000000;">&#40;</span> cWord2 := cStrWord<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span>, @nOffset, CRLF <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span> cWord <span style="color: #000000;">&#41;</span> < nMaxWidth<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cWord = cWord2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; nLine = MLCount<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cWord = ::<span style="color: #000000;">cCaption</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> SetAlpha<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">aAlpha</span><span style="color: #000000;">&#91;</span> nBtn <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nAlphaLevel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lAdjust</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hBmp = ResizeBmp<span style="color: #000000;">&#40;</span> hBmp, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; nBmpWidth &nbsp; &nbsp; &nbsp;:= nBmpWidth<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nBmpHeight &nbsp; &nbsp; := nBmpHeight<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nBmpLeft &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> - nBmpWidth <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; nBmpTop &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> - nBmpHeight <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">nLayOut</span> := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">1</span> <span style="color: #B900B9;">// top</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpTop = ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">&#40;</span> nBmpHeight + nLine * ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">4</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">2</span> <span style="color: #B900B9;">// left</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpLeft = &nbsp;::<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">&#40;</span> nBmpWidth + ::<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span> cWord <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> + <span style="color: #000000;">4</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">3</span> <span style="color: #B900B9;">// bottom</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpTop = <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> nBmpHeight / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">&#40;</span> nLine * ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> + <span style="color: #000000;">4</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">4</span> <span style="color: #B900B9;">// right</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpLeft = <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> nBmpWidth / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span> cWord <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">otherwise</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;nLayOut = ::<span style="color: #000000;">nLayOut</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">nLayOut</span> := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">1</span> <span style="color: #B900B9;">// top</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtTop := nBmpTop + nBmpHeight + <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtTop := ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">&#40;</span> nLine * ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">2</span> <span style="color: #B900B9;">// left</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtTop := ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> * nLine <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lAdjust</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtLeft := <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtLeft := nBmpLeft + nBmpWidth + <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLayOut := <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtLeft := &nbsp;<span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">3</span> <span style="color: #B900B9;">// bottom</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtTop := nBmpTop - <span style="color: #000000;">&#40;</span> nLine * ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtTop := <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">4</span> <span style="color: #B900B9;">// right</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtTop := ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> * nLine <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lAdjust</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTxtRight := ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtRight := nBmpLeft - <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLayOut := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtRight := ::<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">otherwise</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nTxtTop = ::<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nGetChrHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> * nLine <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">l2007</span> .or. ::<span style="color: #000000;">l2010</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpTop++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpLeft++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAdjust := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lBarBtn</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hRgn</span> := CreateEllipticRgnIndirect<span style="color: #000000;">&#40;</span> GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SetWindowRgn<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">lRound</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">hRgn</span> := CreateRoundRectRgn<span style="color: #000000;">&#40;</span> GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SetWindowRgn<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hRgn</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; nAdjustBorder = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lBorder</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lBarBtn</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GradientFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">aGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBorder</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">141</span>, <span style="color: #000000;">178</span>, <span style="color: #000000;">227</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">237</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">248</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lFocused</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawFocusEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> ::<span style="color: #000000;">lRound</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RoundBox<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">nHeight</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">6</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">237</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">248</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RoundBox<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nHeight</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">6</span>, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">141</span>, <span style="color: #000000;">178</span>, <span style="color: #000000;">227</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">otherwise</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rectangle<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">aGrad</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GradientFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">1</span>, ::<span style="color: #000000;">aGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">aGrad</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GradientFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">aGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopUp</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLayOut</span> != <span style="color: #000000;">2</span> <span style="color: #B900B9;">// left</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBmpLeft -= <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;hBmpOld = SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nZeroZeroClr = GetPixel<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmpOld <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> SetAlpha<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">aAlpha</span><span style="color: #000000;">&#91;</span> nBtn <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ABPaint<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpLeft <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpTop <span style="color: #000000;">&#41;</span>, hBmp, ::<span style="color: #000000;">nAlphaLevel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nOldClr = SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TransBmp<span style="color: #000000;">&#40;</span> hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::<span style="color: #000000;">hDC</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpLeft <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpTop <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nWidth</span>, nBmpWidth <span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nHeight</span>, nBmpHeight <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nOldClr <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nStyle &nbsp; := nOr<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">0</span>, DT_CENTER,nLayOut<span style="color: #000000;">&#41;</span>, DT_WORDBREAK ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLayOut</span>%<span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, DT_VCENTER, DT_TOP <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nClr = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lDisColor</span>, CLR_HGRAY, ::<span style="color: #000000;">nClrTextDis</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SetTextColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> nClr <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> nClr, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, nClr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SetBkMode<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span> .or. ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hOldFont = SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lBarBtn</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; aRect &nbsp;:= <span style="color: #000000;">&#123;</span> nTxtTop + nAdjust, nTxtLeft + nAdjust, ::<span style="color: #000000;">nHeight</span> + nAdjust - <span style="color: #000000;">4</span>, nTxtRight + nAdjust <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; lMultiLine &nbsp; := <span style="color: #000000;">&#40;</span> nTxtHeight := DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nOr<span style="color: #000000;">&#40;</span> DT_WORDBREAK, DT_CALCRECT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nOr<span style="color: #000000;">&#40;</span> DT_SINGLELINE, DT_CALCRECT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStyle &nbsp; &nbsp; &nbsp; := nOr<span style="color: #000000;">&#40;</span> DT_CENTER, DT_WORDBREAK <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> &nbsp; := aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> - nTxtHeight<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> &nbsp; := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nStyle &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hOldFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. ::<span style="color: #000000;">lBoxSelect</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lRound</span> .and. ! ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WndBox2007<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nAdjustBorder, nAdjustBorder, ::<span style="color: #000000;">nHeight</span> - nAdjustBorder<span style="color: #000000;">-1</span>, ::<span style="color: #000000;">nWidth</span> - nAdjustBorder<span style="color: #000000;">-1</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> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</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>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RoundBox<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">3</span>, ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">3</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">6</span>, &nbsp;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> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nHeight = ::<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nWidth &nbsp;= ::<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hDC &nbsp; &nbsp; = ::<span style="color: #000000;">hDC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hBlackBrush = GetStockObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hOldBrush &nbsp; = SelectObject<span style="color: #000000;">&#40;</span> hDC, hBlackBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PolyPolygon<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">9</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">7</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">5</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">9</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBorder</span> .or. ::<span style="color: #000000;">lPressed</span> .or. ::<span style="color: #000000;">lMOver</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hDarkPen &nbsp;= CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNSHADOW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hLightPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNHIGHLIGHT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hOldPen = SelectObject<span style="color: #000000;">&#40;</span> hDC, hLightPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MoveTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">12</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LineTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">12</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> hDC, hDarkPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MoveTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">13</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LineTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">13</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hDarkPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hLightPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hBlackBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> .and. Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// BtnDisable( ::hWnd, ::hDC )</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">&#40;</span> GetWindowLong<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GWL_STYLE <span style="color: #000000;">&#41;</span>, WS_TABSTOP <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">lFocused</span> .and. ! ::<span style="color: #000000;">lBarBtn</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nWidth := ::<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > NO_FOCUSWIDTH<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lDlg = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DrawFocusEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DrawFocusRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">2</span>, nWidth - <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DrawFocusRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span>, ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span>, nWidth - <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DispEnd</span><span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp;nBmpTop++<br />&nbsp; &nbsp; &nbsp;nBmpLeft++<br />&nbsp; &nbsp; &nbsp;nAdjust = <span style="color: #000000;">1</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lTransparent</span> <span style="color: #B900B9;">// .and. ! Empty( ::oWnd:oBrush:hBitmap )</span><br />&nbsp; &nbsp; &nbsp;SetBrushOrgEx<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nBmpWidth<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nLeft</span>, nBmpHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;FillRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bClrGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; FillRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">aGrad</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GradientFill<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">aGrad</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WndRaised<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WndInset<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">IF</span> ! Empty<span style="color: #000000;">&#40;</span> hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> SetAlpha<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">aAlpha</span><span style="color: #000000;">&#91;</span> nBtn <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ABPaint<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpLeft <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpTop <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp, ::<span style="color: #000000;">nAlphaLevel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;elseif IsAppThemed<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .or. ! ::<span style="color: #000000;">lTransparent</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lTransparent</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bClrGrad</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// DrawTransparent( ::hDC, hBmp, nBmpTop, ::nWidth / 4 - nBmpWidth / 2 + nAdjust )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawTransparent<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmp, nBmpTop, nBmpLeft + nAdjust <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PalBtnPaint<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hPalette4</span>, ::<span style="color: #000000;">hPalette1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span> .and. empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap1</span>,::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span> .and. empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hPalette1</span>,::<span style="color: #000000;">hPalette2</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap3</span>, ::<span style="color: #000000;">hPalette3</span>, ::<span style="color: #000000;">lPressed</span>, ::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">lBorder</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nClrPane</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> == <span style="color: #ff0000;">"..."</span>, ::<span style="color: #000000;">cCaption</span>,<span style="color: #000000;">&#41;</span> , ::<span style="color: #000000;">nLayout</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hDC</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"TBAR"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hBmpOld = SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nZeroZeroClr = GetPixel<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmpOld <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nOldClr = SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TransBmp<span style="color: #000000;">&#40;</span> hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::<span style="color: #000000;">hDC</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpLeft + nAdjust <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpTop + nAdjust <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nWidth</span>, nBmpWidth <span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nHeight</span>, nBmpHeight <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nOldClr <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hBmpOld = SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nZeroZeroClr = GetPixel<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hBmpOld <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nOldClr = SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; TransBmp<span style="color: #000000;">&#40;</span> hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::<span style="color: #000000;">hDC</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpLeft + nAdjust <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, nAdjust, nBmpTop + nAdjust <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nWidth</span>, nBmpWidth <span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">nHeight</span>, nBmpHeight <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SetBkColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nOldClr <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PalBtnPaint<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap4</span>, ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lMOver</span> .and. !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap4</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hPalette4</span>, ::<span style="color: #000000;">hPalette1</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span> .and. empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hBitmap1</span>,::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lAdjust</span> .and. empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap2</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hPalette1</span>,::<span style="color: #000000;">hPalette2</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">hBitmap3</span>, ::<span style="color: #000000;">hPalette3</span>, ::<span style="color: #000000;">lPressed</span>, ::<span style="color: #000000;">lAdjust</span>, ::<span style="color: #000000;">lBorder</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nClrPane</span>, <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> == <span style="color: #ff0000;">"..."</span>, ::<span style="color: #000000;">cCaption</span>,<span style="color: #000000;">&#41;</span> , ::<span style="color: #000000;">nLayout</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nClrText</span>, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">hDC</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TBAR"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">cCaption</span> != <span style="color: #ff0000;">"..."</span><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; nStyle &nbsp; := nOr( if( ::nLayOut == 0, DT_CENTER,nLayOut), DT_WORDBREAK ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; if ( ::nLayOut%2 == 0, DT_VCENTER, DT_TOP ) )<br />&nbsp; &nbsp; &nbsp; &nbsp; nClr = If( IsWindowEnabled( ::hWnd ), ::nClrText, if( ::lDisColor, CLR_HGRAY, ::nClrTextDis ) )<br />&nbsp; &nbsp; &nbsp; &nbsp; SetTextColor( ::hDC, If( ValType( nClr ) == "B", Eval( nClr, ::lMOver ), nClr ) )<br />&nbsp; &nbsp; &nbsp; &nbsp; SetBkMode( ::hDC, 1 )<br />&nbsp; &nbsp; &nbsp; &nbsp; hOldFont = SelectObject( ::hDC, If( ::lBarBtn, ::oWnd:oFont:hFont, ::oFont:hFont ) )<br />&nbsp; &nbsp; &nbsp; &nbsp; DrawText( ::hDC, ::cCaption,{nTxtTop+nAdjust, nTxtLeft+nAdjust, ::nHeight+nAdjust-4, nTxtRight+nAdjust},nStyle &nbsp;)<br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject( ::hDC, hOldFont )<br />&nbsp; &nbsp; &nbsp; &nbsp; DeleteObject( hOldFont )<br />*/</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; nStyle &nbsp; := nOr<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">0</span>, DT_CENTER,nLayOut<span style="color: #000000;">&#41;</span>, DT_WORDBREAK ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLayOut</span>%<span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, DT_VCENTER, DT_TOP <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nClr = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrText</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lDisColor</span>, CLR_HGRAY, ::<span style="color: #000000;">nClrTextDis</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SetTextColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> nClr <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> nClr, ::<span style="color: #000000;">lMOver</span> <span style="color: #000000;">&#41;</span>, nClr <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SetBkMode<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hOldFont = SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// If( ::lBarBtn, ::oWnd:oWnd:oFont:hFont, ::oFont:hFont ) )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aRect &nbsp;:= <span style="color: #000000;">&#123;</span> nTxtTop + nAdjust, nTxtLeft + nAdjust, ::<span style="color: #000000;">nHeight</span> + nAdjust - <span style="color: #000000;">4</span>, nTxtRight + nAdjust <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; lMultiLine &nbsp; := <span style="color: #000000;">&#40;</span> nTxtHeight := DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nOr<span style="color: #000000;">&#40;</span> DT_WORDBREAK, DT_CALCRECT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nOr<span style="color: #000000;">&#40;</span> DT_SINGLELINE, DT_CALCRECT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStyle &nbsp; &nbsp; &nbsp; := nOr<span style="color: #000000;">&#40;</span> DT_CENTER, DT_WORDBREAK <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> &nbsp; := aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> - nTxtHeight<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nLayOut</span> == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> &nbsp; := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DrawText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cCaption</span>, aRect, nStyle &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hOldFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp;nHeight = ::<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp; &nbsp;nWidth &nbsp;= ::<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp;hDC &nbsp; &nbsp; = ::<span style="color: #000000;">hDC</span><br />&nbsp; &nbsp; &nbsp;hBlackBrush = GetStockObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;hOldBrush = SelectObject<span style="color: #000000;">&#40;</span> hDC, hBlackBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;PolyPolygon<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">9</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">7</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">5</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> nWidth - <span style="color: #000000;">9</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight / <span style="color: #000000;">2</span> - <span style="color: #000000;">1</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBorder</span> .or. ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hDarkPen &nbsp;= CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNSHADOW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hLightPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNHIGHLIGHT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hOldPen = SelectObject<span style="color: #000000;">&#40;</span> hDC, hLightPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">12</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">12</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> hDC, hDarkPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MoveTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">13</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; LineTo<span style="color: #000000;">&#40;</span> hDC, nWidth - <span style="color: #000000;">13</span> + <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPressed</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nHeight - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hDarkPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DeleteObject<span style="color: #000000;">&#40;</span> hLightPen <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;DeleteObject<span style="color: #000000;">&#40;</span> hBlackBrush <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ! IsWindowEnabled<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> .and. Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;BtnDisable<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> lAnd<span style="color: #000000;">&#40;</span> GetWindowLong<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GWL_STYLE <span style="color: #000000;">&#41;</span>, WS_TABSTOP <span style="color: #000000;">&#41;</span> .and. ::<span style="color: #000000;">lFocused</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> nWidth := ::<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > NO_FOCUSWIDTH<br />&nbsp; &nbsp; &nbsp; &nbsp; lDlg = ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">IsKindOf</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TDIALOG"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lEllipse</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawFocusEllipse</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DrawFocusRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span>, nWidth - <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">DispEnd</span><span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> KeyDown<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == VK_UP .or. nKey == VK_LEFT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoPrevCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == VK_DOWN .or. nKey == VK_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">GoNextCtrl</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMsg == WM_MOUSELEAVE<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> ::<span style="color: #000000;">MouseLeave</span><span style="color: #000000;">&#40;</span> nHiWord<span style="color: #000000;">&#40;</span> nLParam <span style="color: #000000;">&#41;</span>, nLoWord<span style="color: #000000;">&#40;</span> nLParam <span style="color: #000000;">&#41;</span>, nWParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMsg == WM_SYSCHAR<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> ::<span style="color: #000000;">SysChar</span><span style="color: #000000;">&#40;</span> nWParam, nLParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMsg == WM_KEYUP<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lPressed</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lMOver</span> = .F.<br />&nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> ShowPopup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oPopup</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span> != <span style="color: #00C800;">nil</span> .and. Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">Classname</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBAR"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd := ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd := ::<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> GetClassName<span style="color: #000000;">&#40;</span> GetParent<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"TBAR"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd = oWndFromhWnd<span style="color: #000000;">&#40;</span> GetParent<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">NcMouseMove</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// close the tooltip</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span> = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopup</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopUp</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oPopUp</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;::oPopup:Activate( ::nTop + ::nHeight(), ::nLeft, oWnd, .F. )</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span>:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span> + ::<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, oWnd, .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oPopUp</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">oPopUp</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">oPopup</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetColor<span style="color: #000000;">&#40;</span> nClrText, nClrPane <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TBtnBmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nOldClrText := ::<span style="color: #000000;">nClrText</span><br /><br />&nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nClrText, nClrPane <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> nOldClrText <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nClrText</span> = nOldClrText<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> CheckArray<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nI<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRet := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span> .and. ;<br />&nbsp; &nbsp; &nbsp; Len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span> .and. ;<br />&nbsp; &nbsp; &nbsp; ValType<span style="color: #000000;">&#40;</span> aArray<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'A'</span><br />&nbsp; &nbsp; &nbsp; aArray &nbsp; := aArray<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> nI = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nI > len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> aRet, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> aRet, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> empty<span style="color: #000000;">&#40;</span> aArray<span style="color: #000000;">&#91;</span> nI <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span>, aArray<span style="color: #000000;">&#91;</span> nI <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> aRet<br />&nbsp;</div>[/code:1v7f7j5l]
¿ Existe una función que indique si una tabla esta abierta ?
Por ejemplo : USE Clientes /* Clientes está abierta +/ var:=TablaAbierta("Clientes") var -> .T. o O o cualquier respuesta Saludos y gracias por la ayuda.
¿ Existe una función que indique si una tabla esta abierta ?
Puedes usar: USE Clientes ? Used() ? Alias()
¿ Existe una función que indique si una tabla esta abierta ?
Hola Waldemar, tienes algun email Saludos
¿ Existe una función que indique si una tabla esta abierta ?
Estimado Antonio Muchas gracias por la respuesta, pero me refiero cuando hay muchas tablas abiertas y quiero saber si una en particular esta abierta. Saludos
¿ Existe una función que indique si una tabla esta abierta ?
jbrita Si, mi correo es <!-- e --><a href="mailto:easycomp613@gmail.com">easycomp613@gmail.com</a><!-- e --> Saludos
¿ Existe una función que indique si una tabla esta abierta ?
Mira... [code=fw:1vwqhg4a]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> .NOT. FUSE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"80"</span>,<span style="color: #ff0000;">"CADPARAM"</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// CADPARAM.DBF</span><br /><br />&nbsp; &nbsp; &nbsp; MsgStop<span style="color: #000000;">&#40;</span> OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ATEN€ÇO: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MANUTEN€ÇO DO PLENO:"</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SISTEMA EM MANUTEN€ÇO... &nbsp; PAR¶METROS."</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ENQUANTO NÇO SAIREM DA MANUTEN€ÇO, &nbsp; &nbsp;"</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NENHUM USUµRIO PODERµ ENTRAR NO PLENO."</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PE€A PARA SAIREM DA MANUTEN€ÇO->PLENO."</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PAR¶METROS DO PLENO BLOQUEADO. &nbsp;OOOPS!"</span> <span style="color: #000000;">&#41;</span> +CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TECLE <ENTER> PARA SAIR DO PROGRAMA. &nbsp;"</span> <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SISTEMA EM MANUTEN€ÇO - PAR¶METROS. &nbsp; "</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; LIBERA_TUDO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">FUNCTION</span> FUSE<span style="color: #000000;">&#40;</span> W_SEL, W_ARQ, C_ALIAS <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> W_TEM<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> C_ALIAS=<span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> SUBS<span style="color: #000000;">&#40;</span>W_ARQ,<span style="color: #000000;">1</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>=<span style="color: #ff0000;">"AAUX"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c_Alias:= <span style="color: #ff0000;">"AAUX"</span>+W_SEL<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> RAT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\"</span>,W_ARQ)>0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_Alias:= SUBS(W_ARQ,RAT("</span>\<span style="color: #ff0000;">",W_ARQ)+1,LEN(W_ARQ)-(RAT("</span>\<span style="color: #ff0000;">",W_ARQ)+IF(AT("</span>.<span style="color: #ff0000;">",W_ARQ)>0,4,0)))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c_Alias:= SUBS(W_ARQ,1,LEN(W_ARQ)-IF(RAT("</span>.<span style="color: #ff0000;">",W_ARQ)>0,4,0))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ENDIF<br />&nbsp; &nbsp; &nbsp; ENDIF<br /><br />&nbsp; &nbsp;ENDIF<br /><br />&nbsp; &nbsp;IF WFILIAL<br />&nbsp; &nbsp; &nbsp; WTARQ="</span>CADCLIEN;CADTRANS;CADVENDE;CADREGIO;CADPRODU;CADCLAES;CADIPIES;<span style="color: #ff0000;">" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span>CADTRIES;CADCOMPO;CADFORPR;CADFORNE;CADOBRIG;CADTPFOR;CADOBSER;<span style="color: #ff0000;">" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span>CADTPSER;CADCUSTO;CADCONDI;CADHISBA;CADTPCLI;CADETIQU;CADFICHA;<span style="color: #ff0000;">" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span>CADEMPGD;CADASTCO;CADEXMED;CADREAJU;CADATCON;CADSINDI;CADPENDE;<span style="color: #ff0000;">" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span>CADEXAUD;CADEXPER;CADEXUNI;CADENDER;CADPROFI;CADAVULS;CADMEDIC;<span style="color: #ff0000;">" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span>CADJUSTI;CADSENHA;CADBANCO;CADMOVBA;CADCCVEN;CADDESCO;<span style="color: #ff0000;">" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// CADMOEDA;"</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span>W_ARQ,WTARQ<span style="color: #000000;">&#41;</span>#<span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;W_ARQ=<span style="color: #ff0000;">"..<span style="color: #000000;">\"</span>+W_ARQ<br />&nbsp; &nbsp; &nbsp; ENDIF<br /><br />&nbsp; &nbsp;ENDIF<br /><br />&nbsp; &nbsp;SELE &W_SEL<br /><br />&nbsp; &nbsp;USE(W_ARQ) SHARED ALIAS(c_Alias) VIA "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;IF.NOT.NETERR()<br />&nbsp; &nbsp; &nbsp; RETURN( .T. )<br />&nbsp; &nbsp;ENDIF<br /><br />&nbsp; &nbsp;W_TEM=0<br /><br />&nbsp; &nbsp;WHILE W_TEM <= 3<br /><br />&nbsp; &nbsp; &nbsp; SYSREFRESH()<br /><br />&nbsp; &nbsp; &nbsp; USE(W_ARQ) SHARED ALIAS(c_Alias) VIA "</span>DBFCDX<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp; &nbsp; IF.NOT.NETERR()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RETURN( .T. )<br />&nbsp; &nbsp; &nbsp; ENDIF<br /><br />&nbsp; &nbsp; &nbsp; W_TEM := W_TEM + 1<br /><br />&nbsp; &nbsp; &nbsp; SysWait( .5 )<br /><br />&nbsp; &nbsp;ENDDO<br /><br />RETURN( .F. )<br /></span></div>[/code:1vwqhg4a] Regard, saludos.
¿ Existe una función que indique si una tabla esta abierta ?
Karinha Muchas gracias por tu aporte, pero estoy buscando una función (de FW) que me muestre si una tabla esta abierta. Regards, saludos.
¿ Existe una función que indique si una tabla esta abierta ?
[code=fw:3f4gq4dv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"tabla"</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// si tabla es el alias</span><br />? Used<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3f4gq4dv]
¿ Existe una función que indique si una tabla esta abierta ?
cnavarro Estimado era exactamente lo que necesitaba muchas gracias y bendiciones. Regards, Saludos
¿ Existe una función que indique si una tabla esta abierta ?
Bones, Si usas alias esto te puede servir... [code=php:3uishf4h]<div class="php" id="{CB}" style="font-family: monospace;"><span style="color: #808080; font-style: italic;">#include 'fivewin.ch'</span><br /><br /><span style="color: #808080; font-style: italic;">#xcommand TRY  => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }</span><br /><span style="color: #808080; font-style: italic;">#xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr-></span><br /><span style="color: #808080; font-style: italic;">#xcommand FINALLY => ALWAYS </span><br /><br /><span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br /><br />    local cError := <span style="color: #ff0000;">''</span><br /><br />    USE states SHARED ALIAS <span style="color: #ff0000;">'ALIAS12345'</span><br />    <br />    <a href="http://www.php.net/if"><span style="color: #b1b100;">if</span></a> IsOpen<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'states.dbf'</span>, @cError <span style="color: #66cc66;">&#41;</span><br />        ? cError<br />    <a href="http://www.php.net/else"><span style="color: #b1b100;">else</span></a><br />        ? <span style="color: #ff0000;">'Table no opened'</span><br />    <a href="http://www.php.net/endif"><span style="color: #b1b100;">endif</span></a>   <br /><br /><a href="http://www.php.net/return"><span style="color: #b1b100;">return</span></a> nil <br /><br /><span style="color: #000000; font-weight: bold;">function</span> IsOpen<span style="color: #66cc66;">&#40;</span> cFile, cError <span style="color: #66cc66;">&#41;</span><br /><br />    local lOpen := .f.<br />    local o<br />    <br />    cError := <span style="color: #ff0000;">''</span><br />    <br />    TRY <br />        USE <span style="color: #66cc66;">&#40;</span>cFile<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">NEW</span><br />        <span style="color: #66cc66;">&#40;</span> Alias<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>-><span style="color: #006600;"><span style="color: #66cc66;">&#40;</span></span> dbclosearea<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>      <br />    CATCH o <br />        cError := o:description<br />        lOpen := .t.<br />    <a href="http://www.php.net/end"><span style="color: #000066;">END</span></a> <br /><br /><a href="http://www.php.net/return"><span style="color: #b1b100;">return</span></a> lOpen</div>[/code:3uishf4h] Feliz verano a todos ! C.
¿ Existe una función que indique si una tabla esta abierta ?
Carles Buenisimo ejemplo para manejar los errores de apertura de una tabla, muchas gracias y bendiciones. Regards, Saludos.
¿ Función UPPER ?
Me podeis indicar, que función usar para pasar a mayúsculas?. O facilitarme, donde localizar el fuente, o el .OBJ, de la misma. Las funciones del API: DLL32 Function UpperCase(cStr AS STRING) AS STRING PASCAL; FROM "CharUpperA" LIB "user32.dll" DLL32 Function LowerCase(cStr AS STRING) AS STRING PASCAL; FROM "CharLowerA" LIB "user32.dll" Podrían valer, pero el cliente tiene Win 98. Y USER32.DLL, no creo que venga, ni que valga para dicho Windows. La función UPPER de CLIPPER 5.2e, funciona incorrectamente, me di cuenta cuando al hacer OemToAnsi( cTexto ). Y grabarlo en la Base de Datos. Al presentarlo en pantalla. La [u:3vatvp2s]á[/u:3vatvp2s], no es una [u:3vatvp2s]Á[/u:3vatvp2s], y así con todas las vocales. Saludos, José Mª
¿ Función UPPER ?
José Mª, user32.dll debe estar disponible en Win98 también.
¿ Función UPPER ?
Aca hay informacion acerca de la funcion del API <!-- m --><a class="postlink" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/charupper.asp">http://msdn.microsoft.com/library/defau ... rupper.asp</a><!-- m --> Salu2
¿ Función UPPER ?
Gracias por las respuestas, y por la dirección del API. Saludos, José Mª
¿ HB_SetCodePage() ?
Hola a todos, Hasta ahora estaba trabajando con la versión FWH 9.03 y ahora quiero usar la FWH 10.9 En el programa tengo las siguientes líneas para establecer el lenguaje para la aplicación y ordenación de datos: REQUEST HB_Lang_ES REQUEST HB_CODEPAGE_ESWIN HB_LangSelect("ES") HB_SetCodePage("ESWIN") No se si ahora són necesarios pero tengo el problema que la función HB_SetCodePage() no es aceptada al lincar. Esta función ha sido substituida por alguna otra? Ya no debe usarse? No estoy encontrando referencias sobre esta función que me ayuden para poder compilar y lincar la aplicación. Me pueden ayudar? Gracias
¿ HB_SetCodePage() ?
Alguna noticia al respecto? Gracias.
¿ HB_SetCodePage() ?
fivewidi Usa HB_CDPSELECT( cVal )
¿ HB_SetCodePage() ?
[quote="Daniel Garcia-Gil":2fvs1sps]fivewidi Usa HB_CDPSELECT( cVal )[/quote:2fvs1sps] Gracias, esta tarde lo pruebo.
¿ Hay una versión más reciente de la clase TExcelScript ?
Estimados compañeros Estoy buscando esta clase porque me dieron un ejemplo para conocer el rango de un archivo excel busque mucho y encontré una descarga pero marca muchos errores y ademas me dice que algunos métodos no existen. ¿hay una más actualizada o más estable? Desde ya muchas gracias, Waldemar
¿ La variable de REDEFINE GET cambia su tamaño ?
Estimados ¿ Cambiaron los GETS ? cNombre:=Space(40) REDEFINE GET cNombre ID 102 OF oDlg Pero cuando se abre la ventana solo me deja ingresar 23 caracteres, ¿Por qué no reconoce los 40? Claro que si coloco: REDEFINE GET cNombre ID 102 OF oDlg PICTURE replicate("!",40), aquí lo hace, pero ¿puede reconocer los 40 espacios sin colocar el picture? Desde ya muchas gracias por la ayuda Waldemar
¿ La variable de REDEFINE GET cambia su tamaño ?
Waldemar, Aumenta el ancho del GET en el fichero de recursos ó añádele el estilo ES_AUTOSCROLL
¿ La variable de REDEFINE GET cambia su tamaño ?
Estimado Antonio No me hice entender bien (debe ser el oxido) a la variable del REDEFINE GET le doy el tamaño con Space y no me acepta la misma cantidad de caracteres. Me pasa tambien con los GET numéricos. Egemplo cVar:=Space(20) REDEFINE GET cVar ID 102 OF oDlg Cuando abro esta ventana de dialogo y trato de ingresar los 20 caracteres en este GET solo me permite 13 y en todos los GET pasa lo mismo (Ya revise SP_SCROLL y el tamaño del control. Atentamente, Waldemar
¿ La variable de REDEFINE GET cambia su tamaño ?
Copia aqui tu fichero RC y el PRG, gracias
¿ La variable de REDEFINE GET cambia su tamaño ?
Buen dia Waldemar trata de cambiar esto cNombre:=Space(40) REDEFINE GET cNombre ID 102 OF oDlg coloca esto REDEFINE GET nombre var cNombre ID 102 OF oDlg Saludos Pedro
¿ La variable de REDEFINE GET cambia su tamaño ?
Estimado Hector Ya hice lo que me mostraste. Estimado Antonio ocupo Pelles, trate de subir un pantallaso pero no se como hacerlo, aquí el código: if nIngReg=1 .or. lPasar aIng:=array(2) aIng:={1,Space(30)} lPasar:=.F. endif if ContarReg(BEN)>0 nInd:=Benefi->(Indexord()) Benefi->(dbSetorder(1)) Benefi->(dbGoBottom()) aIng[1]:=Benefi->(Fieldget(2))+1 Benefi->(dbSetorder(nInd)) endif DEFINE DIALOG oDlg RESOURCE "INGBEN" FONT oLetra REDEFINE GET aIng[1] ID 101 OF oDlg READONLY//; // WHEN (oG1:Setfocus(),.T.) REDEFINE GET oG1 VAR aIng[2] ID 102 OF oDlg REDEFINE BUTTON ID 103 OF oDlg; ACTION (lGrabar:=.T.,oDlg:end()) REDEFINE BUTTON ID 104 OF oDlg; ACTION (lOtro:=.T.,lGrabar:=.T.,oDlg:end()) REDEFINE BUTTON ID 105 OF oDlg; ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED//; //ON INIT (oG1:Setfocus()) Saludos Waldemar
¿ La variable de REDEFINE GET cambia su tamaño ?
Waldemar, El contenido de RESOURCE "INGBEN" es que quisiera ver, gracias
¿ La variable de REDEFINE GET cambia su tamaño ?
[quote="Antonio Linares":3t78cp89]Waldemar, El contenido de RESOURCE "INGBEN" es que quisiera ver, gracias[/quote:3t78cp89] Disculpa Antonio no sabía pasar de res a rc paro ahora sí, aquí esta el código: INGBEN DIALOG DISCARDABLE 74, 71, 302, 65 STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU CAPTION "Ingresar Beneficio" FONT 8, "MS Sans Serif" { CONTROL "", -1, "Button", BS_GROUPBOX, 7, 5, 217, 52 CONTROL "Código", -1, "Static", WS_GROUP, 14, 21, 30, 8 CONTROL "Beneficio", -1, "Static", WS_GROUP, 14, 39, 30, 8 CONTROL "", 101, "Edit", ES_READONLY|WS_BORDER|WS_DISABLED, 48, 19, 45, 12 CONTROL "", 102, "Edit", WS_BORDER|WS_TABSTOP, 48, 36, 170, 12 CONTROL "&Grabar y Salir", 103, "Button", WS_TABSTOP, 236, 8, 54, 14 CONTROL "&Ingresar Otro", 104, "Button", WS_TABSTOP, 236, 24, 54, 14 CONTROL "&Cancelar", 105, "Button", WS_TABSTOP, 236, 40, 54, 14 CONTROL "Button", 200, "BorBtn", WS_TABSTOP|0x00008000, 98, 16, 15, 16 } Saludos Waldemar
¿ La variable de REDEFINE GET cambia su tamaño ?
Estimados Tengo el mismo problema, alguien que pueda detallar una solución. Saludos Fernando Espinoza A.
¿ La variable de REDEFINE GET cambia su tamaño ?
[code=fw:33qjtb0a]<div class="fw" id="{CB}" style="font-family: monospace;"><br />INGBEN <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">74</span>, <span style="color: #000000;">71</span>, <span style="color: #000000;">302</span>, <span style="color: #000000;">65</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Ingresar Beneficio"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Button"</span>, BS_GROUPBOX, <span style="color: #000000;">7</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">217</span>, <span style="color: #000000;">52</span><br />CONTROL <span style="color: #ff0000;">"Código"</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">14</span>, <span style="color: #000000;">21</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />CONTROL <span style="color: #ff0000;">"Beneficio"</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">14</span>, <span style="color: #000000;">39</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_READONLY|WS_BORDER|WS_DISABLED, <span style="color: #000000;">48</span>, <span style="color: #000000;">19</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">12</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Edit"</span>, ES_MULTILINE|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">170</span>, <span style="color: #000000;">12</span>       <-- aqui la modificación<br />CONTROL <span style="color: #ff0000;">"&Grabar y Salir"</span>, <span style="color: #000000;">103</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">236</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">54</span>, <span style="color: #000000;">14</span><br />CONTROL <span style="color: #ff0000;">"&Ingresar Otro"</span>, <span style="color: #000000;">104</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">236</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">54</span>, <span style="color: #000000;">14</span><br />CONTROL <span style="color: #ff0000;">"&Cancelar"</span>, <span style="color: #000000;">105</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">236</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">54</span>, <span style="color: #000000;">14</span><br />CONTROL <span style="color: #ff0000;">"Button"</span>, <span style="color: #000000;">200</span>, <span style="color: #ff0000;">"BorBtn"</span>, WS_TABSTOP|0x00008000, <span style="color: #000000;">98</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">16</span><br /><span style="color: #000000;">&#125;</span><br /><br /> </div>[/code:33qjtb0a]
¿ No funciona cToolTip con :Disable() ?
Hola a todos amigos de FiveWin Tengo la necesidad de mostrar TOOLTIP de un objeto GET deshabilitado, pero no funciona. oGetNombre:cToolTip:='prueba' funciona bien pero si lo acompaño de un disable(), no se muestra oGetNombre:cToolTip:='prueba' oGetNombre:Disable() NO funciona. ¿Alguna idea del por que sucede esto? Uso FW17.01 + xHarbour + BCC7 Gracias por la ayuda.
¿ No funciona cToolTip con :Disable() ?
Mira se ayuda. La idea és la misma: [url:1f05e8sv]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=40455&sid=ec9d67293fee8295e761744d4d4382b3[/url:1f05e8sv] Saludos.
¿ No funciona cToolTip con :Disable() ?
Hola buenas tardes? Alguien pudo solucionar esto?, que aparezca el tooltip aun con el get deshabilitado, desde recursos? Intente lo que mencionaron en ese post, pero no funciona. De antemano gracias.
¿ No funciona cToolTip con :Disable() ?
[quote="leandro":g3iswmyr]Hola buenas tardes? Alguien pudo solucionar esto?, que aparezca el tooltip aun con el get deshabilitado, desde recursos? Intente lo que mencionaron en ese post, pero no funciona. De antemano gracias.[/quote:g3iswmyr] Yo en vez de deshabilitar lo que hago es: oGet:lReadOnly := .T. oGet:lUpdate := .T. y el Tooltip funciona y no permite modificar el oGet.
¿ No funciona cToolTip con :Disable() ?
FiveWidi, Esto no Funciona con Recursos Usando Folderex: [code=fw:18gobh64]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cEmailPaisa <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@KR"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">44</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 />      <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> COLORS CLR_BLACK, CLR_WHITE <span style="color: #0000ff;">FONT</span> oFont<br /><br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lReadOnly</span> := .T.<br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lUpdate</span>   := .T.<br /><br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Email do Paisagista"</span><br /> </div>[/code:18gobh64] Regards, saludos.
¿ No funciona cToolTip con :Disable() ?
[quote="karinha":qf3ajcow]FiveWidi, Esto no Funciona con Recursos Usando Folderex: [code=fw:qf3ajcow]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cEmailPaisa <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@KR"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">44</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 />      <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span> COLORS CLR_BLACK, CLR_WHITE <span style="color: #0000ff;">FONT</span> oFont<br /><br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lReadOnly</span> := .T.<br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lUpdate</span>   := .T.<br /><br />   aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Email do Paisagista"</span><br /> </div>[/code:qf3ajcow] Regards, saludos.[/quote:qf3ajcow] Hola, Prueba:    REDEFINE GET aGet[25] VAR cEmailPaisa PICTURE "@KR" ID 44 OF oFld:aDialogs[ 1 ] ;       /* WHEN( .F. ) */ UPDATE COLORS CLR_BLACK, CLR_WHITE FONT oFont
¿ No funciona cToolTip con :Disable() ?
Asi, no funciona. Se vuelve editable. Gracias. Regards, saludos.
¿ No funciona cToolTip con :Disable() ?
Asi parece funcionar. Es esto lo que se busca ? o me perdí ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:2we7m7ao]<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 />Dlg_Grad<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />procedure Dlg_Grad<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oSay, oBrush, lTest := .T., oCbx<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oGet, cName := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush gradient <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>, &nbsp;<span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush transparent<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> &nbsp;transparent <span style="color: #0000ff;">adjust</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">25.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Change Text"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oSay:<span style="color: #000000;">lWantClick</span> := .T., oSay:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"this is a test"</span>, oSay:<span style="color: #000000;">ShowToolTip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">release</span> <span style="color: #0000ff;">brush</span> oBrush<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">return</span><br /><br />&nbsp;</div>[/code:2we7m7ao]
¿ No funciona cToolTip con :Disable() ?
Creo que se refiere a este problema al estar el GET Disable por efecto de la clausula WHEN [code=fw:21ybr6i8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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 />Dlg_Grad<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />procedure Dlg_Grad<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oSay, oBrush, lTest := .T., oCbx, , oSay1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oGet, cName := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oGet1, cVar1 := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lEdit &nbsp; := .F.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush gradient <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>, &nbsp;<span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush transparent<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Name"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> &nbsp;transparent <span style="color: #0000ff;">adjust</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">25.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> lEdit<br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">cToolTip</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">"ToolTip of Name"</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">27</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay1 <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Other"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> &nbsp;transparent <span style="color: #0000ff;">adjust</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">27.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cVar1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">cToolTip</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">"ToolTip of Name"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Change Text"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">release</span> <span style="color: #0000ff;">brush</span> oBrush<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">return</span><br />&nbsp;</div>[/code:21ybr6i8]
¿ No funciona cToolTip con :Disable() ?
[quote="Antonio Linares":3mmi49e8]Asi parece funcionar. Es esto lo que se busca ? o me perdí ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:3mmi49e8]<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 />Dlg_Grad<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />procedure Dlg_Grad<br /><br />   <span style="color: #00C800;">local</span> oDlg, oSay, oBrush, lTest := .T., oCbx<br />   <span style="color: #00C800;">local</span> oGet, cName := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />   <br />      <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush gradient <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />                                     <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>,  <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   <br />      <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> ;<br />         <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush transparent<br />   <br />      @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br />   <br />      @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"This a Test"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span>  transparent <span style="color: #0000ff;">adjust</span><br />      @ <span style="color: #000000;">25.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br />   <br />      @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Change Text"</span> <span style="color: #000000;">&#41;</span><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: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oSay:<span style="color: #000000;">lWantClick</span> := .T., oSay:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"this is a test"</span>, oSay:<span style="color: #000000;">ShowToolTip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br />   <br />      <span style="color: #0000ff;">release</span> <span style="color: #0000ff;">brush</span> oBrush<br />   <br />   <span style="color: #00C800;">return</span><br /><br /> </div>[/code:3mmi49e8][/quote:3mmi49e8] [code=fw:3mmi49e8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH1905\SAMPLES\WHENGET.PRG</span><br /><br /><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;Dlg_Get_When<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Dlg_Get_When<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// .F.</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oSay, oBrush, lTest := .T. , oCbx, oFont, oSay2, oSay3<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oGet, cName := <span style="color: #ff0000;">"ToolTip: como llamar con WHEN( .F. )?"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-26</span> BOLD<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>, &nbsp;<span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"This a Test de ToolTip con GET .F."</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, CLR_BLACK ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"ToolTip: como llamar con WHEN( .F. )?"</span> <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">25</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"This a Test de ToolTip con GET .F."</span> <span style="color: #0000ff;">of</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent <span style="color: #0000ff;">adjust</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">35.5</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">110</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lBtnTransparent</span> := .t. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// transparent button get oGet3</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lAdjustBtn</span> &nbsp; &nbsp; &nbsp;:= .t. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Button Get Adjust Witdh oGet3</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lDisColors</span> &nbsp; &nbsp; &nbsp;:= .f. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Deactive disable color</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">nClrTextDis</span> &nbsp; &nbsp; := CLR_WHITE <span style="color: #B900B9;">// Color text disable status</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">nClrPaneDis</span> &nbsp; &nbsp; := CLR_BLUE &nbsp;<span style="color: #B900B9;">// Color Pane disable status</span><br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lReadOnly</span> := .T.<br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lUpdate</span> &nbsp; := .T.<br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">cToolTip</span> := OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ToolTip de Antonio Linares Ca¤as con WHEN(.F.) no Muestra"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">125</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fuerza Linares jájájájá"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, CLR_BLACK <span style="color: #0000ff;">PIXEL</span> TRANSPARENT <span style="color: #0000ff;">ADJUST</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">145</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TooTip con GET .F., Como?"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">COLOR</span> CLR_HRED, CLR_BLACK <span style="color: #0000ff;">PIXEL</span> TRANSPARENT <span style="color: #0000ff;">ADJUST</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span> 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> CANCEL<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN</span><br />&nbsp;</div>[/code:3mmi49e8] Regards, saludos.
¿ No funciona cToolTip con :Disable() ?
[quote="cnavarro":2l50dau7]Creo que se refiere a este problema al estar el GET Disable por efecto de la clausula WHEN [code=fw:2l50dau7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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 />Dlg_Grad<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />procedure Dlg_Grad<br /><br />   <span style="color: #00C800;">local</span> oDlg, oSay, oBrush, lTest := .T., oCbx, , oSay1<br />   <span style="color: #00C800;">local</span> oGet, cName := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oGet1, cVar1 := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">30</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> lEdit   := .F.<br />   <br />      <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush gradient <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,;<br />                                     <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>,  <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   <br />      <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> odlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Say With Gradient Brush"</span> ;<br />         <span style="color: #0000ff;">size</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">brush</span> oBrush transparent<br />   <br />      @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">pixel</span><br />   <br />      @ <span style="color: #000000;">25</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Name"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span>  transparent <span style="color: #0000ff;">adjust</span><br />      @ <span style="color: #000000;">25.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> lEdit<br />      oGet:<span style="color: #000000;">cToolTip</span>    := <span style="color: #ff0000;">"ToolTip of Name"</span><br /><br />      @ <span style="color: #000000;">27</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">say</span> oSay1 <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Other"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">40</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span>  transparent <span style="color: #0000ff;">adjust</span><br />      @ <span style="color: #000000;">27.5</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cVar1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br />      oGet1:<span style="color: #000000;">cToolTip</span>    := <span style="color: #ff0000;">"ToolTip of Name"</span><br />   <br />      @ <span style="color: #000000;">10</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Change Text"</span> <span style="color: #000000;">&#41;</span><br />   <br />      <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <br />      <span style="color: #0000ff;">release</span> <span style="color: #0000ff;">brush</span> oBrush<br />   <br />   <span style="color: #00C800;">return</span><br /> </div>[/code:2l50dau7][/quote:2l50dau7] No funciona. Está EDITABLE. Regards, saludos.
¿ No funciona cToolTip con :Disable() ?
Resuelto. Resolvido. Gracias, many thanks. [code=fw:1skbhinn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH1905\SAMPLES\WHENGET.PRG - 25/09/2022 - <!-- e --><a href="mailto:kapiabafw@gmail.com">kapiabafw@gmail.com</a><!-- e --></span><br /><br /><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;Dlg_Get_When<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Dlg_Get_When<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// .F.</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oSay, oBrush, lTest := .T. , oCbx, oFont, oSay2, oSay3<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oGet, cName := <span style="color: #ff0000;">"ToolTip: como llamar con WHEN( .F. )?"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-26</span> BOLD<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>, &nbsp;<span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"This a Test de ToolTip con GET .F."</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> GROUP <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, CLR_BLACK ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"ToolTip: como llamar con WHEN( .F. )?"</span> <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">25</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"This a Test de ToolTip con GET .F."</span> <span style="color: #0000ff;">of</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">140</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> transparent <span style="color: #0000ff;">adjust</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">35.5</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cName <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">110</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lBtnTransparent</span> := .t. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// transparent button get oGet3</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lAdjustBtn</span> &nbsp; &nbsp; &nbsp;:= .t. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Button Get Adjust Witdh oGet3</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lDisColors</span> &nbsp; &nbsp; &nbsp;:= .f. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Deactive disable color</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">nClrTextDis</span> &nbsp; &nbsp; := CLR_WHITE <span style="color: #B900B9;">// Color text disable status</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">nClrPaneDis</span> &nbsp; &nbsp; := CLR_BLUE &nbsp;<span style="color: #B900B9;">// Color Pane disable status</span><br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lReadOnly</span> := .T.<br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lUpdate</span> &nbsp; := .T.<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// con GET .F. no funciona</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oGet:cToolTip := OemToAnsi( "ToolTip de Antonio Linares Ca¤as con WHEN(.F.) no Muestra" )</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Asi, funciona con GET .F.</span><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">&#123;</span> || MyToolTip<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// funciona</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">125</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fuerza Linares jájájájá"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">COLOR</span> CLR_YELLOW, CLR_BLACK <span style="color: #0000ff;">PIXEL</span> TRANSPARENT <span style="color: #0000ff;">ADJUST</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">145</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TooTip con GET .F., Como?"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">COLOR</span> CLR_HRED, CLR_BLACK <span style="color: #0000ff;">PIXEL</span> TRANSPARENT <span style="color: #0000ff;">ADJUST</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">button</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span><span style="color: #000000;">&#40;</span> 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> CANCEL<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MyToolTip<span style="color: #000000;">&#40;</span> nOpt <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// funciona perfecto</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cRet <span style="color: #B900B9;">// := SPACE(20)</span><br /><br />&nbsp; &nbsp;FWLOG nOpt<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"ToolTip de Antonio Linares Canas con WHEN(.F.) Asi funciona"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 02 GET 2"</span> <span style="color: #B900B9;">// etc...</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 03"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 04"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 05"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 06"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">7</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 07"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">8</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 08"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">9</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 09"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">10</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 10"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">11</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 11"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">12</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 12"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">13</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 13"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">14</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 14"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">15</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 15"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">16</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 16"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">17</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 17"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">18</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 18"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">19</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 19"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">20</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Produtos da área 20"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndCase</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> cRet <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// FIN</span><br />&nbsp;</div>[/code:1skbhinn] Regards, saludos.
¿ No funciona cToolTip con :Disable() ?
Querido João, No se si será el efecto que se busca, pero decirte que eres un maestrazo de FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> mis respetos
¿ No funciona cToolTip con :Disable() ?
Gracias mi super Maestro. Para Folder / Folderex: [code=fw:k3f3mied]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;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>:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">&#123;</span> || MyToolTip_Fld<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// funciona</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MyToolTip_Fld<span style="color: #000000;">&#40;</span> nOpt <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// funciona perfecto</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cRet <span style="color: #B900B9;">// := SPACE(20)</span><br /><br />&nbsp; &nbsp;FWLOG nOpt<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Case</span> nOpt = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; cRet := <span style="color: #ff0000;">"Fones do Paisagista"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndCase</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> cRet <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:k3f3mied] Regards, saludos.
¿ Por qué el MsgMeter no Funciona ?
Estimados compañeros Al ocupar el MsgMeter todo lo que se encuentra en la ventana se empieza a hundir y también me paso con este código: DEFINE DIALOG oDlg RESOURCE "PROGRESO" oMeter = TProgress():Redefine(101,oDlg) //REDEFINE METER oMeter VAR nActual TOTAL 100 ID 101 OF oDlg //UPDATE //REDEFINE METER oMeter VAR nActual ID 101 OF oDlg TOTAL 100 //ROUND ROUNDSIZE 6 Cuando ocupe el REDEFINE METER paso lo mismo todos los controles de la ventana se hundieron, pero cuando ocupe oMeter = TProgress() funciono bien. Atento a sus comentarios, Desde ya gracias, Waldemar
¿ Por qué el MsgMeter no Funciona ?
Usas en tu RC el fichero "Manifest" ?
¿ Por qué el MsgMeter no Funciona ?
[quote="cnavarro":21rzqj8f]Usas en tu RC el fichero "Manifest" ?[/quote:21rzqj8f] Si te refieres a este: WindowsXP.Manifest, si estimado.
¿ Por qué el MsgMeter no Funciona ?
\SAMPLES\ATEST.PRG
¿ Por qué el MsgMeter no Funciona ?
[quote="cnavarro":2r5a18y2]No entiendo bien tu duda Si pones un pequeño ejemplo que se pueda probar, mejor, y si ya lo has puesto, indica por favor el link del post[/quote:2r5a18y2] Hola Estimado Aquí el ejemplo: Estimados compañeros Al ocupar el MsgMeter todo lo que se encuentra en la ventana se empieza a hundir y también me paso con este código: DEFINE DIALOG oDlg RESOURCE "PROGRESO" oMeter = TProgress():Redefine(101,oDlg) //REDEFINE METER oMeter VAR nActual TOTAL 100 ID 101 OF oDlg //UPDATE //REDEFINE METER oMeter VAR nActual ID 101 OF oDlg TOTAL 100 //ROUND ROUNDSIZE 6 Cuando ocupe el REDEFINE METER paso lo mismo todos los controles de la ventana se hundieron, pero cuando ocupe oMeter = TProgress() funciono bien. Atento a sus comentarios, Desde ya gracias, En este momento me interesa más la Function MsgMeter Waldemar
¿ Por qué el MsgMeter no Funciona ?
Estimados Compañeros Debo insistir con el tema ya que no he tenido una respuesta que explique ¿ porque lo msgmeter o redefine meter en vez moverse en forma horizontal (además todos los controles de una ventana) suben ??????? No entiendo <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> Desde ya muchas gracias Waldemar
¿ Por qué el MsgMeter no Funciona ?
No entiendo bien tu duda Si pones un pequeño ejemplo que se pueda probar, mejor, y si ya lo has puesto, indica por favor el link del post
¿ Por qué el MsgMeter no Funciona ?
Porquê nos usas METEREX? \samples\TESTMEX?.PRG - Moderno \samples\REINDEX.PRG - Viejo no me gusta más... jajajajaja. Saludos.
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
Estimados Compañeros Gracias a Angel del foro aprendí a subir imágenes entonces les mostrare el error; esto sucede cuando presiono el botón de EXCEL en XBROWSER, pero no siempre. Enlace los archivos xbrowse.prg y datarow.prg para codificarlos y colocarlos en español (por ahora). Bueno si alguien más le ha pasado: [url=https&#58;//ibb&#46;co/K7KyzpN:2nqfl13r][img:2nqfl13r]https&#58;//i&#46;ibb&#46;co/QnDmj38/Pantalla&#46;jpg[/img:2nqfl13r][/url:2nqfl13r] Atento a sus comentarios, Waldemar
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
oBrw:ToExcel() method can not export images. If the DBF contains images, we get this error.
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
[quote="nageswaragunupudi":1zvw9wd7]oBrw:ToExcel() method can not export images. If the DBF contains images, we get this error.[/quote:1zvw9wd7] Dear Mr. Rao The DBF doesn´t have images. What can to be? Regards Waldemar
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
Can you send me the DBF to me by mail? nageswaragunupudi [at] gmail [dot] com. Also please let me know the version of FWH you are using.
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
Muestra Funciones.prg lyneas: 1078/1878, saludos.
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
[quote="nageswaragunupudi":3dro5fss]Can you send me the DBF to me by mail? nageswaragunupudi [at] gmail [dot] com. Also please let me know the version of FWH you are using.[/quote:3dro5fss] Mr. Rao I already send you what you asked me. Thaks you very much Waldemar
¿ Por qué se cae XBROWSER al Presionar EXCEL ?
[quote="karinha":ahkuf6n5]Muestra Funciones.prg lyneas: 1078/1878, saludos.[/quote:ahkuf6n5] Estimado Karinha Hay muchas funciones entre esas lineas que no tienen que ver con el error. Puedo mostrar las que me solicite. Saludos Waldemar
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
Bueno la pregunta lo dice todo. He tratado de resolver esto (El botón de EXCEL en el preview esta siempre Disable) hace rato y no he podido resolverlo aún que Mr. Rao me ha ayudado mucho. Será por esta librería BWCC32.DLL (conozco algunas funciones de esta librería, pero la memoria falla). Bueno atento a sus comentarios, Desde ya muchas gracias, saludos, Waldemar
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
Usas Recursos Borland en qué momento? Una cosa no tiene nada que ver con la otra. Utilice siempre recursos nativos de windows o de fivewin. Saludos.
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
[quote="karinha":3f2nrv2g]Usas Recursos Borland en qué momento? Una cosa no tiene nada que ver con la otra. Utilice siempre recursos nativos de windows o de fivewin. Saludos.[/quote:3f2nrv2g] En este momento no recuerdo mucho. Uso PelleC y cuando no cargo la librería no encuentra los recursos guardados en el archivo RES.
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
Usas esto en tu MENU PRINCIPAL? Se no, no usas BORLAND. [code=fw:2896uu31]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hBorland<br /><br />&nbsp; &nbsp;hBorland := LoadLibrary<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'BWCC32.DLL'</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;BWCCRegister<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> BWCCRegister<span style="color: #000000;">&#40;</span> hInst AS LONG <span style="color: #000000;">&#41;</span> AS WORD PASCAL LIB <span style="color: #ff0000;">"BWCC32.DLL"</span><br />&nbsp;</div>[/code:2896uu31]
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
[quote="karinha":9wsyxxyz]Usas esto en tu MENU PRINCIPAL? Se no, no usas BORLAND. [code=fw:9wsyxxyz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />   <span style="color: #00C800;">LOCAL</span> hBorland<br /><br />   hBorland := LoadLibrary<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'BWCC32.DLL'</span><span style="color: #000000;">&#41;</span><br /><br />   BWCCRegister<span style="color: #000000;">&#40;</span> GetResources<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> BWCCRegister<span style="color: #000000;">&#40;</span> hInst AS LONG <span style="color: #000000;">&#41;</span> AS WORD PASCAL LIB <span style="color: #ff0000;">"BWCC32.DLL"</span><br /> </div>[/code:9wsyxxyz][/quote:9wsyxxyz] Estimado Karinha De hecho no quiero ocupar Borland, pero no se como dejar de hacerlo, años atras era necesario pero parece que ahora no. Como te dije ocupo PellesC con un archivo RES que enlazo a mi EXE final, pero cada vez que elimino la librería BWCC32.DLL con todo lo que tu describes me da error de que los controles (por ejemplo una ventana de Dialogo) no existe. Aquí esta lo que tengo en mi programa: hBWCC:=LoadLibrary("BWCC32.DLL") BWCCRegister(GetResources()) FreeLibrary( hBWCC ) DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL" Atentamente, Waldemar
¿ Por usar BWCC32.DLL no funciona EXCEL en el Preview ?
Te basta cambiar, todos los recursos borland, por standard de windows/fivewin nativos. Saludos.
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
Estimados compañeros Estoy ocupando BROWSER para mostrar una tabla: use final XBROWSER (cTitulo) COLUMNS aCols FASEDIT aCols me imagino que son las cabeceras, pero se multiplican en toda la columna (osea en los registros que son numéricos los cambian a caracteres y los llenan con el nombre de la cabecera).¿ Porqué se produce ese error, alguien sabe? Por su ayuda desde ya muchas gracias. Waldemar
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
COLUMNS are not headers. They are the expressions of field names to be shown. By default, all fields are shown. Example: [code=fw:1c7z277j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE CUSTOMER <span style="color: #00C800;">NEW</span><br />XBROWSER <span style="color: #ff0000;">"CUSTOMER"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Customers"</span> COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span>, <span style="color: #ff0000;">"SALARY"</span><br />&nbsp;</div>[/code:1c7z277j] COLUMNS clause is optional. Most of the times, XBROWSER cAlias is enough
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
[quote="nageswaragunupudi":chalf3g2]COLUMNS are not headers. They are the expressions of field names to be shown. By default, all fields are shown. Example: [code=fw:chalf3g2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE CUSTOMER <span style="color: #00C800;">NEW</span><br />XBROWSER <span style="color: #ff0000;">"CUSTOMER"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Customers"</span> COLUMNS <span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"CITY"</span>, <span style="color: #ff0000;">"SALARY"</span><br /> </div>[/code:chalf3g2] COLUMNS clause is optional. Most of the times, XBROWSER cAlias is enough[/quote:chalf3g2] Mr. Rao There is form to shown headers? Waldemar
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
[code=fw:21hb7vzg]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE CUSTOMER<br />XBROWSER <span style="color: #ff0000;">"CUSTOMER"</span> COLUMNS <span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"LAST"</span> SETUP oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FirstName"</span>, <span style="color: #ff0000;">"LastName"</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:21hb7vzg]
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
[quote="nageswaragunupudi":a1aggraa][code=fw:a1aggraa]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE CUSTOMER<br />XBROWSER <span style="color: #ff0000;">"CUSTOMER"</span> COLUMNS <span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"LAST"</span> SETUP oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FirstName"</span>, <span style="color: #ff0000;">"LastName"</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:a1aggraa][/quote:a1aggraa] Mr. Rao Excellent Thank you very much, i`ll work on it. Waldemar
¿ Porqué se distorsiona XBROWSER con COLUMNS ?
Mr. Rao I wrote this: XBROWSER TITLE "Archivo Final para Recursos Humanos"; SETUP oBrw:cHeaders := aTem//; When push the button for excel, i get this error: Application =========== Path and name: D:\JOB\Sindicato\sindicato.exe (32 bits) Size: 7,479,808 bytes Compiler version: Harbour 3.2.0dev (r1801051438) FiveWin version: FWH 19.03 C compiler version: Borland/Embarcadero C++ 7.0 (32-bit) Windows version: 6.2, Build 9200 Time from start: 0 hours 0 mins 14 secs Error occurred at: 21/06/2019, 12:34:27 Error description: (DOS Error -2147352567) WINOLE/1007 No se puede obtener la propiedad Paste de la clase Worksheet. (0x800A03EC): Microsoft Excel Stack Calls =========== Called from: => TOLEAUTO:PASTE( 0 ) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:TOEXCEL( 9801 ) Called from: xbrowser.prg => (b)XBROWSE( 193 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 697 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 983 ) Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1791 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2006 ) Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 ) Called from: => DIALOGBOXINDIRECTW( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 ) Called from: xbrowser.prg => XBROWSE( 304 ) Called from: Funciones.prg => GENXLSFINAL( 1078 ) Called from: Funciones.prg => (b)PROGRESO( 1851 ) Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 179 ) Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT( 1755 ) Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 ) Called from: => SENDMESSAGE( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 433 ) Called from: => TWINDOW:HANDLEEVENT( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1136 ) Called from: => DIALOGBOXW( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 ) Called from: Funciones.prg => PROGRESO( 1871 ) Called from: Principal.prg => (b)MAIN( 169 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 697 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 983 ) Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1791 ) Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2006 ) Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 ) Called from: => WINRUN( 0 ) Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1078 ) Called from: Principal.prg => MAIN( 193 ) Regards Waldemar
¿ Qué función se utiliza para cambiar la fecha ?
Estimados utilice una antigua función que cambiaba la fecha de entorno de Windows (Setdate()), pero ahora me da error. Por lo que investigue modificaron la función. ¿ Cuál es utiliza ahora ? Desde ya muchas gracia Waldemar
¿ Qué función se utiliza para cambiar la fecha ?
Hola : Si que es verdad que falla, pero parece ser que es un problema de privilegios del S.O.Windows. Lo explica Antonio en este hilo: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=7445&hilit=system+date+SetDate">viewtopic.php?f=6&t=7445&hilit=system+date+SetDate</a><!-- l --> No se si alguien soluciono el asunto o tienen una funcion propia que se salte esos privilegios , seria interesante que la publicaran si fueran tan amables. Saludos. Jose.
¿ Qué función se utiliza para cambiar la fecha ?
[code=fw:1tvej5ea]<div class="fw" id="{CB}" style="font-family: monospace;"><br />winexec<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'rundll32.exe shell32.dll,Control_RunDLL "timedate.cpl"'</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1tvej5ea]
¿ Qué función se utiliza para cambiar la fecha ?
[quote="karinha":36wgqcaq][code=fw:36wgqcaq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />winexec<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'rundll32.exe shell32.dll,Control_RunDLL "timedate.cpl"'</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:36wgqcaq][/quote:36wgqcaq] Muchas Gracias Pero no existe una forma desde FW ?? Saludos Waldemar
¿ Qué función se utiliza para cambiar la fecha ?
No que yo sepa. Hago asi: [code=fw:3m8rc4j9]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CONTROL TIMEDATE.CPL"</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3m8rc4j9] Saludos.