topic
stringlengths
1
63
text
stringlengths
1
577k
Calendario anual
Un último detalle para TDatePicker -recibido como observación de un cliente- no aparece el 31 de marzo, por lo que deben considerarse 38 columnas y no 37.
Calendario anual
Aquí os dejo una agenda anual basada totalmente en TPickDate.Si alguien está interesado, el ejecutable puede usarse de forma autonoma, y el PRG junto al RC puede integrarse dentro del propio codigo.El calendario indica la fecha actual y permite marcar tareas (arrastrando o no) de hasta seis tipos diferentes, representados por otros tantos colores, está corregido lo del 31 de Marzo etc.El código que gestiona la agenda está "reciclado" de una antigua aplicación mia, pero que aún es bastante correcto aunque está ahí para mejorarse.[url:v51d7maq]http://cid-6be220caaa0bc6fd.skydrive.live.com/self.aspx/Agenda%20Anual/agenda%20ANUAL.zip[/url:v51d7maq][img:v51d7maq]http://cid-6be220caaa0bc6fd.skydrive.live.com/self.aspx/Agenda%20Anual/CalAnual.jpg[/img:v51d7maq]
Calendario anual
Excelente, te recomendaría que le hicieras llegar a Otto el fuente con la corrección para que todos vayamos por el mismo rumbo, ya que la idea original fue de él y es quien ha estado recopilando y organizando las modificaciones
Calendario anual
Marchando..... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Calendario anual
Tuve necesidad de agregar otros arreglos. Para conservar la esencia de la clase es mejor agregar un método y ya desde el programa pasar las series que se deseen. oPickDate:AddSerie( aDays, nColor, nBrush )He aquí los cambios:[code:bj51cscf] #Include "FiveWin&#46;ch" MemVar nClrM // Color principal usado en toda la aplicación // por definición GetSysColor&#40;2&#41; CLASS TPickDate FROM TControl DATA dStart, dEnd, dTemp, lMove DATA nYear DATA oBrushSunday, oBrushSelected, oFontHeader DATA nLeftStart, nTopStart DATA bSelect DATA aSeries, aColors // días especiales CLASSDATA lRegistered AS LOGICAL METHOD New&#40; nTop, nLeft, nWidth, nHeight, oWnd, nYear, nClrFore, nClrBack &#41; METHOD Redefine&#40; nId, oWnd &#41; METHOD Paint&#40;&#41; METHOD Display&#40;&#41; INLINE &#58;&#58;BeginPaint&#40;&#41;, &#58;&#58;Paint&#40;&#41;, &#58;&#58;EndPaint&#40;&#41;, 0 METHOD Destroy&#40;&#41; METHOD AddSerie&#40;&#41; METHOD LButtonDown&#40; nRow, nCol, nKeyFlags &#41; METHOD LButtonUp&#40; nRow, nCol, nKeyFlags &#41; METHOD PreviousYear&#40;&#41; INLINE &#58;&#58;nYear--, &#58;&#58;Refresh&#40;&#41; METHOD NextYear&#40;&#41; INLINE &#58;&#58;nYear++, &#58;&#58;Refresh&#40;&#41; METHOD EraseBkGnd&#40; hDC &#41; INLINE 0 METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; ENDCLASS //----------------------------------------------------------------------------// METHOD New&#40; nTop, nLeft, nWidth, nHeight, oWnd, nYear, nClrFore, nClrBack &#41; CLASS TPickDate DEFAULT nWidth &#58;= 800,; nHeight &#58;= 300,; nLeft &#58;= 0,; nTop &#58;= 0,; nYear &#58;= Year&#40; Date&#40;&#41; &#41;, ; oWnd &#58;= GetWndDefault&#40;&#41;,; nClrM &#58;= GetSysColor&#40; 2 &#41; &#58;&#58;lMove = &#46;F&#46; &#58;&#58;nTopStart = 0 // for header &#58;&#58;nLeftStart = 65 // col header &#58;&#58;aSeries = &#123;&#125; &#58;&#58;aColors = &#123;&#125; &#58;&#58;nTop = nTop &#58;&#58;nLeft = nLeft &#58;&#58;nBottom = nTop + nHeight - 1 &#58;&#58;nRight = nLeft + nWidth - 1 &#58;&#58;nYear = Year&#40; Date&#40;&#41; &#41; &#58;&#58;oWnd = oWnd &#58;&#58;dStart &#58;= &#58;&#58;dEnd &#58;= &#58;&#58;dTemp &#58;= Date&#40;&#41; &#58;&#58;nClrText = nClrFore &#58;&#58;nClrPane = nClrBack &#58;&#58;nStyle = nOr&#40; WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_BORDER &#41; DEFINE BRUSH &#58;&#58;oBrushSunday COLOR LightColor&#40;240,nClrM&#41; // Sundays column DEFINE BRUSH &#58;&#58;oBrushSelected COLOR nRGB&#40; 240, 232, 188 &#41; // Selected days DEFINE FONT &#58;&#58;oFont NAME "MS Sans Serif" SIZE 0, -10 BOLD DEFINE FONT &#58;&#58;oFontHeader NAME "MS Sans Serif" SIZE 0, -10 #ifdef __XPP__ DEFAULT &#58;&#58;lRegistered &#58;= &#46;F&#46; #endif &#58;&#58;Register&#40;&#41; if ! Empty&#40; oWnd&#58;hWnd &#41; &#58;&#58;Create&#40;&#41; oWnd&#58;AddControl&#40; Self &#41; else oWnd&#58;DefControl&#40; Self &#41; endif return self //----------------------------------------------------------------------------// METHOD Redefine&#40; nId, oWnd &#41; CLASS TPickDate DEFAULT oWnd &#58;= GetWndDefault&#40;&#41;, ; nClrM&#58;= GetSysColor&#40; 2 &#41; &#58;&#58;nId = nId &#58;&#58;oWnd = oWnd &#58;&#58;lMove = &#46;F&#46; &#58;&#58;nTopStart = 0 // for header &#58;&#58;nLeftStart = 65 // col header &#58;&#58;dStart &#58;= &#58;&#58;dEnd &#58;= &#58;&#58;dTemp &#58;= Date&#40;&#41; &#58;&#58;nYear = Year&#40; Date&#40;&#41; &#41; &#58;&#58;aSeries = &#123;&#125; &#58;&#58;aColors = &#123;&#125; DEFINE BRUSH &#58;&#58;oBrushSunday COLOR LightColor&#40;240,nClrM&#41; // Sundays column DEFINE BRUSH &#58;&#58;oBrushSelected COLOR nClrM // Selected days DEFINE FONT &#58;&#58;oFont NAME "MS Sans Serif" SIZE 0, -10 BOLD DEFINE FONT &#58;&#58;oFontHeader NAME "MS Sans Serif" SIZE 0, -10 &#58;&#58;SetColor&#40; 0, 0 &#41; &#58;&#58;Register&#40;&#41; oWnd&#58;DefControl&#40; Self &#41; return Self //----------------------------------------------------------------------------// METHOD Paint&#40;&#41; CLASS TPickDate local aInfo &#58;= &#58;&#58;DispBegin&#40;&#41; local hDC &#58;= &#58;&#58;hDC, cDay, nDay, n, dDate, nColStep, nRowStep local dTmpDate, nMonth &#58;= 0, nLeftCol &#58;= 0 local nColor, cDate // para evaluar días especiales local lBrush, nBrush, oBrush, nI FillRect&#40; hDC, GetClientRect&#40; &#58;&#58;hWnd &#41;, &#58;&#58;oBrush&#58;hBrush &#41; nRowStep = &#40; &#40;&#58;&#58;nHeight-3&#41; - &#58;&#58;nTopStart &#41; / 13 // Uso de Gradient&#40;&#41; en vez de GradientFill&#40;&#41; Gradient&#40; &#58;&#58;hDC, &#123; 0, 0, &#58;&#58;nHeight, &#58;&#58;nWidth &#125;, LightColor&#40;250,nClrM&#41;, LightColor&#40;200,nClrM&#41;, &#46;T&#46; &#41; dDate = CToD&#40; "01/01/" + Str&#40; &#58;&#58;nYear, 4 &#41; &#41; dDate += 8 - DoW&#40; dDate &#41; nColStep = &#40; &#58;&#58;nWidth - &#58;&#58;nLeftStart - 3 &#41; / 38 Gradient&#40; &#58;&#58;hDC, &#123; 0, 0, nRowStep - 1, &#58;&#58;nWidth &#125;, LightColor&#40;225,nClrM&#41;, LightColor&#40;175,nClrM&#41;, &#46;T&#46; &#41; &#58;&#58;Say&#40; &#40; &#58;&#58;nTopStart + &#40; nRowStep / 2 &#41; - &#40; &#58;&#58;oFont&#58;nHeight / 2 &#41;&#41;,; &#40; &#40; &#58;&#58;nLeftStart + nColStep &#41; / 2 &#41; - &#40; GetTextWidth&#40; hDC, Str&#40; &#58;&#58;nYear, 4 &#41;, &#58;&#58;oFont&#58;hFont &#41; / 2 &#41;,; Str&#40; &#58;&#58;nYear, 4 &#41;,,, &#58;&#58;oFont, &#46;T&#46;, &#46;T&#46; &#41; // Paint Sunday background color for n = 1 to 37 step 7 FillRect&#40; hDC, &#123; 0, &#58;&#58;nLeftStart + &#40; nColStep * n &#41;,; &#58;&#58;nHeight - 1, &#58;&#58;nLeftStart + &#40; nColStep * &#40; n + 1 &#41; &#41; &#125;, &#58;&#58;oBrushSunday&#58;hBrush &#41; next for nMonth = 1 to 12 &#58;&#58;Line&#40; &#58;&#58;nTopStart + nMonth * nRowStep, 0,&#40;&#58;&#58;nTopStart + nMonth * nRowStep&#41;, &#58;&#58;nWidth - 1 &#41; &#58;&#58;Say&#40; &#58;&#58;nTopStart + nMonth * nRowStep + &#40; nRowStep / 2 &#41; - &#40; &#58;&#58;oFont&#58;nHeight / 2 &#41;, 3, cMonth&#40; RegionDate&#40;nMonth, Str&#40; Year&#40; Date&#40;&#41; &#41;, 4 &#41;&#41;&#41; ,,, &#58;&#58;oFont, &#46;T&#46;, &#46;T&#46; &#41; next // fill selected days if &#58;&#58;lMove dTmpDate = Min&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41; while dTmpDate <= Max&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41; nMonth = Month&#40; dTmpDate &#41; nLeftCol = &#58;&#58;nLeftStart + &#40; nColStep * &#40; DoW&#40; RegionDate&#40; nMonth, Str&#40; &#58;&#58;nYear, 4 &#41; &#41; &#41; &#41; &#41; + ; nColStep * &#40; Day&#40; dTmpDate &#41; - 1 &#41; FillRect&#40; hDC, &#123; &#58;&#58;nTopStart + month&#40;dTmpDate&#41; * nRowStep + 1,; nLeftCol, &#58;&#58;nTopStart + Month&#40; dTmpDate &#41; * nRowStep + nRowStep,; nLeftCol + nColStep&#125;, &#58;&#58;oBrushSelected&#58;hBrush &#41; dTmpDate++ end endif // Draw days for n = 1 to 37 &#58;&#58;Line&#40; 0, &#58;&#58;nLeftStart + &#40; nColStep * n &#41;, &#58;&#58;nHeight - 1, &#58;&#58;nLeftStart + &#40; nColStep * n &#41; &#41; nColor &#58;= if&#40; DoW&#40; dDate &#41; ==1, CLR_RED, 0 &#41; cDay = SubStr&#40; CDoW&#40; dDate++ &#41;, 1, 1 &#41; &#58;&#58;Say&#40; &#40; &#58;&#58;nTopStart + nRowStep * 0&#46;4 &#41;-2,; &#58;&#58;nLeftStart + &#40; nColStep * n &#41; + &#40; nColStep / 2 &#41; - &#40; GetTextWidth&#40; hDC, cDay, &#58;&#58;oFont&#58;hFont &#41; / 2 &#41; + 1,; cDay, nColor, 0, &#58;&#58;oFont, &#46;T&#46;, &#46;T&#46; &#41; next // Draw months for nMonth = 1 to 12 dDate = RegionDate&#40;nMonth,Str&#40; &#58;&#58;nYear, 4 &#41; &#41; nDay = DoW&#40; dDate &#41; while Month&#40; dDate &#41; == nMonth cDay = AllTrim&#40; Str&#40; Day&#40; dDate &#41; &#41; &#41; nColor &#58;= 0 lBrush &#58;=&#46;F&#46; cDate &#58;= DtoS&#40; dDate&#41; // identifica el día y define el pintado if DoW&#40; dDate &#41; == 1 // sunday nColor &#58;= CLR_RED else FOR nI=1 TO Len&#40;&#58;&#58;aSeries&#41; IF AScan&#40;&#58;&#58;aSeries&#91;nI&#93;,cDate&#41;<>0 nColor&#58;=&#58;&#58;aColors&#91;nI&#93;&#91;1&#93; nBrush&#58;=&#58;&#58;aColors&#91;nI&#93;&#91;2&#93; lBrush&#58;=&#46;T&#46; nI&#58;=Len&#40;&#58;&#58;aSeries&#41; ENDIF NEXT nI endif if !lBrush if dDate=Date&#40;&#41; // current day nColor &#58;= CLR_YELLOW nBrush &#58;= CLR_GREEN lBrush &#58;= &#46;T&#46; endif endif if lBrush nMonth = Month&#40; dDate &#41; nLeftCol = &#58;&#58;nLeftStart + &#40; nColStep * &#40; DOW&#40; RegionDate&#40; nMonth, Str&#40; &#58;&#58;nYear, 4 &#41; &#41; &#41; &#41; &#41; + ; nColStep * &#40; Day&#40; dDate &#41; - 1 &#41; DEFINE BRUSH oBrush COLOR nBrush FillRect&#40; hDC, &#123; &#58;&#58;nTopStart + month&#40;dDate&#41; * nRowStep + 1,; nLeftCol + 1, &#58;&#58;nTopStart + Month&#40; dDate &#41; * nRowStep + nRowStep,; nLeftCol + nColStep&#125;, oBrush&#58;hBrush &#41; oBrush&#58;End&#40;&#41; endif &#58;&#58;Say&#40; &#40; &#58;&#58;nTopStart + nMonth * nRowStep + &#40; nRowStep * 0&#46;4 &#41; &#41;-2,; &#58;&#58;nLeftStart + &#40; nColStep * nDay++ &#41; + &#40; nColStep / 2 &#41; - &#40; GetTextWidth&#40; hDC, cDay, &#58;&#58;oFont&#58;hFont &#41; / 2 &#41; + 1,; cDay, nColor, 0, &#58;&#58;oFontHeader, &#46;T&#46;, &#46;T&#46; &#41; dDate++ end next if ValType&#40; &#58;&#58;bPainted &#41; == "B" Eval&#40; &#58;&#58;bPainted, hDC, Min&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Max&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Self &#41; endif &#58;&#58;DispEnd&#40; aInfo &#41; return 0 //----------------------------------------------------------------------------// METHOD Destroy&#40;&#41; CLASS TPickDate &#58;&#58;oBrushSunday&#58;End&#40;&#41; &#58;&#58;oBrushSelected&#58;End&#40;&#41; &#58;&#58;oFontHeader&#58;End&#40;&#41; return Super&#58;Destroy&#40;&#41; METHOD AddSerie&#40; aSerie, nColor, nBrush &#41; CLASS TPickDate AAdd&#40; &#58;&#58;aSeries, aSerie &#41; AAdd&#40; &#58;&#58;aColors, &#123; nColor, nBrush &#125; &#41; RETURN Len&#40; &#58;&#58;aSeries &#41; //----------------------------------------------------------------------------// METHOD LButtonDown&#40; nRow, nCol, nKeyFlags &#41; CLASS TPickDate local nMonth &#58;= Int&#40; &#40; nRow - &#58;&#58;nTopStart &#41; / &#40; &#40; &#58;&#58;nHeight - &#58;&#58;nTopStart &#41; / 13 &#41; &#41; local nDay &#58;= Int&#40; &#40; nCol - &#58;&#58;nLeftStart &#41; / &#40; &#40; &#58;&#58;nWidth - &#58;&#58;nLeftStart &#41; / 38 &#41; &#41; - ; DoW&#40; RegionDate&#40; nMonth, Str&#40; &#58;&#58;nYear, 4 &#41; &#41; &#41; + 1 if nDay > 0 &#46;and&#46; nMonth > 0 // to work with valid dates only &#58;&#58;dStart &#58;= CToD&#40; AllTrim&#40; AllTrim&#40; Str&#40; nDay &#41; &#41;+ "/" + Str&#40; nMonth &#41; &#41; + "/" + Str&#40; &#58;&#58;nYear, 4 &#41; &#41; &#58;&#58;lMove &#58;= &#46;T&#46; &#58;&#58;Refresh&#40; &#46;F&#46; &#41; endif return Super&#58;LButtonDown&#40; nRow, nCol, nKeyFlags &#41; //-----------------------------------------------------------------// METHOD LButtonUp&#40; nRow, nCol, nKeyFlags &#41; CLASS TPickDate if ValType&#40; &#58;&#58;bSelect &#41; == "B" Eval&#40; &#58;&#58;bSelect, Min&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Max&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Self &#41; endif &#58;&#58;lMove &#58;= &#46;F&#46; return Super&#58;LButtonUp&#40; nRow, nCol, nKeyFlags &#41; //-----------------------------------------------------------------// METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; CLASS TPickDate local nMonth &#58;= Int&#40; &#40; nRow - &#58;&#58;nTopStart &#41; / &#40; &#40; &#58;&#58;nHeight - &#58;&#58;nTopStart &#41; / 13 &#41; &#41; local nDay &#58;= Int&#40; &#40; nCol - &#58;&#58;nLeftStart &#41; / &#40; &#40; &#58;&#58;nWidth - &#58;&#58;nLeftStart &#41; / 38 &#41; &#41; - ; DoW&#40; RegionDate&#40; nMonth, Str&#40; &#58;&#58;nYear, 4 &#41; &#41; &#41; + 1 local dEnd if nDay > 0 &#46;and&#46; nMonth > 0 // to work with valid dates only dEnd = CToD&#40; AllTrim&#40; Str&#40; nDay &#41; &#41; + "/" + AllTrim&#40; Str&#40; nMonth &#41; &#41; + "/" + Str&#40; &#58;&#58;nYear, 4 &#41; &#41; if ! Empty&#40; dEnd &#41; &#46;and&#46; dEnd != &#58;&#58;dTemp // for reducing continuous refreshes &#58;&#58;dTemp &#58;= dEnd &#58;&#58;dEnd = dEnd &#58;&#58;Refresh&#40; &#46;F&#46; &#41; if ValType&#40; &#58;&#58;bChange &#41; == "B" Eval&#40; &#58;&#58;bChange, Min&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Max&#40; &#58;&#58;dStart, &#58;&#58;dEnd &#41;, Self &#41; endif endif endif return Super&#58;MouseMove&#40; nRow, nCol, nKeyFlags &#41; //-----------------------------------------------------------------// function RegionDate&#40; nMonth, cYear &#41; return CToD&#40; "01/" + AllTrim&#40; Str&#40; nMonth &#41; &#41; + "/" + cYear &#41; //-----------------------------------------------------------------// // LightColor&#40;nDegrade,nColor&#41; para degradar o suavisar color #pragma BEGINDUMP #include <Windows&#46;h> HARBOUR HB_FUN_LIGHTCOLOR&#40; &#41; &#123; COLORREF lColor = hb_parnl&#40;2&#41;; LONG lScale = hb_parni&#40;1&#41;; long R = MulDiv&#40;255-GetRValue&#40;lColor&#41;,lScale,255&#41;+GetRValue&#40;lColor&#41;; long G = MulDiv&#40;255-GetGValue&#40;lColor&#41;,lScale,255&#41;+GetGValue&#40;lColor&#41;; long B = MulDiv&#40;255-GetBValue&#40;lColor&#41;,lScale,255&#41;+GetBValue&#40;lColor&#41;; hb_retnl&#40; RGB&#40;R, G, B&#41; &#41;; &#125; #pragma ENDDUMP [/code:bj51cscf]
Calendario anual
Alfredo,Gracias por las mejoras a la Clase TPickDate que hemos desarrollado entre Otto y FiveTech <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Calendario anual
Antonio:¿Por qué no creas un planning a partir de esa clase?. Sería una característica muy buena para la próxima build.
Calendario desplegado desde recurso
Hola a todos Cómo se obtiene el valor del calendario desplegado? [img:w8tk0dk5]http&#58;//200&#46;58&#46;176&#46;148/paquetes/calendario&#46;jpg[/img:w8tk0dk5] que al seleccionar el día luego dar aceptar tome el valor. [code=fw:w8tk0dk5]<div class="fw" id="{CB}" style="font-family: monospace;"><br />fDia:=Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">REDEFINE</span> DTPICKER oFec <span style="color: #0000ff;">VAR</span> fDia <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oFec:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>fDia<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp;</div>[/code:w8tk0dk5] No cambia el valor Gracias por la ayuda Saludos Adhemar
Calendario en un Get de Fecha
Estimados Existe alguna funcion que en un Campor Get de Fecha tenga el icono de calendario ? gracias salu2 david argentina
Calendario en un Get de Fecha
Hola David Hay Varias funciones de fecha y de calculadoras para ser usadas en los Gets, pero son de terceros. Pero hay una en que viene en el FWH\SAMPLES Set include "fivewin.ch" set include "dtpicker.ch" Local Xfein . . . @1,1 DTPICKER Xfein of oDlg lo utilizas como un get, espero que sea lo que buscas. Dioni, Lima Peru
Calendario en un Get de Fecha
Muchas gracias amigo... Una consulta, con esa clase, pierdo la capacidad de cargar la fecha como el Get normal de una fecha, ose a medida que escriba dicha fecha pase desde dia al mes sin correrme con la fecha ? gracias david argentina
Calendario en un Get de Fecha
David, [code=fw:gy2abg9a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> dFecha <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@d"</span> <span style="color: #0000ff;">ACTION</span> fechas<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> BITMAP <span style="color: #ff0000;">"CALENDARIO"</span></div>[/code:gy2abg9a] fechas es una función donde desplegaras el calendario o una que ya tengas elaborada.
Calendario en un Get de Fecha
William En la Funcion Fecha() cómo mostraria el calendario que muestra el Datepicker? Gracias por la ayuda Saludos Adhemar
Calendario en un Get de Fecha
Adhemar, Propiamente no seria el DATEPICKER. Pero podría ser el calendario que hay varios de terceros o puedes hacer el propio. es cuestión de buscarle cual calendario queda.
Calendario en un Get de Fecha
Gracias, distinguido Saludos Adhemar
Calendario integrado a Google Calendar
El ejemplo no es funcional. Saludos
Calendario integrado a Google Calendar
¡Hola Recientemente se han desarrollado un calendario integrado con el calendario de Google Fue desarrollado utilizando el método de autenticación OAuth 2.0 Google que es la nueva forma de autenticación para utilizar Google simbólico. Algunas de las imágenes: Permiso: [img:hkxsejs0]http&#58;//imagizer&#46;imageshack&#46;us/v2/640x480q90/922/IjvZTb&#46;jpg[/img:hkxsejs0] Pantalla de inicio: [img:hkxsejs0]http&#58;//imagizer&#46;imageshack&#46;us/v2/640x480q90/921/81RT2K&#46;jpg[/img:hkxsejs0] Detalles: [img:hkxsejs0]http&#58;//imagizer&#46;imageshack&#46;us/v2/640x480q90/921/dswGwA&#46;jpg[/img:hkxsejs0] La aplicación completa tiene el control con base de datos local. La plena aplicación tiene control con la base de datos local. Para mysql está listo, pero es fácilmente adapdata a cualquier otro tipo de base de datos (DBF, Postgres, etc). Estoy vendiendo el código de la aplicación para poder incluir el orden del día en su aplicación El método de autenticación OAuth 2.0 se puede utilizar para cualquier otra integración con Google. Para ejecutar el modo DEMO: * Debe crear un proyecto API de Google: [url:hkxsejs0]https&#58;//console&#46;developers&#46;google&#46;com/apis/[/url:hkxsejs0] * Habilitar la API de Google Calendar * Crear credenciales "ID de cliente de OAuth 2.0." En tipo de aplicación, elegir la opción "Otros". * Ejecutar descargar el archivo JSON y cambie su nombre por "client_id.json". * Ponga junto con la solicitud ** Para facilitar la aplicación del modo de demostración, me puse mi archivo "CLIENT_ID.JSON" para descargar. Pero es por un período limitado. Descargar: [url:hkxsejs0]https&#58;//bitbucket&#46;org/wmanesco/schedule/downloads/client_id&#46;json[/url:hkxsejs0] Para comprar el código de correo electrónico para <!-- e --><a href="mailto:manesco.william@gmail.com">manesco.william@gmail.com</a><!-- e --> Cualquier problema o duda, enviar correo electrónico o responder aquí Gracias Descargar: [url:hkxsejs0]https&#58;//bitbucket&#46;org/wmanesco/schedule/downloads/Schedule&#46;rar[/url:hkxsejs0]
Calendario integrado a Google Calendar
Ese error está pasando? Publica aquí para ver
Calendario integrado a Google Calendar
Para facilitar la aplicación del modo de demostración, me puse mi archivo "CLIENT_ID.JSON" para descargar. Pero es por un período limitado. [url:3uvb11xv]https&#58;//bitbucket&#46;org/wmanesco/schedule/downloads/client_id&#46;json[/url:3uvb11xv]
Calendario integrado a Google Calendar
Ahora si funciona. Saludos
Calendario integrado a Google Calendar
Este archivo debe ser generado para cada aplicación. Es a través de él que es controlado para limitar la búsqueda por día, si no me equivoco es de 1.000.000 de consultas por día. También tiene la opción de no usar un archivo y obtener la información necesaria y mantenemos fijas en el código.
Calendario para dias festivos
Amigos: Necesito mostrar un calendario de 12 meses en donde el usuario pueda seleccionar los días festivos del año. He visto que en Pelles existe un control llamado CALENDAR, alguien lo ha usado? tendrá un ejemplo? También he visto la clase TCalex (me parece que es de Daniel García) pero creo que va más orientado a crear agendas, o me equivoco?, y no es precisamente lo que necesito. Saludos
Calendario...
Hola a todos... Me gustaria saber si existe alguna clase para mostrar un pequeño calendario y como debo usarla.... Saludos y gracias.. Elías Torres.
Calendario...
Puedes usar DatePicker, busca en la ayuda DTPicker y veras como usarlo. Utiliza el calendario del sistema y es lo mas rapido y elegante. Yo hice una adaptación de MsgDate de FiveWin, es bastanten mas lento que DatePicker, aunque me permite un mayor control. La verdad es que no la suelo usar, pero por si te vale aqui tienes el fuente. [code:1a3ynyof]//--------------------------------------- FUNCTION MsgDate&#40; dDate, cPrompt,oGet &#41; //---------------------------------------- local oDlg, oFont, oCursor, dSelect local nRow, nCol, nMonth, aMonths&#58;=&#123;&#125;,nYear,cDay&#58;=' ' local cOldMode &#58;= Set&#40; _SET_DATEFORMAT,; If&#40; __SetCentury&#40;&#41;, "dd/mm/yyyy", "dd/mm/yy" &#41; &#41; IF Empty&#40;dDate&#41; dDate&#58;=Date&#40;&#41; ENDIF FOR nMonth = 1 to 12 AAdd&#40; aMonths, CMonth&#40; CToD&#40; "01/"+padl&#40; nMonth, 2 &#41; + "/98"&#41;&#41;&#41; NEXT nMonth nMonth &#58;= Month&#40; dDate &#41; nYear &#58;= Year&#40;dDate&#41; dSelect &#58;= dDate DEFINE FONT oFont NAME GetSysFont&#40;&#41; SIZE 0, -10 DEFINE DIALOG oDlg SIZE 200, 190 TITLE cPrompt FONT oFont // -> 6 weeks oDlg&#58;SetText&#40;IF&#40;cPrompt==NIL,dDateToString&#40; dDate &#41;,cPromt&#41;&#41; @ 0&#46;32, &#46;70 COMBOBOX nMonth ITEMS aMonths SIZE 40,90 OF oDlg ; ON CHANGE MoveCalendar&#40;oDlg, 1, nMonth &#41; @ 6&#46;6, 60 BTNBMP PROMPT "-" SIZE 8,8&#46;3 ACTION &#40; MoveCalendar&#40;oDlg, 3 &#41;&#41; @ 6&#46;6, 86 BTNBMP PROMPT "+" SIZE 8,8&#46;3 ACTION &#40; MoveCalendar&#40;oDlg, 4 &#41;&#41; @ 0&#46;42, 8&#46;7 GET nYear PICTURE "9999" SIZE 14, 9 OF oDlg WHEN &#46;F&#46; ATail&#40; oDlg&#58;aControls &#41;&#58;Cargo = "YEAR" dDate-= Day&#40; dDate &#41; - 1 while DoW&#40; dDate &#41; != 2 // Monday dDate -- enddo FOR nCol&#58;=1 TO 7 cDay+=SubStr&#40;CDoW&#40;dDate++&#41;,1,3&#41;+Space&#40;4&#41; NEXT dDate-=7 @ 1&#46;3,0 SAY cDay COLOR CLR_WHITE, CLR_HBLUE SIZE 110,6 for nRow = 3 to 8 for nCol = 1 to 7 @ nRow * 10, &#40; nCol * 14 &#41; - 12 BTNBMP ; PROMPT Str&#40; Day&#40; dDate &#41;, 2 &#41; SIZE 12, 10 NOBORDER ; ACTION &#40; dDate &#58;= &#58;&#58;Cargo, oDlg&#58;End&#40; IDOK &#41; &#41; ATail&#40; oDlg&#58;aControls &#41;&#58;Cargo = dDate ATail&#40; oDlg&#58;aControls &#41;&#58;nClrText = If&#40; dDate == Date&#40;&#41;, CLR_HRED,; If&#40; dDate == dSelect, CLR_HBLUE, If&#40; Month&#40; dDate &#41; == nMonth,; CLR_BLACK, CLR_GRAY &#41; &#41; &#41; IF ATail&#40; oDlg&#58;aControls &#41;&#58;Cargo == dSelect ATail&#40; oDlg&#58;aControls &#41;&#58;lPressed = &#46;t&#46; ENDIF dDate++ next next dDate&#58;=dSelect oDlg&#58;Cargo&#58;=dDate ACTIVATE DIALOG oDlg CENTERED ; ON INIT &#40; oDlg&#58;aControls&#91; 3 &#93;&#58;SetFocus&#40;&#41; &#41; IF oGet != NIL oGet&#58;VarPut&#40; If&#40; oDlg&#58;nResult == IDOK, dDate, dSelect &#41; &#41; oGet&#58;Refresh&#40;&#41; ENDIF Set&#40; _SET_DATEFORMAT, cOldMode &#41; RETURN If&#40; oDlg&#58;nResult == IDOK, dDate, dSelect &#41; //---------------------------------------------- STATIC FUNCTION MoveCalendar&#40; oDlg, nMode, nVar&#41; //---------------------------------------------- local dSelect &#58;= oDlg&#58;Cargo local n local nFirstButton &#58;= 0 local nLastButton &#58;= 0 local nDate &#58;= 0 local nSkip &#58;= 0 local nPYear &#58;= 0 local nDay, nMonth, nYear local dWork local nDays &#58;= 0 for n &#58;= 1 TO Len&#40; oDlg&#58;aControls &#41; if oDlg&#58;aControls&#91; n &#93;&#58;ClassName&#40;&#41; == "TBTNBMP" nFirstButton &#58;= If&#40; nFirstButton == 0, If&#40;nSkip<2, 0, n&#41;, nFirstButton &#41; nLastButton &#58;= n nSkip++ oDlg&#58;aControls&#91; n &#93;&#58;lPressed &#58;= &#46;F&#46; endif if ValType&#40; oDlg&#58;aControls&#91; n &#93;&#58;Cargo &#41; == "C" if oDlg&#58;aControls&#91; n &#93;&#58;Cargo == "YEAR" nPYear &#58;= n endif endif next n nDay &#58;= Day&#40; dSelect &#41; nMonth &#58;= Month&#40; dSelect &#41; nYear &#58;= Year&#40; dSelect &#41; do case case nMode == 1 //Cambio de mes nMonth &#58;= nVar case nMode == 3 nYear -- case nMode == 4 nYear ++ ENDCASE dSelect &#58;= CToD&#40; padl&#40; nDay, 2&#41; + "/"+padl&#40; nMonth, 2 &#41; + "/"+right&#40;padl&#40; nYear, 4 &#41;, 2&#41;&#41; WHILE Empty&#40;dSelect&#41; //Retorcede hasta fecha vailida dSelect &#58;= CToD&#40; padl&#40; --nDay, 2&#41; + "/"+padl&#40; nMonth, 2 &#41; + "/" +right&#40;padl&#40; nYear, 4 &#41;, 2&#41;&#41; END cLongDate &#58;= dDateToString&#40; dSelect &#41; oDlg&#58;SetText&#40;cLongDate&#41; oDlg&#58;aControls&#91; nPYear &#93;&#58;VarPut&#40; nYear&#41; dWork &#58;= Ctod&#40; "01/" + padl&#40; nMonth, 2 &#41; + "/" + right&#40;padl&#40; nYear, 4 &#41;, 2&#41;&#41; while DoW&#40; dWork &#41; > 1 dWork -- enddo for n &#58;= nFirstButton TO nLastButton oDlg&#58;aControls&#91; n &#93;&#58;SetText&#40; Str&#40; Day&#40; dWork &#41;, 2 &#41; &#41; oDlg&#58;aControls&#91; n &#93;&#58;Cargo = dWork oDlg&#58;aControls&#91; n &#93;&#58;nClrText = If&#40; dWork == Date&#40;&#41;, CLR_HRED,; If&#40; dWork == dSelect, CLR_HBLUE, If&#40; Month&#40; dWork &#41; == nMonth,; CLR_BLACK, CLR_GRAY &#41; &#41; &#41; if dWork == dSelect oDlg&#58;aControls&#91; n &#93;&#58;lPressed = &#46;T&#46; endif dWork++ next n for n &#58;= 1 TO Len&#40; oDlg&#58;aControls &#41; oDlg&#58;aControls&#91; n &#93;&#58;Refresh&#40;&#41; next n oDlg&#58;Cargo &#58;= dSelect return nil [/code:1a3ynyof] Modo de uso , coloco un boton pequeño a la derecha del GET con el siguiente código. [code:1a3ynyof]REDEFINE BUTTON ID 4 OF oDlg ACTION &#40;MsgDate&#40; dFecha,,oGetFec&#41;&#41;[/code:1a3ynyof]
Calendario...
Gracias Biel, pero tengo un problema a la hora de usarlo.... Vamos a ver si utilizo el código que me has mandado me da un error al compilar algo asi como: "unresolved external symbol HB_FUN_DDATETOSTRING..." es decir que la funcion datetostring() no me la reconoce. Por otro lado no encuentro la ayuda sobre DTPicker....He visto que FW tiene una propia llamada msgdate() pero tampoco me la reconoce. Supongo que a lo mejor tengo que incluir algun "include" pero nose cual es... Saludos. Elías Torres.
Calendario...
Hola Elias, parece que se me olvido de poner la funcion dDateToString. Aqui la tienes. [code:1isv45pv]//------------------------------------ static function dDateToString&#40; dDate &#41; //------------------------------------ local cSay &#58;= CDoW&#40; dDate &#41; + ", " + ; Str&#40; Day&#40; dDate &#41;, 2 &#41; + " " + ; CMonth&#40; dDate &#41; + " " + ; Str&#40; Year&#40; dDate &#41;, 4 &#41; return cSay[/code:1isv45pv] Referente a DTPicker, en Fivewin comands guide, en la pestaña busqueda, dtpicker. [quote:1isv45pv]Include file: DTPICKER.CH Creating a DTPICKER from source code @ <nRow>, <nCol> DTPICKER [ <oDTPicker> VAR ] <uVar> ; [ OF | WINDOW | DIALOG <oWnd> ] ; [ COLOR | COLORS <nClrText> [,<nClrBack> ] ] ; [ SIZE <nWidth>, <nHeight> ]; [ FONT <oFont> ] ; [ DESIGN ] ; [ CURSOR <oCursor> ] ; [ PIXEL ] ; [ UPDATE ] ; [ MESSAGE <cMsg> ] ; [ WHEN <uWhen> ] ; [ VALID <uValid> ] ; [ ON CHANGE <uChange> ] ; [ HELPID | HELP ID <nHelpId> ] Using a DTPicker from a resource Dialog Box REDEFINE DTPICKER [ <oDTPikcer> VAR ] <uVar> ; [ ID <nId> ] ; [ OF | WINDOW | DIALOG <oWnd> ] ; [ HELPID | HELP ID <nHelpId> ] ; [ COLOR | COLORS <nClrText> [,<nClrBack> ] ] ; [ VALID <ValidFunc> ] ; [ FONT <oFont> ] ; [ CURSOR <oCursor> ] ; [ MESSAGE <cMsg> ] ; [ UPDATE ] ; [ WHEN <WhenFunc> ] ; [ ON CHANGE <uChange> ] ;[/quote:1isv45pv] Desde código [code:1isv45pv] LOCAL dTmp&#58;=Date&#40;&#41; @ 1, 1 DTPICKER dTmp SIZE 50, 12 OF oDlg[/code:1isv45pv]
Calendario...
Biel, gracias por la ayuda. Te comento lo que me ocurre... Al utilizar msgdate(), me muestra el calendario, pero al avanzar de mes y luego retroceder, el año me lo cambia y en vez de poner 2007 me pone 1907... Y a parte me da un error en una variable, concretamente en IDOK cuando pulso sobre el dia que quiero, me dice que esa variable no existe. Otra duda que me ha surgido, se supone que ya está implementado la clase msgdate(), pero debo poner todo el codigo en mi programa para que me lo muestre. No me bastaría con llamar a esa funcion solamente?... Alguna sugerencia? Saludos y gracias. Elías Torres.
Calendario...
Hola Elias, incluye las siguientes lineas en tu programa. Al inicio de la aplicacion [code:394n8rk4]Set EPOCH TO 1919[/code:394n8rk4] y en el prg donde hayas colocado los fuentes de msgdate [code:394n8rk4]#define IDOK 1[/code:394n8rk4] Y creo que con esto ya te funcionara correctamente. De todas formas prueba el DTPicker que esta muy bien, y es el calendario nativo del sistema operativo. Referente a lo que comentas de si hace falta incluir los fuentes, pues en la versión que tengo yo de FWPPC que no es la última, msgdate no estaba implementado, por tanto, si es necesario, en la tuya si ya esta implementado, no haria falta incluir los fuentes.
Calendario...
Gracias Biel, probaré lo que me comentas y tambien la otra opcion.. Ya te diré que tal.. Saludos. Elías Torres.
Calendarios Google - Uso
Hola a todos, Estaba pensando en usar la libreria REST para Google de Cristóbal Navarro (gracias Sr. Cristóbal por la conferencia y la librería) Así pues, lo que pretendo es que en mi programa de escritorio se puedan editar las citas y luego se puedan ver y compartir a través de INet. ¿ Como hacerlo ? ¿ Descargando el calendario y editandolo en el escritorio con fwh el calendario y luego subiendo las modificaciones ? Alguna idea, pls. Gracias.
Calendarios Google - Uso
Exactamente como has dicho Has de realizar una interfaz ( UI ) para la introduccion de datos y a partir de ahi enviarlo al calendario Algo asi [img:3p5vj585]https&#58;//s9&#46;postimg&#46;cc/e8ulg4pen/calend1&#46;png[/img:3p5vj585] [img:3p5vj585]https&#58;//s9&#46;postimg&#46;cc/5dtr5m8bz/calend2&#46;png[/img:3p5vj585] Cuando tengas la introducción de datos lo vemos, si necesitas algo mas
Calendarios con agenda
Hola a todos, Cual creeis que es la mejor opcion para un calendario con agenda ? Microsoft Outlook manejado con Ole Google-calendars con su Api Cualquiera de las multiples clases que la gente generosamente ha cedido a este foro. Viendo Microsoft-Outlook veo que tiene de todo, es la pera limonera... y me hace preguntarme que si es el mejor pq usar otro ? Pero quiza tambien sea demasiado complejo o tenga demasiadas cosas.. La TDatePicker que desarrollaron Otto y Antonio Linares tiene la ventaja que ves todo un año en la pantalla y eso me gusta... En fin... que no se que hacer... Saludos
Calendarios con agenda
[quote="hmpaquito":2xlv2qji] La TDatePicker que desarrollaron Otto y Antonio Linares tiene la ventaja que ves todo un año en la pantalla y eso me gusta... En fin... que no se que hacer... Saludos[/quote:2xlv2qji] Primero que nada, has de buscar algo que cubra tus necesidades. Elegir herramientas tan completas como outlook, etc. suele traer la complicación que requiere para un usuario aprender esa herramienta y su funcionamiento. Yo soy de la política de "hacer lo justo y necesario" para las aplicaciones. Es el usuario quien debe decir qué necesita y quiere. Indudablemente con herramientas muy completas y complejas, una aplicación gana mucho valor, pero creo que siempre debemos tener en cuenta que eso trae complejidad de manejo para el usuario. Por otro lado, outlook, google calendar, etc. son herramientas de terceros, lo cual es algo que obliga a una dependencia de terceros, de lo que todos solemos huir como alma que lleva el diablo. Imaginas que mañana Microsoft o Google cambian cualquier tipo de tratamiento en sus herramientas? Mínimo te tocaría recompilar tu aplicación... sino reconstruir un módulo por completo. Yo en este aspecto, el de un calendario con agenda, lo tendría bastante claro, la TDatePicker de Otto y Antonio. La puedes mejorar, modificar y no dependes de terceros, sino de tí mismo, pudiéndole dar la complejidad que quieras al usuario. No te aporto nada más que una simple opinión... Suerte para este 2009!!!!! Saludos!
Calendarios con agenda
triumvirato, Gracias por responder.... La ventaja de usar herramientas tipo Office es que el usuario puede pensar... que programa mas listo tengo que se "entiende" con los programas de Microsoft. Las desventajas: las que tu comentas ! La desventaja del calendar de Otto y Antonio es que hay que hacer un estimable trabajo de programacion y nunca quedara tan "fino" (bonito) como lo de MsOutlook (requeriria mucho trabajo conseguirlo) Saludos [quote="triumvirato":3orryhre][quote="hmpaquito":3orryhre] La TDatePicker que desarrollaron Otto y Antonio Linares tiene la ventaja que ves todo un año en la pantalla y eso me gusta... En fin... que no se que hacer... Saludos[/quote:3orryhre] Primero que nada, has de buscar algo que cubra tus necesidades. Elegir herramientas tan completas como outlook, etc. suele traer la complicación que requiere para un usuario aprender esa herramienta y su funcionamiento. Yo soy de la política de "hacer lo justo y necesario" para las aplicaciones. Es el usuario quien debe decir qué necesita y quiere. Indudablemente con herramientas muy completas y complejas, una aplicación gana mucho valor, pero creo que siempre debemos tener en cuenta que eso trae complejidad de manejo para el usuario. Por otro lado, outlook, google calendar, etc. son herramientas de terceros, lo cual es algo que obliga a una dependencia de terceros, de lo que todos solemos huir como alma que lleva el diablo. Imaginas que mañana Microsoft o Google cambian cualquier tipo de tratamiento en sus herramientas? Mínimo te tocaría recompilar tu aplicación... sino reconstruir un módulo por completo. Yo en este aspecto, el de un calendario con agenda, lo tendría bastante claro, la TDatePicker de Otto y Antonio. La puedes mejorar, modificar y no dependes de terceros, sino de tí mismo, pudiéndole dar la complejidad que quieras al usuario. No te aporto nada más que una simple opinión... Suerte para este 2009!!!!! Saludos![/quote:3orryhre]
Calendário DTPicker em BTNGET é possível ?
Amigos é possível chamar o calendário da classe DTPicker de um BTNGET? EX? REDEFINE BTNGET oget[17] var DATA ID 102 OF oFld resource "LUPA" ACTION( DTPICKER ???? ) <---É POSSÍVEL ? AMIGOS SE FOR POSSÍVEL, COMO DEVO FAZER PARA FUNCIONAR ? AOKISANTOS
Calendário DTPicker em BTNGET é possível ?
up !!!!
Calendário DTPicker em BTNGET é possível ?
up!!!
Calendário DTPicker em BTNGET é possível ?
Antonio não é possível ? <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Call C function from Clipper .PRG
I have created a function in C that I want to call from a PRG clipper code.Clipper Code:[code:2lwt9rwv]MsgInfo&#40; "In Clipper Prog" &#41; &#58;&#58;oRect &#58;= CRect&#40;&#41;&#58;New&#40; GetWorkRect&#40;&#41;, 'Options',,, &#46;t&#46; &#41; // SPI_GETWORKAREA [/code:2lwt9rwv] [b:2lwt9rwv]GetWorkRect() is the function that I have created in C:[/b:2lwt9rwv] [code:2lwt9rwv]#include <extend&#46;api> #include <ClipApi&#46;h> // #include <WinSock&#46;h> #include <fwmsgs&#46;h> typedef struct _RECT &#123; LONG left; LONG top; LONG right; LONG bottom; &#125; RECT; BOOL SystemParametersInfoA&#40; UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni&#41;; /* * GetWorkRect&#40;&#41; * * Wrapper to SystemParametersInfo&#40;SPI_GETWORKAREA,&#46;&#46;&#46; * Retrieves the size of the work area on the primary display monitor&#46; * The work area is the portion of the screen not obscured by the system taskbar * or by application desktop toolbars&#46; The pvParam parameter must point to a RECT * structure that receives the coordinates of the work area, expressed in virtual * screen coordinates&#46; */ CLIPPER GETWORKREC&#40;&#41; // --> &#123; nTop, nLeft, nBottom, nRight &#125; &#123; RECT rct; rct&#46;top = 0; rct&#46;left = 0; rct&#46;bottom = 0; rct&#46;right = 0; #define SPI_GETWORKAREA 48 SystemParametersInfoA&#40;SPI_GETWORKAREA,0,&rct,0&#41;; hb_reta&#40; 4 &#41;; _storni&#40; rct&#46;top, &#40;WORD&#41;-1, 1 &#41;; _storni&#40; rct&#46;left, &#40;WORD&#41;-1, 2 &#41;; _storni&#40; rct&#46;bottom, &#40;WORD&#41;-1, 3 &#41;; _storni&#40; rct&#46;right, &#40;WORD&#41;-1, 4 &#41;; &#125; [/code:2lwt9rwv] [b:2lwt9rwv]When I link using vc98 results are:[/b:2lwt9rwv] [code:2lwt9rwv]c&#58;\dev\pcr5>link @KEYLESS\build\pcrHBH&#46;lnk /nologo /subsystem&#58;windows /force&#58;multiple /NODEFAULTLIB&#58;libcmt /LIBPATH&#58;C&#58;\HarbourM\lib /OUT&#58;C&#58;\DEV\PCR5\KEYLESS\EXE\HB\PCREGW&#46;EXE hbrtl&#46;lib&#40;tgetint&#46;obj&#41; &#58; warning LNK4006&#58; _HB_FUN_GETNEW already defined in FiveHM&#46;lib&#40;TCLIPGET&#46;obj&#41;; second definition ignored hbw32&#46;lib&#40;win_dll&#46;obj&#41; &#58; warning LNK4006&#58; _HB_FUN_CALLDLL already defined in FiveHCM&#46;lib&#40;CALLDLL&#46;obj&#41;; second definition ignored CPCREG&#46;OBJ &#58; error LNK2001&#58; unresolved external symbol _HB_FUN_GETWORKRECT COPYDATA1&#46;obj &#58; error LNK2001&#58; unresolved external symbol "int __cdecl SystemParametersInfoA&#40;unsigned int,unsigned int,void *,unsigned int&#41;" &#40;?SystemParametersInfoA@@YAHIIPAXI@Z&#41; C&#58;\DEV\PCR5\KEYLESS\EXE\HB\PCREGW&#46;EXE &#58; fatal error LNK1120&#58; 2 unresolved externals [/code:2lwt9rwv][b:2lwt9rwv]Question 1:[/b:2lwt9rwv]How do I resolve the unresolved external? I do include the GetWorkRect OBJ file in the link.[b:2lwt9rwv]Question 2:[/b:2lwt9rwv]How do I resolve the problem with SystemParametersInfoA?Just to be sure, I did remove the reference to SystemParametersInfoA and complied the OBJ again. When I link with that OBJ, I only have the first unresolved external _HB_FUN_GETWORKRECT.[b:2lwt9rwv]Question 3:[/b:2lwt9rwv]I'd like to get rid of the warnings, but for now, I'm still able to run the resulting EXE if I delete the code that creates the unresolved Externals up to the point where I call the MsgInfo() function.Thanks, Paul
Call C function from Clipper .PRG
[quote="paulrhanson":3rlc2gq3]Question 2: How do I resolve the problem with SystemParametersInfoA? [/quote:3rlc2gq3]Hi Paul:Here you are a working sample (compiled with xHarbour and borland):[code:3rlc2gq3]#include "FiveWin&#46;ch" function Main&#40;&#41; local oDlg, ; aRect &#58;= GetWorkRect&#40;&#41; DEFINE DIALOG oDlg From 00,00 to 400,500 TITLE "Work Rect" PIXEL OF oDlg COLORS CLR_BLACK,CLR_WHITE @ 10, 10 SAY "1=" + cValToChar&#40; aRect&#91; 1 &#93; &#41; OF oDlg SIZE 50, 10 PIXEL @ 20, 10 SAY "2=" + cValToChar&#40; aRect&#91; 2 &#93; &#41; OF oDlg SIZE 50, 10 PIXEL @ 30, 10 SAY "3=" + cValToChar&#40; aRect&#91; 3 &#93; &#41; OF oDlg SIZE 50, 10 PIXEL @ 40, 10 SAY "4=" + cValToChar&#40; aRect&#91; 4 &#93; &#41; OF oDlg SIZE 50, 10 PIXEL ACTIVATE DIALOG oDlg CENTERED Return nil #pragma BEGINDUMP #include <Windows&#46;h> #include <ClipApi&#46;h> #include <WinUser&#46;h> BOOL WINAPI SystemParametersInfoA&#40; UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni&#41; ; /* * GetWorkRect&#40;&#41; * * Wrapper to SystemParametersInfo&#40;SPI_GETWORKAREA,&#46;&#46;&#46; * Retrieves the size of the work area on the primary display monitor&#46; * The work area is the portion of the screen not obscured by the system taskbar * or by application desktop toolbars&#46; The pvParam parameter must point to a RECT * structure that receives the coordinates of the work area, expressed in virtual * screen coordinates&#46; */ HB_FUNC&#40; GETWORKRECT &#41; // --> &#123; nTop, nLeft, nBottom, nRight &#125; &#123; RECT rct; rct&#46;top = 0; rct&#46;left = 0; rct&#46;bottom = 0; rct&#46;right = 0; SystemParametersInfoA&#40; SPI_GETWORKAREA, 0, &rct, 0 &#41; ; hb_reta&#40; 4 &#41;; _storni&#40; rct&#46;top, -1, 1 &#41;; _storni&#40; rct&#46;left, -1, 2 &#41;; _storni&#40; rct&#46;bottom, -1, 3 &#41;; _storni&#40; rct&#46;right, -1, 4 &#41;; &#125; #pragma ENDDUMP [/code:3rlc2gq3]Regards.Manuel Mercado
Call C function from Clipper .PRG
Dear Mr Mercado,Thanks! I'm rather new at this and have aquired a rather complex set of source code that I'm trying to convert from regular FW to FWH. So I'm learning all at once.Could you please provide for me the method of compile commands and link commands. Do you use the standard Fivetech buildh.bat to compile and link?Thanks again, Paul
Call C function from Clipper .PRG
[quote="paulrhanson":1xt31sbw]Could you please provide for me the method of compile commands and link commands. Do you use the standard Fivetech buildh.bat to compile and link?[/quote:1xt31sbw]Building the posted sample I used the standard BuildX.bat from \fwh\samples. I haven't tried with Harbour (BuildH.bat)Regards.Manuel Mercado
Call Center - Slow Application Launch
[b:248muoxd]Slow Application Launch [/b:248muoxd] When I start my application for the first time after booting the computer (W7 and Linux-Wine) or just reboot the machine, the application needs about 1 to 2 minutes to show the first dialog (main application screen). After then, at each subsequent application start, the first dialog (main application screen) is shown in about 5-6 seconds. On the main application dialog, there are several folders/tabs (about 12). Each folder/tab contains 10-15 buttons. I have an impression that working with many [b:248muoxd]folders/tabs[/b:248muoxd] is quite slow. My machine contains i7 processor and a lot of memory so I would say it is not the processor/memory problem. The same problem on pure W7 machine and on Linux/Wine combination Anyone have an experience with slow running applications which uses folders/tabs? Any suggestion appreciated Thanks [url=http&#58;//www&#46;image-share&#46;com/ijpg-2597-232&#46;html:248muoxd][IMG=http://www.image-share.com/upload/2597/232m.jpg][/url:248muoxd] xHB 2011E , FWH_10.5
Call Center - Slow Application Launch
Dubrabko, Maybe your app manages too much controls, but that should not affect that much. You are using old xHB and FWH versions. I would suggest to upgrade and use the most recent code, and please consider to migrate to Harbour as that could make an important difference. Harbour has greatly improved along these years. All of you should realize that using an old version of xHarbour/Harbour does not help you at all. A lot of work has been done on Harbour (and on FWH) and the current version (3.2) works really fine. I can't say for sure that is the reason of the slowness that you comment, but for sure, you should notice a difference if you use the most recent Harbour and FWH.
Call Center - Slow Application Launch
Slowness is directly related to the memory management, and Harbour has improved so much on that area. Maybe there are other factors too that we may review. But lets first discard that the problem does not come from using those old versions. Thanks
Call Center - Slow Application Launch
Metro Looks like a nice app .. what back end database are you using .dbf or Ado? Rick Lipkin
Call Center - Slow Application Launch
Antonio, Rick Thanks for the quick reply. Application when starting, really works well and quickly Yeah, I'm thinking about crossing the Harbour, but I'm not sure I have a [b:1r1e1bzk]good solution for working with MySQL database[/b:1r1e1bzk]! The first version, works with a PgSQL - (Xbase language) which proved to be slow and unstable. (50 USER, 2 million records). The problem was to work with indexes. So I switched to natural SQL without Xbase language. The second version works with MySQL database and xHarbour use for connection to the database and everything else is the SQL syntax (nErr = osql: exec (cSql, ...))
Call Center - Slow Application Launch
Sharing my experiences: This has nothing to do with FWH, xHb/xHarbour/Harbour. Whatever we use the result will not be much different. Initially sometime is taken to establish connection with the remote server, opening some tables and reading some data necessary to start the initial main window. It is here the delay occurs and we need to optimize this part. This time mostly depends on the connection speeds, the amount of data we read. We should be *extremely* cautious when dealing with huge tables. When opening very large tables, never to open without where clause so that only a small subset is read. We need to measure the time it takes from "function Main()" till "ACTIVATE WINDOW/DIALOG". This is the time we need to optimize and this has nothing to do with fwh or (x)Harbour. This may depend on what library we are using to communicate with the Sql server and what are we doing initially (what tables we are opening and reading). Even after the best optimization, this process does take a few seconds, and even that delay is not acceptable for good user experience. In such cases we can adopt one the following strategies suitable to our application. 1. Display a progress message while doing the initial setup. Or display a logo and in the background do the initial setup. 2. Display the main window without data and display progress messase while doing the initial setup.
Call Center - Slow Application Launch
Yes, I agree with Rao. What he explains makes perfect sense and I missed to consider it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Call Center - Slow Application Launch
Rao, Thank you for your experience I will describe the flow of the program: [code=fw:247e56tu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />/ / ----------------------------<br /><span style="color: #00C800;">Function</span> Main <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;InitSys <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DefTableName <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> TestConecction <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> SysLogin <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MainApp <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; / / Msg<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span><br />&nbsp; &nbsp;/ / ----------------------------<br />&nbsp; &nbsp;MainApp <span style="color: #00C800;">function</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndCRM<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWndCRM <span style="color: #0000ff;">TO</span> cMesage &nbsp;<span style="color: #B900B9;">//x ---------------> &nbsp;With this message I am presenting the message of progress</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> <span style="color: #0000ff;">ON</span> oWndCRM DefDlg <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span><br />&nbsp; &nbsp;/ / ----------------------------<br />&nbsp; &nbsp;DefDlg <span style="color: #00C800;">function</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"PHONENEW_WIDE"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">ID</span> xxx <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// x ------------------------------> Here's delay</span><br />&nbsp; &nbsp; &nbsp; &nbsp;Def_Fold1 <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// x ------------------------------> or here</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;Def_Fold1 <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//x ------------------------------> or here</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//...</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;Def_Fold16 <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span><br />&nbsp; &nbsp;/ / ----------------------------<br />&nbsp;</div>[/code:247e56tu] The delay is always at forming Folder! In the first version (PgSQL) I used (xHarbour) and accessing the tables on Xbase way. As dbf-bases (So-open, seek, append, reclock, ....) And then that happened, just what you are suggesting. Very slow and unstable. In the second version (MySQL) using xHarbour exclusively for connection to the server (localhost, network, remout-SSH). manipulation of data across functions [b:247e56tu]nErr = osql: exec (cSql, ...)[/b:247e56tu], where cSql pure SQL syntax. I work exclusively with the array. It works very fast and stable. I think it is well settled with the notification: SET MESSAGE OF oWndCRM TO cMesage Best regards
Call Center - Slow Application Launch
Initial setap is completely finished, and the connection to the database until it comes to SysLogin() functions . [url=http&#58;//www&#46;image-share&#46;com/ijpg-2598-179&#46;html:1vp7a13g][IMG=http://www.image-share.com/upload/2598/179m.jpg][/url:1vp7a13g] [i:1vp7a13g]2-Display the main window without data and display progress messase while doing the initial setup.[/i:1vp7a13g] The main window is formed without data. I just checked the log-in username / password.
Call Center - Slow Application Launch
Dubrabko, A possible solution is not to redefine all the controls in all the folder pages at the same time: 1. Just build the first page (the one that it is visible). 2. When a different folder tab is clicked, then you could check if it has been defined such folder tab (use a static variable or so to control it, or check if oFld:aDialogs[ x ] length is zero) and then redefine it. This way you don't build everything at once. I have not tested it myself, but it should work. Please try it and if you get troubles, then I will explain you an alternative way to redefine the controls in each tab (the idea would be to use Class TFolder METHOD LoadPages( aResNames, bRedefineControls ))
Call Center - Slow Application Launch
Antonio, I created only one folder, but the problem is about the same. After reset the computer, the first time delay 4 min and every next start almost immediately. [url=http&#58;//www&#46;image-share&#46;com/ijpg-2600-42&#46;html:2weiuz57][IMG=http://www.image-share.com/upload/2600/42m.jpg][/url:2weiuz57] Best regards Dubravko Basic
Call Center - Slow Application Launch
[quote="metro":1gb9pbir]Antonio, I created only one folder, but the problem is about the same. After reset the computer, the first time delay 4 min and every next start almost immediately. [url=http&#58;//www&#46;image-share&#46;com/ijpg-2600-42&#46;html:1gb9pbir][IMG=http://www.image-share.com/upload/2600/42m.jpg][/url:1gb9pbir] Best regards Dubravko Basic[/quote:1gb9pbir] You are showing some data in the browse box on left. How are you reading the data? From what table? What is your Sql?
Call Center - Slow Application Launch
Rao, The system works with a MySQL database. There are several modes of operation. 1 - Free Mode The agent logs on to the system and gain FrontEnd [url=http&#58;//www&#46;image-share&#46;com/ijpg-2600-81&#46;html:184o2pxp][IMG=http://www.image-share.com/upload/2600/81m.jpg][/url:184o2pxp] From the admin gets the task (Combobox - contry, Conty, Town addres ... etc). Once selected, press the button Refresh. The program is only now reads data from a table and displays the brows. 2 - Job Mode Agent when logging select job that will work. [url=http&#58;//www&#46;image-share&#46;com/ijpg-2600-80&#46;html:184o2pxp][IMG=http://www.image-share.com/upload/2600/80m.jpg][/url:184o2pxp] Applications, before forming folder prepare array data (arraj variable is public). By measuring I found that it takes a very short time. After logging gain FrontEnd: [url=http&#58;//www&#46;image-share&#46;com/ijpg-2600-42&#46;html:184o2pxp][IMG=http://www.image-share.com/upload/2600/42m.jpg][/url:184o2pxp] The problem exists in both modes of operation. This is the SQL query - Mode 1 cComm: = "SELECT salutation, first_name, last_name, title, account_name,email1,primary_address_street,primary_address_city,primary_address_postalcode,id,phone_home,phone_mobile,phone_work,phone_other "+; "FROM" + cLeads + "" +; "WHERE" cWhereQ + + "" +; "ASC" Best regards Dubravko Basic
Call Center - Slow Application Launch
I see that all the time taken is for reading data from the tables. You need to optimize this area. Keep aside all windows and dialogs and folders. Just write small code to read the data and optimize on the speeds. After that you incorporate the windows/folders, etc. One hint: There will never be any major delays with fwh/(x)Harbour. Any major delay is only due to time taken to read data. I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses. For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT. By the way we do not know what are you using to connect to MySql server. Are you using ADO or TMySql or TDolphin?
Call Center - Slow Application Launch
Rao, Thanks for your reply [i:8jg3s4dl]1) I see that all the time is taken for reading data from the tables. You need to optimize this area.[/i:8jg3s4dl] The data is read into an array and what you see in the picture is the brows array. Not all the time. [i:8jg3s4dl]2) Keep aside all windows and dialogs and folders. Just write small code to read the data and optimize on the speeds. After that you incorporate the windows / folders, etc..[/i:8jg3s4dl] Exactly read data [i:8jg3s4dl]3) One hint: There will never be any major delays with FWH / (x) Harbour. Any major delay is only due to time taken to read the data.[/i:8jg3s4dl] No. MySQL has a very good set Index. Speed ??data retrieval is measured and it is very good. [i:8jg3s4dl]4) I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses. For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT.[/i:8jg3s4dl] Yes. The database is very large. I have optimized the MySQL server to work with large data. [i:8jg3s4dl]5) By the way we do not know what are you using to connect to MySQL server. Are you using ADO or TMySql or TDolphin? [/i:8jg3s4dl] I use xHarbour SQL RDD. Connection of the base can be seen: [url:8jg3s4dl]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=25346&p=139607&hilit=ssh%20#p138353[/url:8jg3s4dl] I mentioned, I'm on line at the base constantly, but the data read (or insert, update) when we need to. Browse array only, not the database (table). The problem is that after a reset or when the computer is turned on, the formation of the app is about 4 minutes, and all other activation apps are fast! Does the problem would be to cache or something? Best regards D. Basic
Call Center - Slow Application Launch
Antonio, Rao After a more detailed analysis, I found the problem. Actually, there are two things that affect the above problem. [b:1bem7tzw]After the formation of the folder[/b:1bem7tzw], perform all the functions listed in COMOBOX ... ON CHANGE funx() Function funx() is actually a SQL query. I assume that this function is executed only when changing the ComboBox, not when defining folder. The solution is the variable that changed after the first start. Another thing is the SQL query. When executed for the first time, takes on a large base for a long time. Another time, when he executed the same query is already cached and executed significantly shorter. By optimizing queries and good indexing applications work very well with large databases. Summary, Mr. Rao, you're absolutely right. Dubravko Basic
Call Center - Slow Application Launch
I didn't see this before, but from your original description, my first thought would be that the app is slow the first time because you have just started the computer. Is it still running background processes ? Leave it on all the time and see what happens when you enter the program for the first time the next day. Windows has a lot of background work today when first started. This includes updating, backups, and far more. I find it takes a lot of time from the CPU. Even though it has an i7, my understanding is that most work will still be done by one processor unless the tasks are specifically written to take advantage of the others ( info drawn from some Microsoft posts ). Tim
Call Center - Slow Application Launch
Tim I tried to explain the whole problem (now that I know what is causing the slowness of the app) starting from the MySQL database. When you turn on the computer I start the MySQL database (localhost). Cash in the database is empty. If I send a SQL query on a large table, the first time you are running, the response I get for example 50 sec. When I send the same query again, the response I get for example, 1.2 sec. The reason is cached internally in the MySQL database. When I start the program, in the folder there are several ComboBox and ... ON CHANGE FunX (); Function FunX() real SQL query that acts as above. So, in that sense, and application had delay! [b:22v8ptit]I presumed,[/b:22v8ptit] to be executed FunX() when defining the ComboBox I solved the problem so it does not authorize the execution of the function while the application is not fully formed, and of course, optimizing SQL queries and good indexing. Of course, Windows is doing everything in the background, but that's not the problem here. Dubravko Basic
Call HTML form in FWH application
I would like to display an HTML form from within a Win32 Desktop application ( NOT MOD_HARBOUR PLEASE ) From a website the following is called: <form name=”PrePage” method = “post” action = “https://SourceServer.com/payment/Catalog.aspx”> <input type = “hidden” name = “LinkId” value =”jiehiu378208kijfiiuie” /> <input type = “image” src =”//content.SourceServer.com/images/getit.gif” /></form> Though I use this on my server now, hackers are trying to access it. The last time they did it, they diverted payments to their PayPal account ( knowing PP lets them get away with the theft ). I want to remove the "Store" from my website completely and have the access only in my application which is NOT web based.
Call HTML form in FWH application
Tim, I don't think I completely understand the ask. What exactly do you want to be able to do from your application?
Call HTML form in FWH application
On a website, I define a popup form with the code I provided. That links to a secured credit card gateway. It is an HTML form. I want to have a menu option in my program that will popup the same form. Yes, it would display it in the default web browser on that computer, and the individual would then process the form ( on that same browser ). I need to pass that entire script to the web browser from within the program. Right now it's easy to call websites, but I don't pass all the extra information. For Example: ACTION ShellExecute( nil, "open", "http://fivetech.com" ) will open that website, but how can I pass the data above to open a form in the browser ?
Call HTML form in FWH application
Tim, I was also looking for showing html from FW and I found this function on the forum and was playing with it. I put your form insite the html file you have to put in the samples dir of you choise (change the path in the prg) It seem to put the data into the form, but dos not send. It can however be a starting point from where to look. [code=fw:pnz8yl47]<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: #00D7D7;">#Define</span> OLECMDID_PRINT <span style="color: #000000;">6</span><br /><span style="color: #00D7D7;">#Define</span> OLECMDEXECOPT_PROMPTUSER <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#Define</span> OLECMDEXECOPT_DONTPROMPTUSER <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oWnd, oActiveX1, oActiveX2, cTemp<br /><br />   cTemp = <span style="color: #ff0000;">'<head><link rel="stylesheet" href="temp.css"></head><table class="styled-table"><thead><tr><th>36</th><th>38</th>'</span><br />   cTemp += <span style="color: #ff0000;">'<th>40</th><th>42</th><th>44</th></tr></thead><tbody><tr><td></td><td>1</td><td>1</td><td>1</td><td>2</td></tr></tbody></table>'</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"FiveWin multiple ActiveX support"</span><br /><br />   <span style="color: #B900B9;">//@ 10, 10 ACTIVEX oActiveX1 PROGID "Shell.Explorer" OF oWnd SIZE 500, 150</span><br />   @ <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&OK"</span>     <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>  <span style="color: #0000ff;">ACTION</span> drukhtml<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #B900B9;">//oActiveX1:Do( "Navigate2", "c:\fwharb\samples\temp.html" )</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> drukhtml<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  cHtml:= <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wharb<span style="color: #000000;">\s</span>amples<span style="color: #000000;">\t</span>emp.html"</span><br />  printhtml<span style="color: #000000;">&#40;</span>cHtml,<span style="color: #000000;">1</span>,.t.<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PrintHtml<span style="color: #000000;">&#40;</span>cHtmlOrUrl,nCopies,lShow<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">static</span> oWnd1:=<span style="color: #00C800;">nil</span>, oBar, oIe<br /><span style="color: #00C800;">local</span> i<br /><span style="color: #00C800;">default</span> lShow:=.f.,nCopies:=<span style="color: #000000;">1</span><br /><span style="color: #00C800;">if</span> oWnd1=<span style="color: #00C800;">nil</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd1<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Print'</span><br /><span style="color: #00C800;">endif</span><br />oIe = TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWnd1, <span style="color: #ff0000;">"Shell.Explorer"</span> <span style="color: #000000;">&#41;</span><br />oIe:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate2"</span>, cHtmlOrUrl<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">if</span> lshow<br />oWnd1:<span style="color: #000000;">oClient</span> = oIe<br />ShowWindow<span style="color: #000000;">&#40;</span>oWnd1, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> && <span style="color: #000000;">1</span>=Show,<span style="color: #000000;">0</span>=hide<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1<br />oWnd1:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />sysrefresh<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 /><br /><br /><span style="color: #00C800;">FUNCTION</span> PrintHtml2<span style="color: #000000;">&#40;</span>cHtmlOrUrl,nCopies,lShow<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">static</span> oWnd:=<span style="color: #00C800;">nil</span>, oBar, oIe<br /><span style="color: #00C800;">local</span> i<br /><span style="color: #00C800;">default</span> lShow:=.f.,nCopies:=<span style="color: #000000;">1</span><br /><span style="color: #00C800;">if</span> oWnd=<span style="color: #00C800;">nil</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Print'</span>;<br /><span style="color: #0000ff;">ACTION</span> oIe:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ExecWB"</span>, OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER <span style="color: #000000;">&#41;</span><br />oIe = TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWnd, <span style="color: #ff0000;">"Shell.Explorer"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />oIe:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate2"</span>, cHtmlOrUrl<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> alltrim<span style="color: #000000;">&#40;</span>oIe:<span style="color: #000000;">document</span>:<span style="color: #000000;">readyState</span><span style="color: #000000;">&#41;</span> <> <span style="color: #ff0000;">'complete'</span><br />sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />waitseconds<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">enddo</span><br /><span style="color: #00C800;">if</span> lshow<br />oWnd:<span style="color: #000000;">oClient</span> = oIe<br />ShowWindow<span style="color: #000000;">&#40;</span>oWnd, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> && <span style="color: #000000;">1</span>=Show,<span style="color: #000000;">0</span>=hide<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />oWnd:<span style="color: #0000ff;">Center</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;">for</span> i=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nCopies<br />msgwait<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Printing large receipt ('</span> + alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">' of '</span>+alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nCopies<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">' copies).'</span>,,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />oIe:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ExecWB"</span>, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span> i<br /><span style="color: #00C800;">endif</span><br />sysrefresh<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 /><br /> </div>[/code:pnz8yl47] temp.html has folowing code inside : <form name=”PrePage” method = “post” action = “https://SourceServer.com/payment/Catalog.aspx”> <input type = “hidden” name = “LinkId” value =”jiehiu378208kijfiiuie” /> <input type = “image” src =”//content.SourceServer.com/images/getit.gif” /></form>
Call HTML form in FWH application
Perhaps write the .html to a local file then pass that file name into ShellExecute(), instead of a url, and depend on Windows default file handler to open in the browser based on file extension.
Call HTML form in FWH application
[quote:3pz9i5ab]I was also looking for showing html from FW and I found this function on the forum and was playing with it.[/quote:3pz9i5ab] Please consider using the built-in FWH function [code=fw:3pz9i5ab]<div class="fw" id="{CB}" style="font-family: monospace;"><br />HTMLVIEW<span style="color: #000000;">&#40;</span> cHtmlFile <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// give full path of the file</span><br />&nbsp;</div>[/code:3pz9i5ab]
Call HTML form in FWH application
[quote="nageswaragunupudi":ut0j47cw][quote:ut0j47cw]I was also looking for showing html from FW and I found this function on the forum and was playing with it.[/quote:ut0j47cw] Please consider using the built-in FWH function [code=fw:ut0j47cw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />HTMLVIEW<span style="color: #000000;">&#40;</span> cHtmlFile <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// give full path of the file</span><br /> </div>[/code:ut0j47cw][/quote:ut0j47cw] Works also for me ! But is seems that just as the other option that HTMLVIEW also needs a file with a Path and HTML code inside it to work. Ok for viewing links, websites,... I my case I browse a Xbrowse that has a field inside a memo that has HTML code to build a table based on data. So, when moving the browse, I want the dialog where the html is showing to refresh with new data For now I think I can move the browse, save the htmlcode to a file and then call the htmlview with the updated htmlcode. Should work, but maybe there can be updated function that will show plain html data from a variable data. When cTemp = used, htmlview will also startup google and give a result of a google seek for the code (cTemp = used as a seeking parameter) [code=fw:ut0j47cw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> htmlzien<span style="color: #000000;">&#40;</span>cFile,oWnd1<span style="color: #000000;">&#41;</span><br />   cTemp = <span style="color: #ff0000;">'<head><link rel="stylesheet" href="temp.css"></head><table class="styled-table"><thead><tr><th>36</th><th>38</th>'</span><br />   cTemp += <span style="color: #ff0000;">'<th>99</th><th>42</th><th>44</th></tr></thead><tbody><tr><td></td><td>1</td><td>1</td><td>1</td><td>2</td></tr></tbody></table>'</span><br /><br />  htmlview<span style="color: #000000;">&#40;</span>cTemp<span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//  htmlview(cTemp,"Titel",oWnd1,10,10,400,350)</span><br />  <span style="color: #B900B9;">//htmlview(cFile,"Titel",oWnd1,10,10,400,350)</span><br /><br /><span style="color: #00C800;">Return</span><br /><br /> </div>[/code:ut0j47cw]
Call HTML form in FWH application
Tim, ACTION ShellExecute( nil, "open", "http://www.fivetechsoft.com?param1=Tim&param2=Stone" ) The above issues a "GET" request as the params go on the URL after the "?" If you want those params not to be seen on the URL then you have to use "MSXML2.XMLHTTP" or CURL to do a "POST" request
Call Help from ? on dialog
Hi, I have help files called either from a menu or by pressing F1 but would like to use the ? on the system menu of a dialog (created in an .rc file) to also call the relevant help file. What command or code should I use? Thanks in advance Gary
Call Help from ? on dialog
Hello Gary, have a look at FWH - samples => [color=#FF0000:1jfep3on]Newhelp.prg[/color:1jfep3on] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Call a Dll from an Exe
I have setup a simple exe and dll. I am attempting to dynamicly call a dll from an exe. In my simple example I am calling the dll and execution is passing to the Dll no problem. However, when the dll returns, execution ends, and does NOT resume in the exe as I would suspect. I am using the fwh\samples\tutor01.prg as the dll example, and I am using the testdll.prg as the exe. My environment is xharbour 0.99.51 - fwx v2.6 using borland compiler.Can anyone point me in the proper direction on this issue?Any help is greatly appreciated.
Call a Dll from an Exe
Don,What build...bat are you using to build the DLL ?Is it a pcode only DLL or a self contained DLL ?
Call a Dll from an Exe
What build...bat are you using to build the DLL ? I modified the buildhd.bat in the fivewin samples to adher to my environment - did not change any compile / link switches.I am attempting to create a self contained dll.
Call a Dll from an Exe
Don,Here it is working fine using FWH 8.06 and current xHarbour provided with it. Here you have the EXE and the DLL, so you can test it yourself:<!-- m --><a class="postlink" href="http://www.mediafire.com/?hwwlfmibi1u">http://www.mediafire.com/?hwwlfmibi1u</a><!-- m -->
Call a Dll from an Exe
Antonio - Thank you for the quick response and sample.This example works great <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Can you send the source - and scripts used to make/link?This is exactly what I am atempting, however - my exe never gets control back after the dll return.Thank you for your help
Call a Dll from an Exe
Don, I used the same sources as you: the ones from fwh\samples without modifying them:[code:3cosdfvb] #include "FiveWin&#46;ch" function Main&#40;&#41; HbDLLEntry&#40; "MAIN" &#41; MsgInfo&#40; "ok from EXE" &#41; return nil DLL FUNCTION HBDLLENTRY&#40; cProc AS LPSTR &#41; AS LONG PASCAL LIB "Tutor01&#46;dll" [/code:3cosdfvb]I guess the differences come from the different xHarbour build that we are using. I suggest you to upgrade to the most recent FWH and xHarbour.
Call a Dll from an Exe
Antonio - Thank you for the assistance. The most current xHarbour we have is v1.0 - with FWH v7What versions are you using?I also noticed in the scripts a reference to maindll.objI do not have this module - what is it?Thanks again for all your help
Call a Dll from an Exe
Don,We are using current FWH 8.06 with the xHarbour (June 2008) published on these forums in <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=2486">http://fivetechsoft.com/forums/viewtopic.php?t=2486</a><!-- m -->maindll.obj is a Harbour/xHarbour module, that it is not included by default in the setup file. Here you have it:<!-- m --><a class="postlink" href="http://rapidshare.com/files/123510556/maindll.obj.html">http://rapidshare.com/files/123510556/maindll.obj.html</a><!-- m -->
Call a Dll from an Exe
Hi Antonio i have the same problem with tutor01.prg and testdll.prg using the buildhd.bat. I DONT HAVE THE FILE NAMED MIANDLL.OBJ, SO I REM THE LINE BUT.... It runs the DLL but does not cam back in the EXE file. Any solution for me ? FWH 8.1 HARBOUR 1.01 (build. 9361)
Call a Dll from an Exe
Hi to all, can sameone very kkkiiiinnnnddddlllyyyy pass me the maindll.obj ? Tks
Call a Dll from an Exe
Romeo, Files names have been changed in Harbour, here you have what it is available now: [url:2x54i4gd]http&#58;//www&#46;mediafire&#46;com/file/mijlz2nhol1/maindllh&#46;obj[/url:2x54i4gd] [url:2x54i4gd]http&#58;//harbour-project&#46;svn&#46;sourceforge&#46;net/viewvc/harbour-project/trunk/harbour/src/vm/[/url:2x54i4gd]
Call a Dll from an Exe
Romeo, I think it is going to be much more convenient and easier for you if you upgrade to the most recent Harbour version and also if you use HRB files instead of DLL files. There have been so many changes in Harbour.
Call a FWH program from another and leave it open (SOLVED)
How can I call a FiveWin program from another and leave it open ? For example: 1. Program A calls program B 2. Program B opens and STAYS open but control returns to A 3. Program A closes but B is left open.Thank you.RUN /B /I START program.exeStart is a Windows command.
Call a FWH program from another and leave it open (SOLVED)
I think WinExec( 'program.exe' ) does the same thing.
Call a NAS over a VPN connection
Hello, Can we open a VPN connection from FWH ? There is a FWH program on laption's that needs to connect via VPN to a NAS, Once connection is ok, connect to a database. We can do it step by step, by clikking on the icons, but can we also do all this from insite the FWH program?
Call a function periodically
Hi all, Is there a way to call a function periodically throughout the execution of an application. Thank you ! Regards,
Call a function periodically
Take a look at FW\samples\testtim4.prg
Call a function periodically
Thank you james!
CallDLL() & GetProcAddress().
Hola , buen dìa En 32 bits se usan CallDLL() y GetProcAddress(). Y en 64 ? Saludos
CallDll32 funny
Hi Antonio I have a Fwh and xHb aplication using latest Sept/Oct2006 Fw28/xHb This app call the tMutex.prg class Create method below. The tMutex create method calls CallDLL32(.....). In my application when CallDLL32 is called, i get a pop up msgalert "CallDll32", with a title of "calldll.c". I have tracked this down to \fwh\source\winapi\calldll.c which contains #ifdef __BORLANDC__ .......... #else CLIPPER CALLDLL32( PARAMS ) { #ifndef UNICODE MessageBox( 0, "CallDll32", "CallDll.c", 0 ); #else MessageBox( 0, L"CallDll32", L"CallDll.c", 0 ); #endif } It seems the above CLIPPER CALLDLL32 is being called in error? In addition, if I ignore the above msgalert, in the line of code below (::hMutex := CallDLL32(...) is set to an array (in stead of a numeric handle), the 2nd element of which is the correct hMutex handle If I move tMutex.prg to earlier in my xbp link script, the problem is resolved, but that is an unsatisfactory solution Can you think what might be causing this? Thanks Peter ********************* Method Create( sMutexAttr, lInitialOwner, cName ) Class TMutex Local hDLL := LoadLib32( iKERNEL ) Local cFarProc, cFunc := "CreateMutexA", cBuffer := Nil Default lInitialOwner := .F., cName := "FiveWin App" If ValType( sMutexAttr ) == "O" .and. ; Upper( sMutexAttr:className() ) == "TSTRUCT" cBuffer := sMutexAttr:cBuffer Endif ::cName := cName If Abs( hDLL ) > 32 /*LPSTR*/ // LPSTR fails under 32bits! cFarProc := GetProc32( hDLL, cFunc, iASPASCAL, LONG, LONG, LONG, STRING ) ::hMutex := CallDLL32( cFarProc, ; If( cBuffer # Nil, @cBuffer, cBuffer ), ; // lpMutexAttributes, security descriptor structure or nil Bool2Int( lInitialOwner ), ; // bInitialOwner, initial owner cName + Chr(0) ) // lpName, object name FreeLib32( hDLL ) If cBuffer # Nil sMutexAttr:cBuffer := cBuffer Endif Else ::Failed( hDLL, cFunc ) Endif Return Self *********************
CallDll32 funny
Peter, In 32 bits you have to use CallDLL() and GetProcAddress(). The functions you are using are just for 16 bits, to access 32 bits ones.
CallDll32 funny
Thank you I now see that tMutex.prg does have the following at the bottom of the tMutex.prg (see end of mail) So that would mean the fwh calldll.c function 'CLIPPER CALLDLL32( PARAMS )' is being called instead of the 'Function CallDLL32' below (in tMutex). This should only happen if calldll.c (in FiveHcm.lib) is linked in before tMutex.prg. I am using xBuildW.exe which links FiveHcm.lib in automatically - I will have to investigate further **************** #ifdef __HARBOUR__ Function LoadLib32( cDll ) Return LoadLibrary( cDll ) Function FreeLib32( hDll ) Return FreeLibrary( hDll ) Function GetProc32( hDLL, cFunc, lType, nRetType, nPType1, nPType2, nPType3, nPType4, nPType5, nPType6, nPType7, nPType8, nPType9, nPType10 ) Return GetProcAddress( hDLL, cFunc, lType, nRetType, nPType1, nPType2, nPType3, nPType4, nPType5, nPType6, nPType7, nPType8, nPType9, nPType10 ) Function CallDLL32( cFarProc, uParam1, uParam2, uParam3, uParam4, uParam5, uParam6, uParam7, uParam8, uParam9, uParam10 ) Return CallDLL( cFarProc, uParam1, uParam2, uParam3, uParam4, uParam5, uParam6, uParam7, uParam8, uParam9, uParam10 ) #endif
CallDll32 funny
Peter, Better do a search & replace for those functions names in TMutex source code instead of using those wrappers.
CallNamedPipe
Hi friends, I need make one function with "CallNamedPipe", in C is: [code:3cbflxxw] TCHAR chReadBuf&#91;BUFSIZE&#93;; BOOL fSuccess; DWORD cbRead, cbWritten, dwMode; LPTSTR lpszPipename = TEXT&#40;"\\\\&#46;\\pipe\\myPIPE"&#41;; LPTSTR lpszWrite = TEXT&#40;"no llego nada"&#41;; fSuccess = CallNamedPipe&#40; lpszPipename, lpszWrite, &#40;lstrlen&#40;lpszWrite&#41;+1&#41;*sizeof&#40;TCHAR&#41;, chReadBuf, BUFSIZE*sizeof&#40;TCHAR&#41;, &cbRead, 20000&#41;; if &#40;fSuccess || GetLastError&#40;&#41; == ERROR_MORE_DATA&#41;[/code:3cbflxxw] What i need for make this function in xHarbour? Tank´s
CallNamedPipe en FW
Amigos, Mi código estaba hecho para FWH, pero ahora necesito pasarlo tambien para FW, comencé pero me tira un error al compilar, podrían ayudarme? [code:23s4gnqt]#include "winten&#46;h" #include "windows&#46;h" #ifndef __HARBOUR__ #include "clipapi&#46;h" #else #include "hbapi&#46;h" #endif #define BUFSIZE 512 #ifndef __HARBOUR__ CLIPPER COMANDOCEM&#40; PARAMS &#41; #else HB_FUNC &#40; COMANDOCEM &#41; #endif &#123; #ifndef __HARBOUR__ char chReadBuf&#91;BUFSIZE&#93;; #else TCHAR chReadBuf&#91;BUFSIZE&#93;; #endif BOOL fSuccess; DWORD cbRead, cbWritten, dwMode; #ifndef __HARBOUR__ LPSTR lpszPipename = _parc&#40; 1 &#41; ; LPSTR lpszWrite = _parc&#40; 2 &#41; ; #else LPTSTR lpszPipename = hb_parc&#40; 1 &#41; ; LPTSTR lpszWrite = hb_parc&#40; 2 &#41; ; #endif OutputDebugString&#40; _parc&#40;1&#41; &#41;; #ifndef __HARBOUR__ fSuccess = CallNamedPipe&#40; lpszPipename, lpszWrite, &#40;lstrlen&#40; lpszWrite&#41; + 1 &#41; * sizeof&#40; char &#41;, chReadBuf, BUFSIZE * sizeof&#40; char &#41;, &cbRead, 200000 &#41;; #else fSuccess = CallNamedPipe&#40; lpszPipename, lpszWrite, &#40; lstrlen&#40; lpszWrite &#41; + 1 &#41; * sizeof&#40; TCHAR &#41;, chReadBuf, BUFSIZE*sizeof&#40; TCHAR &#41;, &cbRead, 20000&#41;; #endif &#125; [/code:23s4gnqt] Error:[quote:23s4gnqt]Warning source\pipeclte.c 74: Call to function 'CallNamedPipe' with no prototype in function COMANDOCEM Warning source\pipeclte.c 89: 'fSuccess' is assigned a value that is never used in function COMANDOCEM [/quote:23s4gnqt]
Called from HBCLASS:NEW(0)
Olá Estou gerando um exe com xharbour 09961 + fwh 26, qdo executo gera o erro abaixo: Called from HBCLASS:NEW(0) Called from TFont(0) Called from Principal(83) Compilei a lib fivehx.lib novamente com o novo compilador, compilei todos meus prgs novamente mas não está funcionando.
Called from HBCLASS:NEW(0)
Joao, Tienes un ejemplo pequeño que reproduzca el error ? gracias
Called from HBCLASS:NEW(0)
VERIFIQUE A LINHA 83 DE PRINCIPAL.PRG VOCE ESTA DEFININDO AS FONTES? SE SIM, FECHA-AS AO SAIR? POSTE O CODIGO. OU SIMPLESMENTE, VÁ PARA O FORUM EM PORTUGUES, EM: <!-- m --><a class="postlink" href="http://www.fivewin.com.br">http://www.fivewin.com.br</a><!-- m -->
Called from: => STARTPAGE( 0 )
buenas tardes. intento hacer un listado (no factura) solo impresion de items. y al querer Ejecutar la rutina que me realizaria le impresion me salta esto: [code=fw:12rllni6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   Called <span style="color: #0000ff;">from</span>:  => STARTPAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">PRINTER</span>.PRG => PAGEBEGIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">Source</span>\imprime\TIMPQuincenal.prg => TIMPQUINCENAL:<span style="color: #000000;">HOJA1</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">73</span> <span style="color: #000000;">&#41;</span></div>[/code:12rllni6] que es? gracias
Called from: => STARTPAGE( 0 )
Muestre el código. Y vea PRINT.CH si tiene algo mal. Saludos.