topic
stringlengths
1
63
text
stringlengths
1
577k
lightweight navigation
Best regards, Otto Video [url:dilseepa]http://www.atzwanger-software.com/fw/xbrowNavi/xbrowNavi.html[/url:dilseepa] [img:dilseepa]http://www.atzwanger-software.com/fw/xbrowsnavi.jpg[/img:dilseepa]
lightweight navigation
Good Mr Otto can we have a small sample to try it ? I have a win8 english
like a rolling stone
Does someone like this song. Here is a great Austrian cover of the song. [url:2a08vdaj]https://www.youtube.com/watch?v=d08XVPZvRsA[/url:2a08vdaj] Best regards, Otto
like a rolling stone
<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
like a rolling stone
<!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
limiting the numbers of instance of Winword
I was just wondering is there a way, maybe in the Registry, to limit open instances of programs such as WinWord or Excel I have at school computer with small memory and the boys founded the mode to block any pc opening many instances of winword I want to be able to limit the amount of instances of each program they are allowed to open. Thanks in advance for any help!
limiting the numbers of instance of Winword
It could serve? [code=fw:1f1p5eyw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aTasks = GetTasks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:1f1p5eyw]
limiting the numbers of instance of Winword
Yes Silvio [quote:25w4bxvk] c:\fwh\source\function\gettasks.prg [/quote:25w4bxvk] But do not think you need to serve
limiting the numbers of instance of Winword
not in fwh
limpiar buffer del teclado
compañeros: para limpiar el buffer del teclado, tenemos en FWH algo parecido a "Clear Typeahead" de Clipper?? estuve buscando en \Samples\ pero no vi nada al respecto. Mil gracias LORENZO
line (row) spacing in say/get system using text coordinates
Hello all, i am new to fivewin/xharbour but programming in clipper for mopre than 20 years and now, for last few days, I am learning how to enter in windows programming world. As a beginner i have a lot of questions but try to find answers in documentation and samples. But for this one I cant find any answer. Is there a way to set line (row) spacing in say/get system when coordinates is given in text mode. Example: @ 1,0 say "Row one" @ 2,0 say "Row two" Which is line spacing between row 1 and row 2, and/if is it possible to change that line spacing for selected window or dialog. Thank you in advance, Ivo
line (row) spacing in say/get system using text coordinates
Hello Ipunis : Some small changes needed of : // @ 1,0 say "Row one" // @ 2,0 say "Row two" ... ... [color=#FF0000:chb3d2ph]Local oSay1, oSay2[/color:chb3d2ph] // Optional using Vars : Local [color=#4000FF:chb3d2ph]cVar1 := "Row one"[/color:chb3d2ph] Local [color=#4000FF:chb3d2ph]cVar2 := "Row two"[/color:chb3d2ph] @ 1,0 say [color=#FF0000:chb3d2ph]oSay1 PROMPT [/color:chb3d2ph]"Row one" @ 2,0 say [color=#FF0000:chb3d2ph]oSay2 PROMPT [/color:chb3d2ph]"Row two" or using Vars : @ 1,0 say [color=#4000FF:chb3d2ph]oSay1 VAR cVar1 [/color:chb3d2ph] @ 2,0 say [color=#4000FF:chb3d2ph]oSay2 VAR cVar2 [/color:chb3d2ph] // Pixel optional // ----------------- @ 15,10 say [color=#FF0000:chb3d2ph]oSay1 PROMPT [/color:chb3d2ph]"Row one" PIXEL // use Pixel optional @ 30,10 say [color=#FF0000:chb3d2ph]oSay2 PROMPT [/color:chb3d2ph]"Row two" PIXEL // a Button to change the given SAY-Positions @ 140, 120 BTNBMP oBtn1 OF oDlg 2007 ; SIZE 70 , 40 PROMPT "Move" ; FONT oGetFont ; LEFT ; NOBORDER ; FILENAME "Move.bmp" ; ACTION ( [color=#FF0000:chb3d2ph]oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ; oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh()[/color:chb3d2ph] ) // Set to new Position oBtn1:lTransparent := .T. oBtn1:cTooltip := " Move " oBtn1:lBorder := .F. or change the Position on Dialog-Init ACTIVATE DIALOG oDlg CENTERED ; ON INIT ( [color=#FF0000:chb3d2ph]oSay1:nTop := 3.5, oSay1:nLeft := 10.5, oSay1:Refresh(), ; oSay2:nTop := 4.5, oSay2:nLeft := 10.5, oSay2:Refresh()[/color:chb3d2ph] ) define different Spaces, the way You want to do it from a Start-position with a defined Font : [img:chb3d2ph]http&#58;//www&#46;pflegeplus&#46;com/pictures/txtspace1&#46;jpg[/img:chb3d2ph] [code=fw:chb3d2ph]<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 /><span style="color: #00C800;">LOCAL</span> oDlg, hDC<br /><span style="color: #B900B9;">// here I am able to change line space for SAY section that follow</span><br /><span style="color: #B900B9;">// 12 means that 12 PIXELS will be row spacing and I am going to multiply fun_lspac</span><br /><span style="color: #B900B9;">// with row number for every single row I want to use with SAY/GET system</span><br /><span style="color: #00C800;">LOCAL</span>  oSayFont := TFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Arial"</span>, ,<span style="color: #000000;">-12</span>,.F.,.T. , , , ,.T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// - 11 because the Font-height is defined in POINT</span><br /><span style="color: #00C800;">LOCAL</span> nstart1 := <span style="color: #000000;">0.1</span>, nspace1 := oSayFont:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">11</span> <br /><br /><span style="color: #B900B9;">// Pixel and Font-Height ( POINT ) are not the same, </span><br />You must find out the Space You need.<br /><span style="color: #00C800;">LOCAL</span> nstart2 := <span style="color: #000000;">100</span>, nspace2 := oSayFont:<span style="color: #000000;">nHeight</span> + <span style="color: #000000;">5</span>   <br /><br />SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> TRANSPARENT ;<br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dialog"</span> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_VISIBLE, WS_OVERLAPPEDWINDOW, WS_VSCROLL, WS_HSCROLL <span style="color: #000000;">&#41;</span><br /><br />@  nstart1 + <span style="color: #000000;">1</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row one"</span> <br />@  nstart1 + <span style="color: #000000;">2</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row two"</span> <br />@  nstart1 + <span style="color: #000000;">3</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row three"</span> <br />@  nstart1 + <span style="color: #000000;">4</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row four"</span> <br />@  nstart1 + <span style="color: #000000;">5</span>*nspace1, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Row five"</span> <br /><br /><br />@  nstart2 + <span style="color: #000000;">1</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"USING PIXEL"</span> <span style="color: #0000ff;">PIXEL</span><br />@  nstart2 + <span style="color: #000000;">2</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program ID"</span> <span style="color: #0000ff;">PIXEL</span><br />@  nstart2 + <span style="color: #000000;">3</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program name"</span> <span style="color: #0000ff;">PIXEL</span> <br />@  nstart2 + <span style="color: #000000;">4</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Licence owner"</span> <span style="color: #0000ff;">PIXEL</span> <br />@  nstart2 + <span style="color: #000000;">5</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Current year"</span> <span style="color: #0000ff;">PIXEL</span> <br />@  nstart2 + <span style="color: #000000;">6</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Epoch (SET EPOCH)"</span> <span style="color: #0000ff;">PIXEL</span> <br />@  nstart2 + <span style="color: #000000;">7</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Lokal hard drive"</span> <span style="color: #0000ff;">PIXEL</span> <br />@  nstart2 + <span style="color: #000000;">8</span>*nspace2, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Network/database drive"</span> <span style="color: #0000ff;">PIXEL</span> <br /> <br /> @ <span style="color: #000000;">15</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&End"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> D_GRADIENT<span style="color: #000000;">&#40;</span> hDC, oDlg <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;">// ----- GRADIENT Dialog --------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> D_GRADIENT<span style="color: #000000;">&#40;</span> hDC, oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aColors :=   <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, <span style="color: #000000;">15778421</span>, <span style="color: #000000;">16512957</span> <span style="color: #000000;">&#125;</span>,;<br />                                 <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.1</span>, <span style="color: #000000;">16512957</span>, <span style="color: #000000;">15778421</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>  <br /><br />GradientFill<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors, .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:chb3d2ph] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
line (row) spacing in say/get system using text coordinates
Thanks Uwe, I try first two solution (using text coordinates) but space between two lines remine same. What I am talking about is free space between lines. Of course, if I do the same using PIXEL coordinates then I am able to get controll over everything but I am courious if there is a way to change default line spacing between rows when using text coordinates because using them it's simplfy my life <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> There is ad hoc solution I,ve made: [code=fw:29mhnrey]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> fun_lspac:= <span style="color: #000000;">12</span> &nbsp; <span style="color: #B900B9;">// here I am able to change line space for SAY section that follow</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 12 means that 12 PIXELS will be row spacing and I am going to multiply fun_lspac</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// with row number for every single row I want to use with SAY/GET system</span><br /><br />&nbsp;@ &nbsp;<span style="color: #000000;">01</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp;@ &nbsp;<span style="color: #000000;">02</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Program name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span> <br />&nbsp;@ &nbsp;<span style="color: #000000;">03</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Licence owner &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> <span style="color: #0000ff;">PIXEL</span> <br />&nbsp;@ &nbsp;<span style="color: #000000;">04</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Current year &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span> <br />&nbsp;@ &nbsp;<span style="color: #000000;">05</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Epoch (SET EPOCH) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> <span style="color: #0000ff;">PIXEL</span> <br />&nbsp;@ &nbsp;<span style="color: #000000;">06</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Lokal hard drive &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span> <br />&nbsp;@ &nbsp;<span style="color: #000000;">07</span>*fun_lspac, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Network/database drive &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span> <br /><br />&nbsp;</div>[/code:29mhnrey] Maybe now is more clear what was my question <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
line (row) spacing in say/get system using text coordinates
Hello Ivo, Welcome to the forums <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> If you review the source code of Class TSay (FWH\source\classes\say.prg) you will see that we use some constants to set the "simulated" text spacing on Windows: [code=fw:jrb5kj4z]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nTop</span> &nbsp;= nRow * SAY_CHARPIX_H + <span style="color: #000000;">2</span> <br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nLeft</span> = nCol * SAY_CHARPIX_W <br />&nbsp;</div>[/code:jrb5kj4z] SAY_CHARPIX_H and SAY_CHARPIX_W are defined in FWH\include\constant.ch. So if you modify constant.ch and recompile say.prg and link it to your app as another OBJ then you can modify the spacing the way you may need it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> The same technique applies for other FWH controls <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
lineas 185-194 de tmetafil.prg para corregir el zoon
Por favor, active lineas 185-194 de tmetafil.prg para corregir el zoon en la vista previa de un archivo de texto. Vi a este problema, ya fwh13.09 hasta fwh13.12. [code=fw:2hvar1uk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />        <span style="color: #B900B9;">// /* ( aqui )</span><br />        SetWindowExt<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">if</span> ::<span style="color: #000000;">nVRatio</span> == <span style="color: #00C800;">nil</span><br />           ::<span style="color: #000000;">SetCoors</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">endif</span>   <br />        SetViewportExt<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">100</span> * ::<span style="color: #000000;">nXZoom</span>, <span style="color: #000000;">100</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nYZoom</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nVRatio</span> * ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />        nHStep = <span style="color: #000000;">&#40;</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nXZoom</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">9.8</span> <br />        nVStep = <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nXZoom</span> * ::<span style="color: #000000;">nVRatio</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10.3</span><br />        SetViewOrg<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, -::<span style="color: #000000;">nXorig</span> * nHStep, -::<span style="color: #000000;">nYorig</span> * nVStep <span style="color: #000000;">&#41;</span><br />        <span style="color: #B900B9;">// */ ( aqui )</span><br /> </div>[/code:2hvar1uk] Gracias,
lineas 185-194 de tmetafil.prg para corregir el zoon
Oscar, Gracias, aún estamos haciendo pruebas en esa sección de código.
lineas 185-194 de tmetafil.prg para corregir el zoon
Gracias.
lineas en tTxtEdit
¿como puedo o que habría que modificar para pintar líneas en un tTxtEdit?Lo que quiero es poner una línea a la derecha, de preferencia una línea de lineas pequeñas, para indicar un margen, y dos líneas, de preferencia punteadas, arriba y abajo en el renglón donde está posicionado el cursor
lineas en tTxtEdit
Quique,Tendrias que modificar el método DrawLine( nLine, nRow, nClrBack ) ó modificar el método Paint() para que llame a otro distinto de DrawLine() en determinadas circunstancias
lineas en tTxtEdit
Gracias antonio, lo que preguntaba era la manera de pintar la línea, o sea, si fivewin trae alguna función para ello, la respuesta que me diste me ayudo, porque me hizo reaccionar y ver por donde buscar, ya encontré una manera de hacerlo, pero digamos que es artesanal ¿fivewin trae alguna para hacerlo mas simple?
lineas en tTxtEdit
Quique,En ultima instancia lo que hace FiveWin is llamar a las funciones de pintado de texto del API de Windows.Si quieres implementar un editor de codigo fuente profesional, existen soluciones (DLLs) que puedes usar desde FiveWin como <!-- m --><a class="postlink" href="http://www.scintilla.org">http://www.scintilla.org</a><!-- m -->
lineas en tTxtEdit
voy a echarle un ojo a esa dirección porque si, eso es lo que estoy haciendo, y va mas o menos bien 99.9% FWH/xHarbour, la única librería de terceros es la mia <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> si quieres ver como va quedando puedes bajarlo de [url:26vnmixs]ftp&#58;//ftp&#46;quiquesoft&#46;com/qsvisual&#46;zip[/url:26vnmixs]Aprovechando otra pregunta, no se si valga la pena abrir otro tópico ¿para que sirve el hDC? ¿por que en tTxtEdit.prg lo creas y lo eliminas cada vez que pintas una línea y no creas mejor uno al principio y lo utilizas todo el tiempo?
lines
How can I print horizontal and vertical lines in the tickness I want? Please a simple solution if it exists, I am a non professional... Thanks
lines
small sample [code=fw:w3j4zewl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">function</span> ViewInvoice<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oPrn,oPen<br /><br /><span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"INVOICE"</span> PREVIEW <br /><span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH <span style="color: #000000;">11</span><br /> <span style="color: #0000ff;">PAGE</span><br />  oPrn:<span style="color: #000000;">CmBox</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">23.40</span>, <span style="color: #000000;">2.20</span>, <span style="color: #000000;">27.20</span>, <span style="color: #000000;">20.15</span>, oPen <span style="color: #000000;">&#41;</span><br />         oPrn:<span style="color: #000000;">CmLine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">24.00</span>, <span style="color: #000000;">2.20</span>, <span style="color: #000000;">24.00</span>, <span style="color: #000000;">20.15</span>, oPen <span style="color: #000000;">&#41;</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /> oPen:<span style="color: #000000;">End</span><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></div>[/code:w3j4zewl] to better construct an invoice I suggest you to use a graph paper with measures in millimeters ad this [img:w3j4zewl]https&#58;//upload&#46;wikimedia&#46;org/wikipedia/commons/thumb/2/2d/EKG-Reto_002&#46;svg/1200px-EKG-Reto_002&#46;svg&#46;png[/img:w3j4zewl] I suggest to you to create it on winword [img:w3j4zewl]https&#58;//www&#46;aranzulla&#46;it/wp-content/contenuti/2017/04/xkrGF1mcbhEI51&#46;jpg&#46;pagespeed&#46;ic&#46;Zi22UTFdYX&#46;jpg[/img:w3j4zewl] and then draw on it [img:w3j4zewl]https&#58;//www&#46;wikihow&#46;com/images_en/thumb/0/05/Draw-a-Floor-Plan-to-Scale-Step-2&#46;jpg/v4-728px-Draw-a-Floor-Plan-to-Scale-Step-2&#46;jpg&#46;webp[/img:w3j4zewl]
lines
Thanks to Silvio !
link and open a mysql datafile in remote
Can I open a db mysql from fwh ? the db is on a server and I use it with worpress. I need to open a table to print and order Wich lib I must use for link to this db from fwh ? Can have a test sample run to try ?
link and open a mysql datafile in remote
<!-- m --><a class="postlink" href="http://tdolphin.blogspot.com.ar/">http://tdolphin.blogspot.com.ar/</a><!-- m --> Al bajar los fuentes veras una buena cantidad de samples Lowering the sources you will see a lot of samples
link error while compile testscan.prg and tscan.prg
Dear All, I try to recompile Testscan.pr tscan.prg. It's shown the error message as following either harbour and xharbour. This is sample error message Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: Unresolved external 'TWAIN_Acquire' referenced from D:\FWH\TSCAN32\TSCAN.OBJ Error: Unresolved external 'TWAIN_FreeNative' referenced from D:\FWH\TSCAN32\TSCAN.OBJ Error: Unresolved external 'TWAIN_SelectImageSource' referenced from D:\FWH\TSCAN32\TSCAN.OBJ ..... What does it mean? Regards, Dutch
link error while compile testscan.prg and tscan.prg
Sawasdee , dutch. i think your problem are BAT Compiler and linker or Files *.cfg are wrong.. Show mw BAT compiler file to help you ok Mauricio (BRAZIL)
link error while compile testscan.prg and tscan.prg
Dear mauricio, This is my batch fil. Thanks in advance, Dutch @ECHO OFF CLS ECHO &#3642;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3615; ECHO &#3603; FiveWin for Harbour 2.5 - October 2004 Harbour development power &#3603;&#63682; ECHO &#3603; (c) FiveTech, 1993-2004 for Microsoft Windows 95/98/NT/2000/ME and XP &#3603;&#63681; ECHO &#3616;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3620;&#3641;&#63681; ECHO &#63688; &#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647;&#3647; if A%1 == A GOTO :SINTAX if NOT EXIST %1.prg GOTO :NOEXIST ECHO Compiling... set hdir=d:\harbour set bcdir=d:\bcc55 %hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log @type clip.log IF ERRORLEVEL 1 PAUSE IF ERRORLEVEL 1 GOTO EXIT echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc %bcdir%\bin\bcc32 -M -c @b32.bc :ENDCOMPILE %hdir%\bin\harbour tscan /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log @type clip.log IF ERRORLEVEL 1 PAUSE IF ERRORLEVEL 1 GOTO EXIT echo -O2 -etscan.exe -I%hdir%\include tscan.c > b32.bc %bcdir%\bin\bcc32 -M -c @b32.bc :ENDCOMPILE IF EXIST %1.rc %bcdir%\bin\brc32 -r %1 echo c0w32.obj + > b32.bc echo %1.obj tscan.obj, + >> b32.bc echo %1.exe, + >> b32.bc echo %1.map, + >> b32.bc echo ..\lib\FiveH.lib ..\lib\FiveHC.lib + >> b32.bc echo %hdir%\lib\rtl.lib + >> b32.bc echo %hdir%\lib\vm.lib + >> b32.bc echo %hdir%\lib\gtwin.lib + >> b32.bc echo %hdir%\lib\lang.lib + >> b32.bc echo %hdir%\lib\macro.lib + >> b32.bc echo %hdir%\lib\rdd.lib + >> b32.bc echo %hdir%\lib\dbfntx.lib + >> b32.bc echo %hdir%\lib\dbfcdx.lib + >> b32.bc echo %hdir%\lib\dbfdbt.lib + >> b32.bc echo %hdir%\lib\debug.lib + >> b32.bc echo %hdir%\lib\common.lib + >> b32.bc echo %hdir%\lib\pp.lib + >> b32.bc echo %hdir%\lib\codepage.lib + >> b32.bc rem Uncomment these two lines to use Advantage RDD rem echo %hdir%\lib\rddads.lib + >> b32.bc rem echo %hdir%\lib\Ace32.lib + >> b32.bc echo %bcdir%\lib\cw32.lib + >> b32.bc echo %bcdir%\lib\import32.lib + >> b32.bc echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc echo %bcdir%\lib\psdk\rasapi32.lib, >> b32.bc IF EXIST %1.res echo %1.res >> b32.bc rem uncomment this line to use the debugger and comment the next one rem %bcdir%\bin\ilink32 -Tpe -s @b32.bc %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc rem delete temporary files @del %1.c @del %1.il? IF ERRORLEVEL 1 GOTO LINKERROR ECHO * Application successfully built %1 GOTO EXIT ECHO :LINKERROR rem if exist meminfo.txt notepad meminfo.txt rem PAUSE * Linking errors * GOTO EXIT :SINTAX ECHO SYNTAX: Build [Program] {-- No especifiques la extensi&#3586;n PRG ECHO {-- Don't specify .PRG extension GOTO EXIT :NOEXIST ECHO The specified PRG %1 does not exist :EXIT
link error while compile testscan.prg and tscan.prg
SAWASDEE , DUTCH I think this , your Bat Compile haven´t External reference for Functions. post your code, Because TWAIN_... Functions are DLL external. If you need SCANNER FUNCTION Check TWAIN class. mauricio..
link error while compile testscan.prg and tscan.prg
Dear Mauricio This is TSCAN.PRG code. Thanks in advance, Dutch // Example scanner, Class TSCAN32 and Wrappers for [x]Harbour // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See // the GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this software; see the file COPYING. If not, write to // the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA (or visit the web site // <!-- m --><a class="postlink" href="http://www.gnu.org/">http://www.gnu.org/</a><!-- m -->). // The exception is that, if you link the class Tscan32 and Wrappers C // with other files to produce an executable, this does not by itself cause the // resulting executable to be covered by the GNU General Public License. // Your use of that executable is in no way restricted on account of // linking the Tscan32 and Wrappers library code into it. // 2003(c)- Rafa Carmona( Thefull ) // // interface to Dosadi EZTWAIN library by TheFull // Interface para la libreria EZTWAIN de Dosadi por TheFull // 32 bits // ATENTION. THIS LICENSE NOT APLICATTE A EZTWAIN. // YOUR VIEW LICENSE EZTW32.DLL IN <!-- w --><a class="postlink" href="http://WWW.DOSADI.COM">WWW.DOSADI.COM</a><!-- w --> #INCLUDE "HBCLASS.CH" // Returns the TWAIN Protocol State per the spec. #define TWAIN_PRESESSION 1 // source manager not loaded #define TWAIN_SM_LOADED 2 // source manager loaded #define TWAIN_SM_OPEN 3 // source manager open #define TWAIN_SOURCE_OPEN 4 // source open but not enabled #define TWAIN_SOURCE_ENABLED 5 // source enabled to acquire #define TWAIN_TRANSFER_READY 6 // image ready to transfer #define TWAIN_TRANSFERRING 7 // image in transit *************************************************************************** * * CLASS TSCAN32 * 2003(c)- by Rafa Carmona ( TheFull ) * Beta 1.0 * Beta 2.0 New. Support Get ClipBoard to hDib. * New. ClipboardToFile( cFile ) -> Save File Jpg into Clipboard. * * Beta 3.0 New. ReWrite Method End, conflict GPF's <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> * * **************************************************************************** CLASS TSCAN32 DATA hWnd DATA cFile DATA hDib DATA lError INIT .F. DATA nState METHOD New( cFile, hWnd ) CONSTRUCTOR METHOD End() METHOD Register() MESSAGE FreeNative METHOD End() MESSAGE Close METHOD End() METHOD DigiToFile( cFile ) METHOD DibToJpeg( cFile ) INLINE TW_DibWJpg( ::hDib, cFile ) METHOD DibToBmp( cFile ) INLINE TW_DibWBmp( ::hDib, cFile ) METHOD SetJpegQ( nQuality) INLINE TW_SetJpegQuality( nQuality )// 1..100 Default 75 METHOD Acquire() INLINE TW_Acquire( ::hWnd ) METHOD AcquireClipBoard() INLINE TW_AcquireToClipboard( ::hWnd , 0 ) METHOD OpenDefault() METHOD OpenSource() METHOD EnableSource() INLINE TW_EnableSource( ::hWnd ) METHOD Choose() INLINE TW_SelectImageSource() // ********** Basic TWAIN Inquiries ********************************** METHOD IsAvailable() INLINE IIF( TW_Avail() = 1, .T. , .F. ) METHOD Version() INLINE ( Str( TW_EasyVersion() / 100 ) ) METHOD State() INLINE (::nState := TW_State() ) METHOD SourceName() INLINE TW_SourceName() METHOD GetSourceName( cName ) INLINE TW_GetSourceName( cName ) //************ Global Options ***************************************** METHOD SetHide( lHide ) INLINE IIF( lHide , TW_SetHideUI(1), TW_SetHideUI(0) ) //-*********** High-level Capability Negotiation Functions ************** // These functions should only be called in State 4 (TWAIN_SOURCE_OPEN) METHOD PixelType( nType ) INLINE ( ::State(),; if( ::nState >= TWAIN_SOURCE_OPEN,; TW_SetCurrentPixelType( nType ),0 ) ) METHOD SetRes( dRes ) INLINE ( ::State(),; if( ::nState >= TWAIN_SOURCE_OPEN,; TW_SetCurrentResolution( dRes ),0) ) METHOD SetXRes( dRes ) INLINE TW_SetXResolution( dRes ) METHOD SetYRes( dRes ) INLINE TW_SetYResolution( dRes ) METHOD SetUnits( nUnits ) INLINE TW_SETCURRENTUNITS( nUnits ) METHOD SetContrats( dContrats) INLINE TW_SETCONTRATS( dContrats ) METHOD SetBright( dBright ) INLINE TW_SETBRIGHTNESS( dBright ) METHOD SetPaper( nPaper ) INLINE TW_SETPAPERSIZE( nPaper ) METHOD GetResolution() INLINE TW_GETCURRENTRESOLUTION() //******** Image Layout (Region of Interest) ********************** METHOD RegionSet( nLeft,nTop, nRigth, nBottom ) INLINE TW_SetImageLayout( nLeft,nTop, nRigth, nBottom ) METHOD RegionReset() INLINE TW_ResetImageLayout() METHOD RegionGet( L,T,R,B ) INLINE TW_GetImageLayout(@L,@T,@R,@B) METHOD RegionGetDefault( L,T,R,B ) INLINE TW_GetDefaultImageLayout(@L,@T,@R,@B) METHOD ClipBoardToFile( cFile ) METHOD DIB_GetFromClipboard() INLINE TW_DIB_GetFromClipboard() ENDCLASS *********************************************************** *********************************************************** METHOD New( cFile, hWnd ) CLASS TSCAN32 IF Empty( hWnd ) ::hWnd := GetActiveWindow() ENDIF IF Empty( cFile ) ::cFile := "TestTscan32.jpg" ELSE ::cFile := cFile ENDIF IF !::IsAvailable() ::lError := .T. // MsgStop( "TWAIN no found","Attention!") // Only Fivewin ENDIF IF !::lError ::Register( 1,0,0,0,"1.0 Beta","by Rafa Carmona","Scan by Thefull","Scan For [x]Harbour" ) ENDIF ::OpenSource() ::OpenDefault() RETURN Self ********************************************************************** * Comprueba que esta disponible TWAIN y cargalo ********************************************************************** METHOD OpenSource() CLASS TSCAN32 Local nResult := TW_LoadSourceManager() DO CASE CASE nResult = -1 ::lError := .T. // MsgStop("Error Driver TWAIN"," &#3615; Insufficient Memory ?") Return Self ENDCASE Return Self *********************************************************************** * Abre TWAIN el ultimo que fue seleccionado desde Select ..Dialog * Si no puede cargarlo solicita seleccionar Source. *********************************************************************** METHOD OpenDefault() CLASS TSCAN32 Local nResult := TW_OpenDefaultSource() DO CASE CASE nResult = 0 ::Choose() CASE nResult = -1 ::lError := .T. OTHERWISE ::lError := .F. ENDCASE Return Self ************************************************************************** * Liberamos hDib y cerramos el dispositivo ************************************************************************** METHOD End() CLASS TSCAN32 if !Empty( ::hDib ) TW_Free( ::hDib ) endif TW_CloseSourceManager( ::hWnd ) // Close para evitar GPF Return NIL *************************************************************************** * Registra la aplicacion *************************************************************************** METHOD Register( nMajor ,nMinor,nLanguage,nCountry,cVersion,cName,cFamily,cProduct ) CLASS TSCAN32 TW_REGISTERAPP( nMajor ,nMinor,nLanguage,nCountry,; cVersion,cName,cFamily,cProduct ) Return Self *********************************************************** * Digitaliza hacia un fichero .jpg *********************************************************** METHOD DigiToFile( cFile ) if EMPTY( cFile ) cFile := ::cFile endif IF !::lError ::hDib := ::Acquire() // Importar ENDIF IF !Empty( ::hDib ) IF TW_IsJpg() = 1 // Si puede hacer uso del JPG ::DibToJpeg( cFile ) ELSE ::DibToBmp( cFile ) // Si no hacemos uso de BMP ENDIF ENDIF Return Self ************************************************************************ * Save content clipboard into to file.jpg ************************************************************************ METHOD ClipBoardToFile( cFile ) CLASS TSCAN32 Local hDib, nError IF Empty( cFile ) ::cFile := "TestTscan32.jpg" ELSE ::cFile := cFile ENDIF hDib := ::DIB_GetFromClipboard() IF !Empty( hDib ) IF TW_IsJpg() = 1 // Si puede hacer uso del JPG TW_DibWJpg( hDib, ::cFile ) ELSE TW_DibWBmp( hDib, ::cFile ) ENDIF TW_Free( hDib ) ENDIF RETURN Self /* ----------------------------------------------------------------- Implementation Language C for [x]Harbour(WIN32) 2003(c)- by Rafa Carmona ( TheFull ) Wrappers for EZTW32.DLL the DosAdi. -------------------------------------------------------------------- */ #pragma BEGINDUMP #include <windows.h> #include "eztwain.h" #include "hbapi.h" /*--------- Top-Level Calls -------------------------------------*/ HB_FUNC( TW_ACQUIRE ) // hWnd { hb_retnl( ( LONG )TWAIN_Acquire( ( HWND ) hb_parnl( 1 ) ) ); } HB_FUNC( TW_FREE ) // hDib { TWAIN_FreeNative( ( HANDLE ) hb_parnl( 1 ) ); hb_ret(); } HB_FUNC( TW_SELECTIMAGESOURCE ) // hWnd { ; hb_retni( TWAIN_SelectImageSource( ( HWND ) hb_parnl( 1 ) ) ); } HB_FUNC( TW_ACQUIRENATIVE ) // hWnd, nPixTypes { hb_retnl( ( LONG )TWAIN_AcquireNative( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) ); } HB_FUNC( TW_ACQUIRETOCLIPBOARD ) // hWnd, nPixTypes { hb_retni( TWAIN_AcquireToClipboard( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) ); } HB_FUNC( TW_ACQUIREMEMORY ) // hWnd { hb_retnl( ( LONG )TWAIN_AcquireMemory( ( HWND ) hb_parnl( 1 ) ) ); } HB_FUNC( TW_ACQUIRETOFILENAME ) // hWnd, cFileName { hb_retni( TWAIN_AcquireToFilename( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ) ) ); } HB_FUNC( TW_ACQUIREFILE ) // hWnd, nFF, cFileName { hb_retni( TWAIN_AcquireFile( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ) ,hb_parc( 3 ) ) ); } //--------- Basic TWAIN Inquiries HB_FUNC( TW_AVAIL ) { hb_retni( TWAIN_IsAvailable() ); } HB_FUNC( TW_EASYVERSION) { hb_retni( TWAIN_EasyVersion() ); } HB_FUNC( TW_STATE ) { hb_retni( TWAIN_State() ); } HB_FUNC( TW_SOURCENAME ) { hb_retc( TWAIN_SourceName() ); } HB_FUNC( TW_GETSOURCENAME ) // pzName { TWAIN_GetSourceName( (LPSTR) hb_parc( 1 ) ); hb_ret(); } //--------- DIB handling utilities --------- HB_FUNC( TW_DIBWJPG ) // hDib, cName { hb_parni( DIB_WriteToJpeg( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) ); } HB_FUNC( TW_DIBWBMP ) // hDib, cName { hb_parni( DIB_WriteToBmp( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) ); } //--------- File Read/Write HB_FUNC( TW_ISJPG ) { hb_retni( TWAIN_IsJpegAvailable() ); } HB_FUNC( TW_SETSAVEFORMAT ) { hb_retni( TWAIN_SetSaveFormat( hb_parni( 1 ) ) ); } HB_FUNC( TW_GETSAVEFORMAT ) { hb_retni( TWAIN_GetSaveFormat() ); } HB_FUNC( TW_SETJPEGQUALITY ) // nQuality 1...100 { TWAIN_SetJpegQuality( hb_parni( 1 ) ); hb_ret(); } HB_FUNC( TW_GETJPEGQUALITY ) { hb_retni( TWAIN_GetJpegQuality() ); } HB_FUNC( TW_WRITENATIVETOFILENAME ) { hb_retni( TWAIN_WriteNativeToFilename( (HANDLE) hb_parnl(1), hb_parc(2) )); } HB_FUNC( TW_LOADNATIVEFROMFILENAME ) { hb_retnl( (LONG) TWAIN_LoadNativeFromFilename( hb_parc( 1 ) ) ); } //--------- Global Options ---------------------------------------------- HB_FUNC( TW_SETMULTITRANSFER ) { TWAIN_SetMultiTransfer( hb_parni( 1 ) ); hb_ret(); } HB_FUNC( TW_GETMULTITRANSFER ) { hb_retni( TWAIN_GetMultiTransfer() ); } HB_FUNC( TW_SETHIDEUI ) // nHide { TWAIN_SetHideUI( hb_parni( 1) ); hb_ret(); } HB_FUNC( TW_GETHIDEUI ) { hb_retni( TWAIN_GetHideUI() ); } HB_FUNC( TW_DISABLEPARENT ) { TWAIN_DisableParent( hb_parni( 1 ) ); hb_ret(); } HB_FUNC( TW_GETDISABLEPARENT ) { hb_retni( TWAIN_GetDisableParent() ); } HB_FUNC( TW_REGISTERAPP ) { TWAIN_RegisterApp( hb_parni(1),hb_parni(2),hb_parni(3),hb_parni(4), hb_parc(5), hb_parc(6), hb_parc(7), hb_parc(8) ); hb_ret(); } HB_FUNC( TW_SETAPPTITLE ) { TWAIN_SetAppTitle( hb_parc( 1 ) ); hb_ret(); } //--------- TWAIN State Control --------------------------------------- HB_FUNC( TW_LOADSOURCEMANAGER ) { hb_retni( TWAIN_LoadSourceManager() ); } HB_FUNC( TW_OPENSOURCEMANAGER ) // hWnd { hb_retni( TWAIN_OpenSourceManager( ( HWND ) hb_parnl( 1 ) ) ); } HB_FUNC( TW_OPENDEFAULTSOURCE ) { hb_retni( TWAIN_OpenDefaultSource() ); } HB_FUNC( TW_GETSOURCELIST ) { hb_retni( TWAIN_GetSourceList() ); } HB_FUNC( TW_GETNEXTSOURCENAME ) { hb_retni( TWAIN_GetNextSourceName( hb_parc( 1 ) ) ); } HB_FUNC( TW_GETDEFAULTSOURCENAME ) { hb_retni( TWAIN_GetDefaultSourceName( hb_parc( 1 ) )); } HB_FUNC( TW_OPENSOURCE ) { hb_retni( TWAIN_OpenSource( hb_parc( 1 ) ) ); } HB_FUNC( TW_ENABLESOURCE ) // hWnd { hb_retni( TWAIN_EnableSource( ( HWND ) hb_parnl( 1 ) ) ); } HB_FUNC( TW_DISABLESOURCE ) { hb_retni( TWAIN_DisableSource( ) ); } HB_FUNC( TW_CLOSESOURCE ) { hb_retni( TWAIN_CloseSource() ); } HB_FUNC( TW_CLOSESOURCEMANAGER ) { hb_retni( TWAIN_CloseSourceManager( (HWND) hb_parnl( 1 ) ) ); } HB_FUNC( TW_UNLOADSOURCEMANEGER ) { hb_retni( TWAIN_UnloadSourceManager() ); } //--------- High-level Capability Negotiation Functions -------------- // These functions should only be called in State 4 (TWAIN_SOURCE_OPEN) HB_FUNC( TW_GETCURRENTUNITS ) { hb_retni( TWAIN_GetCurrentUnits() ); } HB_FUNC( TW_SETCURRENTUNITS ) // nUnits { hb_retni( TWAIN_SetCurrentUnits( hb_parni( 1 ) ) ); } HB_FUNC( TW_GETBITDEPTH ) { hb_retni( TWAIN_GetBitDepth() ); } HB_FUNC( TW_SETBITDEPTH ) { hb_retni( TWAIN_SetBitDepth( hb_parni( 1 ) ) ); } HB_FUNC( TW_GETPIXELTYPE ) { hb_retni( TWAIN_GetPixelType() ); } HB_FUNC( TW_SETCURRENTPIXELTYPE ) // nBits { hb_retni( TWAIN_SetCurrentPixelType( hb_parni( 1 ) ) ); } HB_FUNC( TW_GETCURRENTRESOLUTION ) { hb_retnd( TWAIN_GetCurrentResolution()); } HB_FUNC( TW_GETYRESOLUTION ) { hb_retnd( TWAIN_GetYResolution()); } HB_FUNC( TW_SETCURRENTRESOLUTION ) // dRes { hb_retni( TWAIN_SetCurrentResolution( hb_parnd( 1 ) ) ); } HB_FUNC( TW_SETXRESOLUTION ) { hb_retni( TWAIN_SetXResolution( hb_parnd( 1 ) ) ); } HB_FUNC( TW_SETYRESOLUTION ) { hb_retni( TWAIN_SetYResolution( hb_parnd( 1 ) ) ); } HB_FUNC( TW_SETCONTRATS ) //dCon { hb_retni( TWAIN_SetContrast( hb_parnd( 1 ) ) ); // -1000....+1000 } HB_FUNC( TW_SETBRIGHTNESS ) //dBri { hb_retni( TWAIN_SetBrightness( hb_parnd( 1 ) ) ); // -1000....+1000 } HB_FUNC( TW_SETTHRESHOLD ) { hb_retni( TWAIN_SetThreshold( hb_parnd( 1 ) ) ); } HB_FUNC( TW_GETCURRENTTHRESHOLD ) { hb_retnd( TWAIN_GetCurrentThreshold() ); } HB_FUNC( TW_SETXFERMECH ) { hb_retni( TWAIN_SetXferMech( hb_parni( 1 ) ) ); } HB_FUNC( TW_XFERMECH ) { hb_retni( TWAIN_XferMech() ); } HB_FUNC( TW_SUPPORTSFILEXFER ) { hb_retni( TWAIN_SupportsFileXfer() ); } HB_FUNC( TW_SETPAPERSIZE ) // nTypePaper { hb_retni( TWAIN_SetPaperSize( hb_parni( 1 ) ) ); } //-------- Document Feeder --------------------------------- HB_FUNC( TW_HASFEEDER ) { hb_retl( TWAIN_HasFeeder() ); } HB_FUNC( TW_ISFEEDERSELECTED ) { hb_retl( TWAIN_IsFeederSelected() ); } HB_FUNC( TW_SELECTFEEDER ) { hb_retni( TWAIN_SelectFeeder( hb_parni( 1 ) ) ); } HB_FUNC( TW_ISAUTOFEEDON ) { hb_retl( TWAIN_IsAutoFeedOn() ); } HB_FUNC( TW_SETAUTOFEDD ) { hb_retni( TWAIN_SetAutoFeed( hb_parni( 1 ) ) ); } HB_FUNC( TW_ISFEEDERLOADED ) { hb_retl( TWAIN_IsFeederLoaded() ); } //-------- Duplex Scanning ------------------------------------------ HB_FUNC( TW_GETDUPLEXSUPPORT ) { hb_retni( TWAIN_GetDuplexSupport() ); } HB_FUNC( TW_ENABLEDUPLEX ) { hb_retni( TWAIN_EnableDuplex( hb_parni( 1 ) ) ); } HB_FUNC( TW_ISDUPLEXENABLED ) { hb_retl( TWAIN_IsDuplexEnabled() ); } //--------- Other 'exotic' capabilities -------- HB_FUNC( TW_HASCONTROLLABLEUI ) { hb_retni( TWAIN_HasControllableUI() ); } HB_FUNC( TW_SETINDICATORS ) { hb_retni( TWAIN_SetIndicators( hb_parl( 1 ) ) ); } HB_FUNC( TW_COMPRESSION ) { hb_retni( TWAIN_Compression() ); } HB_FUNC( TW_SETCOMPRESSION ) { hb_retni( TWAIN_SetCompression( hb_parni( 1 ) ) ); } HB_FUNC( TW_TILED ) { hb_retl( TWAIN_Tiled() ); } HB_FUNC( TW_SETTILED ) { hb_retni( TWAIN_SetTiled( hb_parl( 1 ) ) ); } HB_FUNC( TW_PLANARCHUNKY ) { hb_retni( TWAIN_PlanarChunky() ); } HB_FUNC( TW_SETPLANARCHUNKY ) { hb_retni( TWAIN_SetPlanarChunky( hb_parni( 1 ) ) ); } HB_FUNC( TW_PIXELFLAVOR ) { hb_retni( TWAIN_PixelFlavor() ); } HB_FUNC( TW_SETPIXELFLAVOR ) { hb_retni( TWAIN_SetPixelFlavor( hb_parni( 1 ) ) ); } HB_FUNC( TW_SETLIGHTPATH ) { hb_retni( TWAIN_SetLightPath( hb_parl( 1 ) ) ); } HB_FUNC( TW_SETAUTOBRIGHT ) { hb_retni( TWAIN_SetAutoBright( hb_parl( 1 ) ) ); } HB_FUNC( TW_SETGAMMA ) { hb_retni( TWAIN_SetGamma( hb_parnd( 1 ) ) ); } HB_FUNC( TW_SETSHADOW ) { hb_retni( TWAIN_SetShadow( hb_parnd( 1 ) ) ); } HB_FUNC( TW_SETHIGHLIGHT ) { hb_retni( TWAIN_SetHighlight( hb_parnd( 1 ) ) ); } //--------- Image Layout (Region of Interest) -------- HB_FUNC( TW_SETIMAGELAYOUT ) // left, top, right, bottom { hb_retni( TWAIN_SetImageLayout( hb_parnd( 1 ),hb_parnd( 2 ),hb_parnd( 3 ),hb_parnd( 4 ) ) ); } HB_FUNC( TW_RESETIMAGELAYOUT ) { TWAIN_ResetImageLayout(); hb_ret(); } HB_FUNC( TW_GETIMAGELAYOUT ) { double L,T,R,B; int nRet; nRet = TWAIN_GetImageLayout( &L,&T,&R,&B ); hb_stornd( L, 1 ); hb_stornd( T, 2 ); hb_stornd( R, 3 ); hb_stornd( B, 4 ); hb_retni( nRet ); } HB_FUNC( TW_GETDEFAULTIMAGELAYOUT ) { double L,T,R,B; int nRet; nRet = TWAIN_GetDefaultImageLayout( &L, &T, &R, &B); hb_stornd( L, 1 ); hb_stornd( T, 2 ); hb_stornd( R, 3 ); hb_stornd( B, 4 ); hb_retni( nRet ); } //HANDLE EZTAPI DIB_GetFromClipboard(void); HB_FUNC( TW_DIB_GETFROMCLIPBOARD ) { hb_retnl( (LONG) DIB_GetFromClipboard() ); } // para no depender de Five, y harbour poder el solito trabajar <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> HB_FUNC ( GETACTIVEWINDOW ) { hb_retnl( ( LONG ) GetActiveWindow() ); } #pragma ENDDUMP
link error while compile testscan.prg and tscan.prg
Dear Mauricio, This is testscan.prg #INCLUDE "Fivewin.ch" // BitDeph #define TWPT_BW 0 /* Black and White */ #define TWPT_GRAY 1 #define TWPT_RGB 2 #define TWPT_PALETTE 3 //----- Unit of Measure #define TWUN_INCHES 0 #define TWUN_CENTIMETERS 1 #define TWUN_PICAS 2 #define TWUN_POINTS 3 #define TWUN_TWIPS 4 #define TWUN_PIXELS 5 /* ---------------------------------------------------------------- Control de Pruebas de la Clase TSCAN32, Wrappers para Scanners y WebCams. - Soporta scanners Paralelo, USB y SCSI. - WebCams (c)2003.- by Rafa Carmona( TheFull ) Compiler & Libraries - Harbour and Fivewin For Harbour v2.3 --------------------------------------------------------------- */ Static oScan, oWnd Static X := 0 Static Y := 0 Static lChangeUnit := .F. Function Main( cFile, nType, nRes, lHide, nPaper ) Local hDib := 0 Local oImage, oBar, oBtn, oFont, oCbx, oCbxU, oCbxR, oGet, oCheck Local lSave := .F. Local cType Local aTypes := { "1-Scale Gray","2-Real Color","3-Palette Color" } Local aResolutions := { "75","100","150","200","300" } Local aUnits := { "0-Dpi","1-Cms","2-Picas","3-Points","4-Twips","6-Pixels"} Local cUnit := aUnits[1] Local nUnit := 0 // Default RGB IF nType == NIL nType := TWPT_GRAY ELSEIF Val( nType ) <= 3 nType := Val( nType ) ELSEIF Val( nType ) > 3 MsgStop( "Not exist type." + CRLF+; "Real Color by Default", "Atention" ) nType := TWPT_RGB ENDIF cType := aTypes[ nType ] IF cFile = NIL cFile := "" ENDIF //Default 150dpi IF nRes = NIL nRes := "150" ENDIF oScan := TScan32():New( cFile ) DEFINE FONT oFont NAME"Tahoma" SIZE 0,-10 DEFINE WINDOW oWnd TITLE "Fichero: "+ oScan:cFile FROM 1,1 TO 500,650 PIXEL DEFINE BUTTONBAR oBar SIZE 50,32 3D OF oWnd DEFINE BUTTON oBtn PROMPT "Exit" FONT oFont ; ACTION oWnd:End() OF oBar DEFINE BUTTON oBtn PROMPT "Grabar" FONT oFont ; ACTION ( oScan:ClipBoardToFile( cFile ),; SysRefresh() ) OF oBar DEFINE BUTTON oBtn PROMPT "Scan" FONT oFont ; ACTION IF( ScanFive( nType , nRes, nUnit ),; ( oImage:LoadFromClipboard(), oImage:Refresh()) ,) OF oBar @5,175 CHECKBOX oCheck VAR lChangeUnit PROMPT "SetUnit" SIZE 70,20 OF oBar PIXEL @3,250 COMBOBOX oCbxR VAR nRes SIZE 100,130 ; ITEMS aResolutions OF oBar PIXEL ; WHEN nUnit = 0 UPDATE @3,350 COMBOBOX oCbx VAR cType SIZE 120,130 ; ITEMS aTypes OF oBar PIXEL ; ON CHANGE nType := Val( SubStr( cType,1,1 ) ) @3,470 COMBOBOX oCbxU VAR cUnit SIZE 100,130 ; ITEMS aUnits OF oBar PIXEL ; ON CHANGE nUnit := Val( SubStr( cUnit,1,1 ) ) ; UPDATE @7,570 GET oGet VAR X PICTURE "9999.99" SIZE 60,20 OF oBar ; UPDATE PIXEL @7,630 GET oGet VAR Y PICTURE "9999.99" SIZE 60,20 OF oBar ; UPDATE PIXEL @0,0 BITMAP oImage SCROLL OF oWnd oWnd:oClient := oImage oWnd:Center() SET MESSAGE TO "(c)2003-Scan ClipBoard Beta 2 by Rafa Carmona" OF oWnd CENTER // Vaciamos el Clipboard a la salida de la Aplicacion. // Empty Clipboard to Exit aplicattion. ACTIVATE WINDOW oWnd VALID( oFont:End(), oScan:End(),; OpenClipBoard( oWnd:hWnd ),; EmptyClipboard(),; CloseClipBoard(),.T. ) Return NIL // Scanner al Clipboard // nType -> Tipo de Salida // nRes -> Resolucion de salida // nUnit -> Sistema de Medida Static Func ScanFive( nType, nRes , nUnit ) if oScan:State() < 4 oScan:OpenDefault() endif if nUnit = 0 oScan:SetRes( Val( nRes ) ) endif IF nUnit > 0 if lChangeUnit oScan:SetUnits( nUnit ) // Sistema de Medida .Esto puede causar problema endif // Expresado en Dpi. Habria que convertir pero no tengo ni idea de como. oScan:SetXRes( X ) oScan:SetYRes( Y ) ENDIF oScan:SetHide( .T. ) // Oculto DS oScan:PixelType( nType ) Return IF( oScan:AcquireClipBoard() = 1,.T.,.F.)
link error while compile testscan.prg and tscan.prg
I think This , How Many Files have this Class , your bat files don´t have library to undefined Functions if external .. declare.. Extern ... What Files have this class? Mauricio (BRAZIL)
link error while compile testscan.prg and tscan.prg
Dear Mauricio, This classes come from <!-- w --><a class="postlink" href="http://www.dosadi.com">www.dosadi.com</a><!-- w --> EZTWAIN Regards, Dutch
link error while compile testscan.prg and tscan.prg
DEAR DUTCH, I THINK THIS , do you have Using Dll Via DLL32 i don´t get this classe , send me ..ok <!-- e --><a href="mailto:mauricioajordao@msn.com">mauricioajordao@msn.com</a><!-- e --> Together found Solutions OK mauricio (BRAZIL)
link error while compile testscan.prg and tscan.prg
Dutch I am having the same problem that you are having when trying to compile the TSCAN.PRG: [code:2sn5muqw] xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_Acquire'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_FreeNative'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_SelectImageSource'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireNative'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireToClipboard'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireMemory'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireToFilename'&#46; [/code:2sn5muqw] Did you find a solution to this problem? Regards, George
link error while compile testscan.prg and tscan.prg
Dear George, This following code that I use. Regards, Dutch [quote="George":6u855owo]Dutch I am having the same problem that you are having when trying to compile the TSCAN.PRG: [code:6u855owo] xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_Acquire'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_FreeNative'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_SelectImageSource'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireNative'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireToClipboard'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireMemory'&#46; xLINK&#58; error&#58; Unresolved external symbol '_TWAIN_AcquireToFilename'&#46; [/code:6u855owo] Did you find a solution to this problem? Regards, George[/quote:6u855owo] [code:6u855owo] /*------------------------------------------------------------------------* ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Ûݳ ³ Ûݳ ProcName&#46;&#46;&#46;&#46;&#46;&#46;&#58; Scanner&#46;prg ³ Ûݳ Pourpose&#46;&#46;&#46;&#46;&#46;&#46;&#58; TWAIN standard device Class interface ³ Ûݳ Date&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#58; 05-11-96 ³ Ûݳ Author&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#58; &#40;c&#41;,L&#46;Gadaleta ³ Ûݳ ³ ÛÝÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ *------------------------------------------------------------------------*/ #include "FiveWin&#46;ch" #include "Image&#46;ch" #define STAND_ALONE #define TWAIN_DLL "EZTw32&#46;dll" * #define TWAIN_DLL "DMTwain&#46;dll" #define CBM_INIT 4 // for freeimage&#46;dll #define DIB_RGB_COLORS 0 // for freeimage&#46;dll STATIC oWnd, oImage STATIC hLib // for freeimage&#46;dll #ifdef STAND_ALONE FUNCTION ScanMe&#40;cFileRes&#41; LOCAL cFile, nRes, n cFile &#58;= cFileRes nRes &#58;= 100 if !cFileRes == NIL if &#40; n&#58;=AT&#40;",",cFileRes&#41; &#41; > 0 cFile &#58;= Alltrim&#40;Substr&#40;cFileRes,1,n-1&#41;&#41; nRes &#58;= Val&#40;Alltrim&#40;Substr&#40;cFileRes,n+1&#41;&#41;&#41; end end CursorWait&#40;&#41; DEFINE WINDOW oWnd FROM 1,1 TO 1,1 ACTIVATE WINDOW oWnd ON INIT &#40;oWnd&#58;Hide&#40;&#41;, ; RunScan&#40;cFile,oWnd&#58;hWnd,nRes&#41;&#41; if file&#40; cFile &#41; SaveImage&#40; cFile &#41; end CursorArrow&#40;&#41; RETURN NIL STATIC FUNCTION RunScan&#40;cFile,hWnd,nRes&#41; LOCAL oScanner &#58;= Scanner&#40;&#41;&#58;New&#40;hWnd&#41; DEFAULT nRes &#58;= 100 // Scanner resolution in Dpi oScanner&#58;Choose&#40;&#41; oScanner&#58;Set&#40;&#46;T&#46;&#41; // Set User Interface Off oScanner&#58;DigiToFile&#40;cFile,nRes&#41; // Acquires oScanner&#58;End&#40;&#41; oWnd&#58;End&#40;&#41; RETURN NIL #endif CLASS Scanner DATA hWnd AS NUMERIC // Handle of the window DATA hDll AS NUMERIC // Handle of the DLL DATA lLoad AS LOGICAL // &#46;T&#46; DLL & Driver Loaded DATA hDib AS NUMERIC // Current Dib handle * METHOD New&#40;&#41; CONSTRUCTOR METHOD End&#40;&#41; METHOD Set&#40;&#41; // Acquiring Dialog ON/OFF METHOD Choose&#40;&#41; // Select Image Device Source METHOD DigiToFile&#40;&#41; // Acquire Image and save to a file METHOD DigiToClip&#40;&#41; // Acquire Image and copy to ClipBoard METHOD SetResolution&#40;&#41; // Set Dpi for the scanner * PROTECTED &#58; METHOD Free&#40;&#41; // Release Dib's handle METHOD IsActive&#40;&#41; // Twain Driver Loaded METHOD Register&#40;&#41; // Register my application into Twain application METHOD DibToFile&#40;&#41; // Write to file Dib's handle in BMP format END CLASS METHOD New&#40;hWnd&#41; // Constructor &#58;&#58;hWnd &#58;= iif&#40; ValType&#40; hWnd &#41; == "N" , hWnd , 0 &#41; &#58;&#58;lLoad &#58;= &#46;T&#46; &#58;&#58;hDLL &#58;= LoadLibrary&#40; TWAIN_DLL &#41; &#58;&#58;hDib &#58;= 0 if &#58;&#58;hDll <= 21 &#58;&#58;lLoad &#58;= &#46;F&#46; MsgAlert&#40; BuildError&#40;&#58;&#58;hDll&#41; , TWAIN_DLL &#41; RETU Self end if &#40; &#58;&#58;lLoad &#58;= &#58;&#58;IsActive&#40;&#41; &#41; &#58;&#58;Register&#40;&#41; end RETU Self METHOD End&#40;&#41; // Destructor if &#58;&#58;hDib != 0 &#58;&#58;Free&#40; &#58;&#58;hDib &#41; end FreeLibrary&#40; &#58;&#58;hDll &#41; RETU NIL METHOD DigiToFile&#40; cFile , nRes &#41; // Acquire Document & save to file LOCAL nPixType &#58;= 0 LOCAL cFarProc DEFAULT nRes &#58;= 100 &#58;&#58;SetResolution&#40; nRes &#41; if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_AcquireNative",&#46;T&#46;, WORD,WORD,_INT &#41; &#58;&#58;hDib &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd,nPixType &#41; if &#58;&#58;hDib == 0 MsgInfo&#40;"Cannot Load Image, Scanner not found",""&#41; else &#58;&#58;DibToFile&#40;&#58;&#58;hDib,cFile&#41; &#58;&#58;Free&#40; &#58;&#58;hDib &#41; end end RETU Self METHOD DigiToClip&#40;&#41; // Acquire document & copy to ClipBoard LOCAL nPixType &#58;= 0 LOCAL cFarProc LOCAL nResult if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_AcquireToClipBoard",&#46;T&#46;, _INT,WORD,_INT &#41; nResult &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd,nPixType &#41; end RETU Self METHOD SetResolution&#40; nDpi &#41; // NEW LOCAL cFarProc LOCAL uResult DEFAULT nDpi &#58;= 100 if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SetResolution",&#46;T&#46;, VOID,_DOUBLE &#41; uResult &#58;= CallDLL&#40; cFarProc,nDpi &#41; end RETU Self METHOD Set&#40;lShow&#41; // Show-Hide Scanner's Dialog Box LOCAL nHide &#58;= 0 // Default&#58; Shows Scanner's Dialog Box LOCAL cFarProc LOCAL uResult DEFAULT lShow &#58;= &#46;T&#46; if &#58;&#58;lLoad nHide &#58;= iif&#40;lShow,0,1&#41; cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SetHideUI",&#46;T&#46;, VOID,_INT &#41; uResult &#58;= CallDLL&#40; cFarProc,nHide &#41; end RETU Self METHOD Choose&#40;&#41; // Select Image Device Source LOCAL cFarProc LOCAL nResult if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SelectImageSource",&#46;T&#46;, _INT,WORD &#41; nResult &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd &#41; end RETU Self //---------- Protected Methods METHOD Free&#40;hDib&#41; // Release Dib's Handle LOCAL cFarProc LOCAL uResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_FreeNative",&#46;T&#46;, VOID,WORD &#41; uResult &#58;= CallDLL&#40; cFarProc,hDib &#41; RETU NIL METHOD DibToFile&#40;hDib,cFile&#41; // Write to File From DIB's handle LOCAL cFarProc LOCAL nResult LOCAL lRet cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_WriteNativeToFilename",&#46;T&#46;, _INT,WORD,LPSTR&#41; lRet &#58;= &#40; &#40;nResult&#58;=CallDLL&#40; cFarProc,hDib,cFile &#41;&#41;==0 &#41; DO CASE CASE nResult == -1 MsgInfo&#40;"Annullato dall'utente","File non registrato"&#41; CASE nResult == -2 MsgInfo&#40;"Errore durante la scrittura sul file "+cFile,"File non registrato"&#41; CASE nResult == -3 MsgInfo&#40;"Errore interno sul file DIB","File non registrato"&#41; CASE nResult == -4 MsgInfo&#40;"Errore durante la scrittura sul file "+cFile+", probabile spazio insufficiente sul disco !","File non registrato"&#41; ENDCASE RETU lRet METHOD IsActive&#40;&#41; // Is Twain driver loaded ? LOCAL cFarProc LOCAL nResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_IsAvailable",&#46;T&#46;, _INT &#41; if ! &#40;nResult &#58;= CallDLL&#40; cFarProc &#41;&#41; == 1 MsgAlert&#40;"Nessun driver per apparecchi TWAIN compatibili risulta disponibile !","Errore hardware"&#41; // Messaggio inviato direttamente da TWAIN&#46;DLL end RETU iif&#40;nResult==1,&#46;T&#46;,&#46;F&#46;&#41; METHOD Register&#40;&#41; // Register my application into Twain application LOCAL nMaiorNum &#58;= 1 LOCAL nMinorNum &#58;= 0 // Result -> 1&#46;0 LOCAL nLanguage &#58;= 0 LOCAL nCountry &#58;= 0 LOCAL cVersion &#58;= "1&#46;0" LOCAL cManifact &#58;= "The Genius" LOCAL cFamily &#58;= "Digitizer" LOCAL cProduct &#58;= StrTran&#40;cFileName&#40;GetModuleFileName&#40;GetInstance&#40;&#41;&#41;&#41;,"&#46;EXE",""&#41; LOCAL cFarProc LOCAL uResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_RegisterApp",&#46;T&#46;,; VOID,_INT,_INT,_INT,_INT,LPSTR,LPSTR,LPSTR,LPSTR &#41; uResult &#58;= CallDLL&#40; cFarProc,nMaiorNum,nMinorNum,nLanguage,nCountry,cVersion,cManifact,cFamily,cProduct &#41; RETU NIL //---------- END Protected Methods STATIC FUNCTION BuildError&#40;nError&#41; LOCAL cRet &#58;= "Errore nella libreria dinamica" DO CASE CASE nError == 0 cRet &#58;= "Memoria insufficiente ad eseguire il programma" CASE nError == 2 cRet &#58;= "File non trovato" CASE nError == 3 cRet &#58;= "Percorso non trovato" CASE nError == 5 cRet &#58;= "Tentantivo di collegarsi dinamicamente ad un task o errore di condivisione" CASE nError == 6 cRet &#58;= "La libreria richiede un segemento separato per ogni task" CASE nError == 8 cRet &#58;= "Memoria insufficiente ad avviare l'applicazione" CASE nError == 10 cRet &#58;= "Versione di MS Windows non corretta" CASE nError == 11 cRet &#58;= "Libreria non valida oppure non Š un'applicazione MS Windows" CASE nError == 12 cRet &#58;= "Applicazione disegnata per un sistema operativo diverso" CASE nError == 13 cRet &#58;= "Applicazione disegnata per MS-DOS 4&#46;0" CASE nError == 14 cRet &#58;= "Tipo di file eseguibile sconosciuto" CASE nError == 15 cRet &#58;= "Tentativo di caricare un'applicazione disegnata per funzionare in modalit… reale" CASE nError == 16 cRet &#58;= "Tentativo di caricare una seconda istanza dell'applicazione contenente segmenti di dati multipli non marcati per la sola lettura" ENDCASE RETU OemToAnsi&#40; cRet + "!" &#41; //------------------ Freeimage&#46;dll ------------------------// FUNCTION SaveImage&#40; cFile &#41; LOCAL nFormat, hDib, hInfoH, hInfo, hBits, hWnd, hDC, hBmp, lOk #ifdef __CLIPPER__ hLib = LOADLIB32&#40; "freeimage&#46;dll" &#41; #else hLib = LOADLIBRARY&#40; "freeimage&#46;dll" &#41; #endif if hLib <= 32 MsgStop&#40; "Cannot load FreeImage&#46;dll" &#41; return 0 endif nFormat &#58;= FIGETFILETYPE&#40; cFile, 0 &#41; hDib &#58;= FILOAD&#40; nFormat, cFile, 0 &#41; hInfoH &#58;= FIGETINFOHEADER&#40; hDib &#41; hInfo &#58;= FIGETINFO&#40; hDib &#41; hBits &#58;= FIGETBITS&#40; hDib &#41; hWnd &#58;= GETDESKTOPWINDOW&#40;&#41; #ifdef __CLIPPER__ hDC = GETDC32&#40; hWnd &#41; #else hDC = GETDC&#40; hWnd &#41; #endif lOk &#58;= fiSave&#40; 2 , hDib, cFile &#41; hBmp = CREATEDIBITMAP&#40; hDC, hInfoH, CBM_INIT, hBits, hInfo, DIB_RGB_COLORS &#41; #ifdef __CLIPPER__ RELEASEDC32&#40; hWnd, hDC &#41; #else RELEASEDC&#40; hWnd, hDC &#41; #endif FIUNLOAD&#40; hDib &#41; #ifdef __CLIPPER__ FREELIB32&#40; hLib &#41; #else FREELIBRARY&#40; hLib &#41; #endif RETURN hBmp DLL32 STATIC FUNCTION FIGETFILETYPE&#40; cFileName AS LPSTR, nSize AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetFileType@8" LIB hLib DLL32 STATIC FUNCTION FILOAD&#40; nFormat AS LONG, cFileName AS LPSTR, nFlags AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_Load@12" LIB hLib DLL32 STATIC FUNCTION FIUNLOAD&#40; hDib AS LONG &#41; AS VOID; PASCAL FROM "_FreeImage_Unload@4" LIB hLib DLL32 STATIC FUNCTION FIGETINFOHEADER&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetInfoHeader@4" LIB hLib DLL32 STATIC FUNCTION FIGETINFO&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetInfo@4" LIB hLib DLL32 STATIC FUNCTION FIGETBITS&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetBits@4" LIB hLib DLL32 STATIC FUNCTION FISAVE&#40; nFormat AS LONG, hDib AS LONG, cFileName AS LPSTR, nFlags AS LONG &#41; AS BOOL; PASCAL FROM "_FreeImage_Save@16" LIB hLib DLL32 STATIC FUNCTION FIROTATE&#40; hDib AS LONG, nAngle AS _DOUBLE &#41; AS LONG; PASCAL FROM "_FreeImage_RotateClassic@12" LIB hLib DLL32 STATIC FUNCTION GETDC32&#40; hWnd AS LONG &#41; AS LONG; PASCAL FROM "GetDC" LIB "user32&#46;dll" DLL32 STATIC FUNCTION RELEASEDC32&#40; hWnd AS LONG &#41; AS LONG; PASCAL FROM "ReleaseDC" LIB "user32&#46;dll" DLL32 STATIC FUNCTION CREATEDIBITMAP&#40; hDC AS LONG, hInfoH AS LONG, nFlags AS LONG, hBits AS LONG, hInfo AS LONG, nUsage AS LONG &#41; AS LONG; PASCAL FROM "CreateDIBitmap" LIB "gdi32&#46;dll" DLL32 FUNCTION WOWHANDLE16&#40; nHandle AS LONG, nHandleType AS LONG &#41; AS LONG; PASCAL FROM "WOWHandle16" LIB "wow32&#46;dll" [/code:6u855owo]
link error while compile testscan.prg and tscan.prg
Dutch, Thanks for your fast response. I am using this same code, from L. Gadaleta, without problem; but I would like to try the Rafa Carmona TSCAN.PRG class. The problem with Rafa Carmona TSCAN.PRG class is in the C wrappers and I don't know how to solved it. Regards, George
link error while compile testscan.prg and tscan.prg
Dear George, I'm sorry. I don't look in it. Regards, Dutch
link error while compile testscan.prg and tscan.prg
[quote="dutch":16jtd29l]Dear George, I'm sorry. I don't look in it. Regards, Dutch[/quote:16jtd29l]Sorry , I not view this message.You only have convert .DLL a .lib. // For create library, twain.lib : IMPLIB -a -f twain.lib EZTW32.dllYou have link twain.lib in your .batRegards.Rafa Carmona
link error....
Hi.. Compiling... Harbour devel build 1.1-0 Intl. Copyright 1999-2007, <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --> Compiling 'main.prg' and generating preprocessed output to 'main.ppo'... .. Lines 5931, Functions/Procedures 34 Generating C source output to 'main.c'... Done. main.c Creating library main.lib and object main.exp FiveHcm.lib(RICHEDIT.obj) : error LNK2001: unresolved external symbol _OleUIPasteSpecialA@4 main.exe : fatal error LNK1120: 1 unresolved externals * There are errors
link error....
Yunbg, You have to link MS OleDlg.lib
link in my own library
Dear Antonio, Can you please advise me on how I can link in my library or prg-files? Should we link in compiled files or plain prg files? Best regards, Otto
link in my own library
Dear Otto, You have to include your PRGs (or libraries) filenames in modharbour.hbp [url:333fth0n]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/windows/modharbour&#46;hbp[/url:333fth0n] in apache.prg add your functions names as "extern" [url:333fth0n]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/source/apache&#46;prg[/url:333fth0n] Finally run go64.bat and you will get your mod_harbour with your extra PRGs (or libraries) built in [url:333fth0n]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/windows/go64&#46;bat[/url:333fth0n]
link in my own library
Dear Antonio, Thank you so much. I understand. How do I only include an external file for a single project without changing APACHE? Best regards, Otto
link in my own library
You may use: #include "myfile.prg" better place it at the bottom of your main PRG we use this in our developments <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
link in my own library
Dear Antonio, Thank you so much. Best regards, Otto
link para subir archivos
despues de batallar aqui dejo algunos <!-- m --><a class="postlink" href="http://www.zshare.net/">http://www.zshare.net/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.speedyshare.com/">http://www.speedyshare.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://d.turboupload.com/d/">http://d.turboupload.com/d/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.savefile.com/">http://www.savefile.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.4shared.com/">http://www.4shared.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.filelodge.com/">http://www.filelodge.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://hyperupload.com/">http://hyperupload.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.mooload.com/">http://www.mooload.com/</a><!-- m --> 70MB - 300MB <!-- m --><a class="postlink" href="http://www.mooload.com/">http://www.mooload.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://www.uploading.com/">http://www.uploading.com/</a><!-- m --> <!-- m --><a class="postlink" href="http://storeandserve.com/">http://storeandserve.com/</a><!-- m --> salu2 paco
link para subir archivos
Paco, <!-- w --><a class="postlink" href="http://www.mediafire.com">www.mediafire.com</a><!-- w --> <!-- w --><a class="postlink" href="http://www.megaupload.com">www.megaupload.com</a><!-- w -->
link to cash register
a base class to link to cash register protocol xon xoff
link to pc on a lan
Dear friends, Can I see in a windows or dialog all pc there are in a lan ? How I can make it ? Can I link to a pc and read and write a dbf or an ini file ? How I can make it ? can I have a small test ? I hope yoour help ------
link to pc on a lan
Here is how I do it. 1. I have a password security sign-on for my app that identifies the user, and refers to a members.dbf that contains the ID number assigned to each allowed user. Upon sign-on, that user ID # is copied into a file-wide static memvar. 2. Upon completion of launching the main app, the program accesses a USERS.DBF containing two fields and creates a temporary record there with the user's ID# and name. This file has only three fields, one for the ID, one for the user's name, and another for a memo field used to store any message to be sent to the user. 3. Each time the user activates a program module within the app, the program checks his/her temporary USERS.DBF record to see if there is a message waiting there. 4. The system administrator has access to a function with a dialog box that displays a list of all users currently online (by listing the people signed on from USERS.DBF). A button on this dialog box enables recording a message in the memo field of the USER.DBF record of the person selected from the list. Another button enables sending one message to all users currently on line (like "please sign-off ASAP"). Any user activity, as mentioned in #3 above, causes the user to see the message sent. 5. When a user signs off of the app, his/her temp record is blanked so it can be reused by the next person who signs on. I hope this concept helps. - Roger
link to pc on a lan
In point #1 above, I forgot to mention that the program also picks up the user's name from the members.dbf file.
link to pc on a lan
thanks roger but I trying to found a simply sample to working ...
linkando varios PRGs
Hola. Uso FW 2.3c, harbour y bcc55. He modificado el fichero de ejemplo buildh.bat pero no consigo linkar varios PRGs como hacía antes con blinker fi menu @linkados cómo he de hacerlo ? Gracias
linkando varios PRGs
Chocochester: Tenes que repetir las lineas donde se llama al compilador (harbour): %hdir%\bin\harbour %1 /n /i..\include;%hdir%\include /w /p %2 %3 > clip.log Y las lineas donde se genera b32.bc para el bcc32: echo %1.obj, + >> b32.bc echo %1.exe, + >> b32.bc echo %1.map, + >> b32.bc Repitiendolas por cada prg. Si no queres complicarte podes usar cualquiera de las aplicaciones que hay para compilar (frontend, xmate, ajmake, etc, etc) donde es mucho mas sencillo configurar todo. Saludos,
linking Class TActiveX from FWH instead of xHB comercial
Hello, How can I link the Tactivex class from FWH instead of the one from xHB ? Antonio
linking Class TActiveX from FWH instead of xHB comercial
Antonio, Link FiveHX.lib before xHarbour libraries
linking Class TActiveX from FWH instead of xHB comercial
Antonio, I get this error Type: C >>>TMAKEPROJECT<<< Type: C >>>TMAKEPROJECT:REFRESH<<< Type: N >>> 1266<<< Antonio
linking Class TActiveX from FWH instead of xHB comercial
It looks as you are using xHB builder, right ?
linking Class TActiveX from FWH instead of xHB comercial
Right. Antonio
linking Class TActiveX from FWH instead of xHB comercial
Antonio, Please include fwh/source/classes/activex.prg as a PRG of your application. So it will get linked before.
linux gcc compiler error help me.
Hi Antonio. This code is test. The compiler the error petty to catch Can you make a build.sh file ? lib, include file send to email. Can you library additional method and Build.sh which it will make the possibility of decreasing it is? Thank you. [code:32vvmsgw] #include "FiveLinux&#46;ch" FUNC Main&#40;&#41; loca oWnd, oBrw DEFINE WINDOW oWnd TITLE "Testing Browses" SIZE 522, 317 @ 28, 2 BUTTON "_Ok" OF oWnd ACTION msginfo&#40;TTIME&#40;&#41;&#41; @ 28, 10 BUTTON "_Exit" OF oWnd ACTION oWnd&#58;End&#40;&#41; @ 28, 28 BUTTON "_Test" OF oWnd ACTION OPEN_PORT1&#40;oWnd&#58;hWnd, "testtetetete"&#41; @ 28, 46 BUTTON "_Port" OF oWnd ACTION TEST&#40;&#41; ACTIVATE WINDOW oWnd RETU NIL /*----------------------------------------*/ #pragma BEGINDUMP #include <hbapi&#46;h> //#include <hbdefs&#46;h> #include <gtk/gtk&#46;h> #define _LARGEFILE64_SOURCE 1 #include <stdlib&#46;h> #include <stdio&#46;h> #include <unistd&#46;h> #include <sys/types&#46;h> #include <sys/stat&#46;h> #include <fcntl&#46;h> #include <errno&#46;h> #include <signal&#46;h> #include <termios&#46;h> #define _DEFINE_FMP_TYPES_ #include <fmp&#46;h> #define PLAYING 1 #define PAUSED 0 #define FMPE_OK 0x00000000 /* No error */ #define FMPF_DVD 6 /* DVD demux */ #define NO_DRIVE 0xFF /* No DVD-ROM drive */ int peek = -1; struct termios orig, new; HB_FUNC&#40; TTIME &#41; &#123; struct tm *tm_ptr; int i; char sm&#91;50&#93;; time_t the_time; &#40;void&#41; time&#40;&the_time&#41;; tm_ptr = gmtime&#40;&the_time&#41;; sprintf&#40;sm, "%02d&#58;%02d&#58;%02d", tm_ptr->tm_hour, tm_ptr->tm_min, tm_ptr->tm_sec&#41;; hb_retc&#40;sm&#41;; &#125; HB_FUNC&#40; TEST &#41; &#123; int fd; int streamtype; int bytesread=1,rc=FMPE_OK; int buf, playfile_state; int b_stopit = 0, b_getoutofit = 0; streamtype=FMPF_DVD; MPEGDriverEntry&#40;NO_DRIVE&#41;; FMPOpen&#40;streamtype,32*1024,10, NULL, 0&#41;; FMPPlay&#40;&#41;; hb_retc&#40;"OK"&#41;; &#125; HB_FUNC&#40; OPEN_PORT1 &#41; &#123; GtkWidget * hWnd, * hWndParent = NULL; hWnd = hb_parnl&#40;1&#41;; CheckGtkInit&#40;&#41;; if&#40; gtk_window_list_toplevels&#40;&#41; &#41; hWndParent = gtk_window_list_toplevels&#40;&#41;->data; hWnd = gtk_message_dialog_new&#40; GTK_WINDOW&#40; hWndParent &#41;, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, hb_parc&#40;2&#41; &#41;; gtk_window_set_transient_for&#40; GTK_WINDOW&#40; hWnd &#41;, GTK_WINDOW&#40; hWndParent &#41; &#41;; gtk_window_set_policy&#40; GTK_WINDOW&#40; hWnd &#41;, FALSE, FALSE, FALSE &#41;; gtk_window_set_position&#40; GTK_WINDOW&#40; hWnd &#41;, GTK_WIN_POS_CENTER &#41;; gtk_dialog_run&#40; GTK_DIALOG&#40; hWnd &#41; &#41;; gtk_widget_destroy&#40; hWnd &#41;; &#125; #pragma ENDDUMP [/code:32vvmsgw] this code is RMPLAYFILE ->Makefile [code:32vvmsgw] CFLAGS+=-D_BARBADOS_=1 -Wall -D_REENTRANT INCLUDEDIR+=-I&#46;&#46;/include LIBDIR+=-L&#46;&#46;/lib ifeq &#40;$&#40;COMPILKIND&#41;,release&#41; CDEBUG=-O2 LDEBUG=-O2 else CDEBUG=-g LDEBUG=-g endif CFLAGS+=$&#40;CDEBUG&#41; $&#40;INCLUDEDIR&#41; LDFLAGS+=$&#40;LDEBUG&#41; $&#40;LIBDIR&#41; -lpthread progs = playfile&#46;o playfile&#58; $&#40;progs&#41; &#46;&#46;/lib/libEM84xx&#46;so $&#40;CC&#41; $&#40;LDFLAGS&#41; -lEM84xx $&#40;progs&#41; -o $@ ifeq &#40;$&#40;COMPILKIND&#41;,release&#41; strip $@ endif clean&#58; $&#40;RM&#41; $&#40;progs&#41; *~ playfile [/code:32vvmsgw] this code is RMPLAYFILE ->playfile.c code [code:32vvmsgw] #define _LARGEFILE64_SOURCE 1 #include <stdlib&#46;h> #include <stdio&#46;h> #include <unistd&#46;h> #include <sys/types&#46;h> #include <sys/stat&#46;h> #include <fcntl&#46;h> #include <errno&#46;h> #include <signal&#46;h> #include <termios&#46;h> #define _DEFINE_FMP_TYPES_ #include "fmp&#46;h" #define PLAYING 1 #define PAUSED 0 int peek = -1; struct termios orig, new; void open_port&#40;&#41; &#123; if &#40;tcgetattr&#40;0,&orig&#41;==-1&#41; &#123; printf&#40;"Could not tcgetattr"&#41;; exit&#40;1&#41;; &#125; new = orig; /* settings for raw mode */ new&#46;c_lflag &= ~ICANON; new&#46;c_lflag &= ~ECHO; new&#46;c_lflag &= ~ISIG; new&#46;c_cc&#91;VMIN&#93; = 1; new&#46;c_cc&#91;VTIME&#93; = 0; if &#40;tcsetattr&#40;0,TCSANOW,&new&#41;==-1&#41; &#123; printf&#40;"Could not tcsetattr"&#41;; exit&#40;1&#41;; &#125; &#125; void close_port&#40;&#41; &#123; tcsetattr&#40;0, TCSANOW, &orig&#41;; &#125; int kbhit&#40;&#41; &#123; char ch; int nread; if&#40;peek != -1&#41; return 1; new&#46;c_cc&#91;VMIN&#93; = 0; tcsetattr&#40;0, TCSANOW, &new&#41;; nread = read&#40;0, &ch, 1&#41;; new&#46;c_cc&#91;VMIN&#93; = 1; tcsetattr&#40;0, TCSANOW, &new&#41;; if&#40;nread == 1&#41; &#123; peek = ch; return 1; &#125; return 0; &#125; int readch&#40;&#41; &#123; char ch; if&#40;peek != -1&#41; &#123; ch = peek; peek = -1; return ch; &#125; read&#40;0, &ch, 1&#41;; return ch; &#125; DWORD setOutputMode&#40;DWORD newvgatv&#41; &#123; DWORD vgatv; vgatv = FMPGet&#40;FMPI_VIDEOOUT&#41;; vgatv = vgatv & &#40;~FMPV_VIDEOOUT_MODE_MASK&#41;; vgatv = vgatv | newvgatv; return FMPSet&#40;FMPI_VIDEOOUT, vgatv&#41;; &#125; int main&#40;int argc,char **argv&#41; &#123; int fd; int streamtype; int bytesread=1,rc=FMPE_OK; int buf, playfile_state; int b_stopit = 0, b_getoutofit = 0; if &#40;argc!=3&#41; &#123; fprintf&#40;stderr, "Syntax is playfile <streamtype> <filename>\n" "<streamtype -> t &#40;transport&#41; d &#40;dvd&#41; s &#40;system&#41;\n" " p &#40;program&#41; v &#40;video&#41; m &#40;mpeg audio&#41; a &#40;mpeg2 ac3&#41;>\n" "Example&#58; &#46;/playfile s /samplempeg/movie&#46;mpg\n" "During the file playing use your keyboard&#58;\n" " 'r' to rewind from the beginning,\n" " 'q' to stop, close and exit propely&#46;\n" &#41;; exit&#40;1&#41;; &#125; switch &#40;argv&#91;1&#93;&#91;0&#93;&#41; &#123; case 't'&#58; streamtype=FMPF_TRANSPORT; break; case 'd'&#58; streamtype=FMPF_DVD; break; case 's'&#58; streamtype=FMPF_SYSTEM; break; case 'p'&#58; streamtype=FMPF_PROGRAM; break; case 'v'&#58; streamtype=FMPF_VIDEO; break; case 'm'&#58; streamtype=FMPF_MPEG_AUDIO; break; case 'a'&#58; streamtype=FMPF_AC3; break; default&#58; fprintf&#40;stderr, "Syntax is playfile <streamtype> <filename>\n" "<streamtype -> t &#40;transport&#41; d &#40;dvd&#41; s &#40;system&#41;\n" " p &#40;program&#41; v &#40;video&#41; m &#40;mpeg audio&#41; a &#40;mpeg2 ac3&#41;>\n" "Example&#58; &#46;/playfile s /samplempeg/movie&#46;mpg\n" "During the file playing use your keyboard&#58;\n" " 'r' to rewind from the beginning,\n" " 'q' to stop, close and exit propely&#46;\n" &#41;; exit&#40;1&#41;; &#125; MPEGDriverEntry&#40;NO_DRIVE&#41;; FMPOpen&#40;streamtype,32*1024,10, NULL, 0&#41;; FMPPlay&#40;&#41;; fd=open&#40;argv&#91;2&#93;,O_RDONLY|O_LARGEFILE&#41;; if &#40;fd==-1&#41; &#123; perror&#40;"open failed"&#41;; exit&#40;1&#41;; &#125; open_port&#40;&#41;; playfile_state = PLAYING; while &#40;rc==FMPE_OK && !b_getoutofit&#41; &#123; while &#40;bytesread && !b_stopit&#41; &#123; FMP_BUFFER FMPBuf; static int count=0; if&#40;kbhit&#40;&#41;&#41; &#123; buf = readch&#40;&#41;; switch&#40;buf&#41; &#123; case 'r'&#58; b_stopit = 1; fprintf&#40;stdout,">> Rewind &#46;&#46;&#46;\n"&#41;; break; case 'q'&#58; b_stopit = 1; b_getoutofit = 1; break; default&#58; break; &#125; &#125; // get a pointer to a free buffer rc = FMPGetBuffer &#40;&FMPBuf, TRUE&#41;; if &#40;rc != FMPE_OK&#41; &#123; printf &#40;"FMPError &#58; %s\n", FMPGetLastError&#40;rc&#41;&#41;; break; &#125; // signals can cause harmless EINTR while &#40;&#40;&#40;bytesread=read&#40;fd,FMPBuf&#46;pBuffer,FMPBuf&#46;dwBufferSize&#41;&#41;==-1&#41; &&&#40;errno==EINTR&#41;&#41;; if &#40;bytesread==-1&#41; bytesread=0; FMPBuf&#46;dwDataSize=bytesread; // the buffer is ready to be queued FMPPush &#40;&FMPBuf&#41;; count++; #define ONEEVERY 20 if &#40;count%ONEEVERY==0&#41; printf&#40;"PTS %ld / STC %ld\n", FMPGet &#40;FMPI_PTS&#41;, FMPGet &#40;FMPI_STC&#41;&#41;; &#125; FMPStop&#40;&#41;; FMPPlay&#40;&#41;; if&#40;!b_getoutofit&#41; b_stopit = 0; lseek &#40;fd,0,SEEK_SET&#41;; bytesread=1; &#125; fprintf&#40;stdout,">>Exited from playing loop !\n"&#41;; close_port&#40;&#41;; close &#40;fd&#41;; FMPStop&#40;&#41;; setOutputMode&#40;FMPV_VIDEOOUT_VGA&#41;; FMPClose&#40;&#41;; MPEGDriverUnload&#40;&#41;; fprintf&#40;stdout,">>Driver is closed !\n"&#41;; exit&#40;0&#41;; &#125; [/code:32vvmsgw] FiveLinux User.
linux gcc compiler error help me.
We are reviewing it, we provide you an answer asap,
linux gcc compiler error help me.
We need fmp.h, thanks
linux gcc compiler error help me.
[quote="Antonio Linares":35otkmf4]We need fmp.h, thanks[/quote:35otkmf4] [code:35otkmf4] #ifndef __FMP_h__ #define __FMP_h__ #ifdef __cplusplus extern "C"&#123; #endif /*+------------------------------------------------------------------------- * * Sigma Designs * Copyright 1998 Sigma Designs, Inc&#46; * *--------------------------------------------------------------------------*/ #define _MAX_STRING_ 256 #ifdef _DEFINE_FMP_TYPES_ typedef unsigned long DWORD; typedef long LONG; typedef unsigned short WORD; typedef unsigned char BYTE; typedef int BOOL; #ifndef TRUE #define TRUE 1 #endif // TRUE #ifndef FALSE #define FALSE 0 #endif // FALSE #ifdef _UNICODE_ typedef unsigned short TCHAR; #else typedef char TCHAR; #endif // _UNICODE_ #ifdef _BARBADOS_ typedef unsigned long long ULONGLONG; #endif #endif // _DEFINE_FMP_TYPES_ // Callback definition typedef DWORD &#40;*PFMPCALLBACK&#41; &#40;DWORD dwContext, DWORD dwMsg, DWORD dwValue&#41;; typedef struct tagFMP_BUFFER&#123; BYTE *pBuffer; // Address of the buffer DWORD dwBufferSize; // Size of the buffer DWORD dwDataSize; // Size of valid data in the buffer DWORD dwFlags; // Flags DWORD dwFlagsEx; // Extended flags DWORD pReserved&#91;8&#93;; // Reserved &#125; FMP_BUFFER, *PFMP_BUFFER; //@struct FMP_OPENSTRUCT | Parameter sent to the Graph Manager upon opening typedef struct tagFMP_OPENSTRUCT&#123; DWORD dwStructSize; // @field Size of the structure DWORD dwFlags; // @field Open Flag // @flag FMPF_TRANSPORT | Transport stream demux // @flag FMPF_SYSTEM | System stream demux // @flag FMPF_PROGRAM | Program stream demux // @flag FMPF_VIDEO | Video stream &#40;MPEG1/MPEG2&#41; // @flag FMPF_MPEG_AUDIO | MPEG Audio stream // @flag FMPF_AC3 | AC3 Audio stream // @flag FMPF_DVD | DVD demux // @flag FMPF_SVCD | VCD/SVCD demux // @flag FMPF_DISCPLAYBACK 0xFFFFFFFF | DWORD dwSize; // @field Size of buffers DWORD dwCount; // @field Number of buffers PFMPCALLBACK pCallback; // @field FMP Callback DWORD dwContext; // @field Callback context BYTE bDriverNumber; // @field Driver Number TCHAR* sFileName; // @field File Name BYTE bFileSystem; // @field disk data access method // @flag SYS_ACCESS | using the OS function // @flag UDF_ACCESS | using UDF // @flag ISO_ACCESS | using ISO9660 BYTE bDiscContent; // @field Disc Content &#40;returned by the driver&#41; // @flag FMPC_DVD_VIDEO | DVD Video Disc // @flag FMPC_VCD | Video CD Disc // @flag FMPC_SVCD | Super Video CD Disc &#125; FMP_OPENSTRUCT, *PFMP_OPENSTRUCT; // FMP Message Structure typedef struct tagFMPmsg&#123; DWORD dwCommand; DWORD dwArg1; DWORD dwArg2; DWORD dwArg3; DWORD dwArg4; DWORD dwArg5; BYTE pBuffer&#91;sizeof &#40;FMP_OPENSTRUCT&#41; + _MAX_STRING_&#93;; &#125; FMP_MSG, *PFMP_MSG; // Open flags #define FMPF_TRANSPORT 0 /* Transport stream demux&#46; */ #define FMPF_SYSTEM 1 /* System stream demux */ #define FMPF_PROGRAM 2 /* Program stream demux */ #define FMPF_VIDEO 3 /* Video stream &#40;MPEG1/MPEG2&#41; */ #define FMPF_MPEG_AUDIO 4 /* MPEG Audio stream */ #define FMPF_AC3 5 /* AC3 Audio stream */ #define FMPF_DVD 6 /* DVD demux */ #define FMPF_SVCD 7 /* SVCD/VCD demux */ #define FMPF_CDDA 8 /* CDDA demux */ #define FMPF_DRIVEPOLLING 9 /* minimum graphmanager for Drive polling only */ #define FMPF_PES 10 /* pes stream support */ #define FMPF_AAC_CELP 11 /* AAC CELP stream support */ #define FMPF_PES_MPEG4 12 /* MPEG4 PES stream support */ #define FMPF_DISCPLAYBACK 0xFFFFFFFF // Disc Content flags #define FMPC_DVD_VIDEO 0 /* DVD Video Disc */ #define FMPC_VCD 1 /* Video CD Disc */ #define FMPC_SVCD 2 /* Super Video CD Disc */ #define FMPC_CDDA 4 /* CD audio */ #define FMPC_UNSUPPORTED 0xFE /* namely, CDI and HQVCD */ #define FMPC_UNKNOWN 0xFF /* for error management purpose */ // Tray management constant #define FMPT_TRAYCHECK 10 #define FMPT_TRAYCHANGE 11 #define FMPT_TRAYCLOSE 1 #define FMPT_TRAYOPEN 0 // Used to specify the method to acces the files #define SYS_ACCESS 0x00 #define UDF_ACCESS 0x01 #define ISO_ACCESS 0x02 #define DONTCARE_ACCESS 0xFF // Buffer flags enum tagFMP_PROPERTY_FLAGS &#123; FMP_DATADISCONTINUITY = 0x1, /* Data discontinuity &#58; data loss */ FMP_TIMEDISCONTINUITY = 0x2, /* PTS discontinuity */ FMP_TRICKMODE_START = 0x4, /* Trick Mode Starts */ FMP_TYPECHANGED = 0x8, /* Type of data has changed */ FMP_TIMEVALID = 0x10, /* PTS is valid */ FMP_ENDOFSTREAM = 0x20, /* End of stream */ FMP_TRICKMODE_END = 0x40, /* Trick Mode Ends */ FMP_TRICKMODE_SAMPLE = 0x80, /* A Trick Mode Sample */ FMP_SVCD_TM_2X = 0x100, /* SVCD trick mode speed 2x */ FMP_SVCD_TM_3X = 0x200, /* SVCD trick mode speed 3x */ FMP_SVCD_TM_4X = 0x400, /* SVCD trick mode speed 4x */ // FMP_SVCD_FF = 0x800, FMP_SVCD_FR = 0x1000, FMP_SVCD_AUTOPAUSE = 0x2000, FMP_SVCD_SEQ_HDR = 0x4000, FMP_SVCD_UPDATE_PTS_REF = 0x8000, FMP_TRICKMODE_DVD = 0x10000, FMP_SEEKINGOP_DVD = 0x20000, FMP_SVCD_CDDA_TRACK = 0x40000 /* CDDA track on the VCD disk */ &#125;; // flags for the dwFlagsEx field in the FMP_BUFFER structure enum tagFMP_PROPERTY_FLAGS_EX &#123; FMP_VIDEO_PES = 0x1, FMP_AUDIO_PES = 0x2, FMP_DVD_AUDIO_PES = 0x4 &#125;; #define FMP_SVCD_FLAGS &#40;0x0000FF80&#41; #define FMP_DVD_FLAGS &#40;0x00010000&#41; // DriverNumber &#58; #define PRIMARY_MASTER 0x00 /* Drive is primary master */ #define SECONDARY_MASTER 0x02 /* Drive is secondary master */ #define NO_DRIVE 0xFF /* No DVD-ROM drive */ DWORD MPEGPowerOn &#40;BYTE bDriverNumber&#41;; DWORD MPEGPowerOff &#40;void&#41;; // Init MPEG driver DWORD MPEGDriverEntry &#40;BYTE bDriverNumber&#41;; // Prepare to Unload the driver DWORD MPEGDriverUnload &#40;void&#41;; // Open the MPEG driver &#40;Push Mode&#41; DWORD FMPOpen &#40;DWORD dwflags, DWORD dwSize, DWORD dwCount, PFMPCALLBACK pCallback, DWORD dwContext&#41;; // Open the MPEG driver &#40;Disc Playback&#41; DWORD FMPOpenDiscPlayback &#40;PFMP_OPENSTRUCT pFMPOpenStruct&#41;; // Close the MPEG driver DWORD FMPClose &#40;void&#41;; // Give version and copyright information DWORD FMPAbout&#40; TCHAR* sVersion, TCHAR* sDate, TCHAR *sCopyright &#41;; // Close a MPEG file and get ready to play another one DWORD FMPCloseFile&#40;void&#41;; // Stop playing a MPEG file and get ready to restart playing it at its beginning DWORD FMPStopFile&#40;void&#41;; // Really play a MPEG file DWORD FMPPlayFile&#40;char *&#41;; // Start MPEG playback DWORD FMPPlay &#40;void&#41;; // Stop MPEG playback DWORD FMPStop &#40;void&#41;; // Pause MPEG playback DWORD FMPPause &#40;void&#41;; // Flush internal FIFOs of the driver DWORD FMPFlush &#40;BOOL bGDF&#41;; // Get a buffer from the memory manager DWORD FMPGetBuffer &#40;PFMP_BUFFER pBuffer, BOOL bBlockingCall&#41;; // Push buffer into driver DWORD FMPPush &#40;PFMP_BUFFER pBuffer&#41;; // Get & Set DWORD FMPGet &#40;DWORD dwIndex&#41;; DWORD FMPSet &#40;DWORD dwIndex, DWORD dwValue&#41;; // set,get properties for Hwlib using rm84cmn&#46;h #include "rm84cmn&#46;h" DWORD FMPProperty&#40;DWORD dwFlags, DWORD dwPropSet, DWORD dwPropId, DWORD dwPropFlags, void* pPropData, DWORD dwPropSizeIn, DWORD* pdwPropSizeOut&#41;; // change the video port output dimensions DWORD FMPSetVideoPortDimensions &#40;DWORD Width, DWORD Height&#41;; // Queries for a specific interface // this interface is valid between FMPOpen and FMPClose DWORD FMPQueryInterface &#40;DWORD InterfaceId, void **ppv&#41;; #include "ifmp&#46;h" // Picture Placement DWORD FMPSetSource &#40;DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY&#41;; DWORD FMPSetVisibleSource &#40;DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY&#41;; DWORD FMPSetDestination &#40;DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY&#41;; DWORD FMPEnableOverlay &#40;DWORD dwEnable&#41;; DWORD FMPEnableFullScreen &#40;DWORD dwEnable&#41;; // Bitmap operation DWORD FMPEnableOSD &#40;DWORD dwEnable&#41;; DWORD FMPShowBitmap &#40;DWORD dwBitMap, DWORD dwAlphaBlendingFactor, DWORD dwX, DWORD dwY, DWORD dwcX, DWORD dwcY&#41;; // Disc operations DWORD FMPEjectDisc &#40;void&#41;; DWORD FMPLoadDisc &#40;void&#41;; DWORD FMPIsDiscLoaded&#40;void&#41;; DWORD FMPTrayOperation&#40; DWORD dwFMPTAction&#41;; // Get Last Error const char* FMPGetLastError &#40;DWORD dwError&#41;; /******************************************************************************* * DVD Functions *******************************************************************************/ //Play a Title by Title number DWORD TitlePlay &#40;DWORD dwTitleNumber&#41;; //Play from the beginning of a chapter specified by the Title number and the chapter number DWORD ChapterPlay&#40;BYTE bTitleNumber, WORD wChapterNumber&#41;; //Play from the specified position of the Title by the Title number and Time DWORD TimePlay&#40;BYTE bTitleNumber, TCHAR* sTime&#41;; //This command stops the current presentation and starts presentation from the specified position //of the title by Time within the same title&#46; DWORD TimeSearch&#40;TCHAR* sTime&#41;; //Stop the current presentation and start the presentation from the beginning of PTT &#40;Part_of_Title&#41; //specified by PTT numbers within the same Title&#46; DWORD ChapterSearch&#40;WORD wChapterNumber&#41;; //Stop the execution of the current Program Chain and play the GoUp Program Chain //&#40;specified in the current Program Chain&#41; DWORD GoUp&#40;void&#41;; //Stop the current presentation and start the presentation from the beginning //of previous Program within the same Program Chain &#40;PGC&#41;&#46; DWORD PrevPGSearch&#40;void&#41;; //Stop the current presentation and start the presentation from the beginning //of the current Program within the same PGC&#46; DWORD TopPGSearch &#40;void&#41;; //Stop the current presentation and start the presentation from the beginning //of the next Program within the same PGC&#46; DWORD NextPGSearch &#40;void&#41;; //The operation to scan play at the specified Speed&#46; //This user function includes scan play and slow playback for forward navigation //at any speed &#40;expect normal speed&#41;&#46; DWORD ForwardScan &#40;WORD wSpeed, BOOL bFast&#41;; //The operation to scan play at the specified Speed&#46; //This user function includes scan play and slow playback for backward navigation //at any speed &#40;expect normal speed&#41;&#46; DWORD BackwardScan &#40;WORD wSpeed, BOOL bFast&#41;; //Call the Menu in the Program Chain &#40;PGC&#41;&#46; DWORD MenuCall &#40;BYTE bMenuID&#41;; //This operation returns from the Menu-space DWORD Resume&#40;void&#41;; //This operation stops play for later resume of play DWORD StopForResume&#40;void&#41;; //DVD Query attributes DWORD DVDQueryAttribute&#40;DWORD dwFlag, DWORD dwArg&#41;; //Select the Buttons on the Menu Screen&#46; DWORD UpperButtonSelect&#40;void&#41;; DWORD LowerButtonSelect&#40;void&#41;; DWORD LeftButtonSelect&#40;void&#41;; DWORD RightButtonSelect&#40;void&#41;; //Activate the current Highlighted Button&#46; DWORD ButtonActivate&#40;void&#41;; //Activate the specified Highlighted Button&#46; DWORD ButtonSelectAndActivate&#40;BYTE bButton&#41;; //Operation to release Still&#46; DWORD StillOff&#40;void&#41;; //Pause the presentation&#46; DWORD PauseOn&#40;void&#41;; //Set the stream number of the Sub-Picture and whether the sub-picture is displayed or not&#46; DWORD SubPictureStreamChange &#40;BYTE bStreamNumber, BOOL bDisplayFlag&#41;; //Set the Stream number of the Audio&#46; DWORD AudioStreamChange &#40;BYTE bStreamNumber&#41;; //Select the language for System Menu according to the Language Code DWORD MenuLanguageSelect &#40;WORD dwCode&#41;; //In Angle Block, change the Angle DWORD AngleChange &#40;BYTE bAngleNumber&#41;; //Set the Parental Level DWORD ParentalLevelSelect &#40;BYTE bParentalLevel&#41;; //Set the Country Code for Parental Management DWORD ParentalCountrySelect &#40;DWORD dwCountryCode&#41;; //Change the mode of Audio Mixing mode for Karaoke&#46; DWORD KaraokeAudioPresentationMode &#40;DWORD dwMode&#41;; //Start or stop title repeat DWORD RepeatTitle&#40;void&#41;; //Start of stop chapter repeat DWORD RepeatChapter&#40;void&#41;; //Start AB repeat DWORD RepeatAB&#40;void&#41;; //Clear Repeat AB; DWORD ClearRepeatAB&#40;void&#41;; //Store bookmark DWORD StoreBookmark&#40;void *pBookmark&#41;; //Resume playback from bookmark DWORD ResumeBookmark&#40;void *pBookmark&#41;; //Stop the current presentation and start the presentation from the beginning //of the return play item&#46; DWORD ReturnPGSearch &#40;void&#41;; //Stop the current presentation and start the presentation from the beginning //of the default play item&#46; DWORD DefaultPGSearch &#40;void&#41;; // For VCD button selection DWORD NumericSelections &#40;BYTE sel&#41;; // Fastforward &#40;VCD and DVD&#41; DWORD FastForward &#40;BYTE bSpeed&#41;; // Rewind &#40;VCD and DVD&#41; DWORD Rewind &#40;BYTE bSpeed&#41;; // Step and pause MPEG playback DWORD FMPStep &#40;DWORD nFrames&#41;; // Region Code Control DWORD RegionCodeControl &#40;BOOL bInit, DWORD dwArg1, DWORD dwArg2&#41;; /******************************************************************************* * CD-Audio Commands *******************************************************************************/ DWORD CDDANextTrack&#40; void &#41;; DWORD CDDAPrevTrack&#40; void &#41;; DWORD CDDAFastForward&#40; DWORD dwSpeed &#41;; DWORD CDDARewind&#40; DWORD dwSpeed &#41;; #define CDDA_MODE_REPEAT_NONE 0 #define CDDA_MODE_REPEAT_TRACK 1 #define CDDA_MODE_REPEAT_DISC 2 DWORD CDDARepeat&#40; DWORD dwMode &#41;; DWORD CDDAGetNumberOfTracks&#40; BYTE* pbTrackNumber &#41;; DWORD CDDAGetTrackDuration&#40; BYTE bTrackNumber, DWORD *pbSeconds &#41;; DWORD CDDAGetStatus&#40; DWORD *pdwMode, BYTE *pbTrack, DWORD *pdwSeconds &#41;; DWORD CDDAPlayTrack&#40; DWORD dwTrack, DWORD dwMinutes, DWORD dwSeconds&#41;; /******************************************************************************* * Local Storage of Settings Commands *******************************************************************************/ DWORD FMPWriteProfileWord&#40; DWORD dwKeyIndex /* key index */, DWORD wValue /* value */&#41;; DWORD FMPGetProfileWord &#40; DWORD dwKeyIndex /* key index */&#41;; // DVD Index Keys #define RMREG_LANGUAGECODE 0x00 #define RMREG_MENU_LANGUAGECODE 0x01 #define RMREG_AUDIO_LANGUAGECODE 0x02 #define RMREG_SUBPICTURE_LANGUAGECODE 0x03 #define RMREG_SUBPICTURE_DISPLAY_MODE 0x04 #define RMREG_USER_ASPECT_RATIO 0x05 #define RMREG_USER_VIDEO_OUTPUT_MODE 0x06 #define RMREG_COUNTRYCODE 0x07 #define RMREG_PARENTALCONTROL 0x08 #define RMREG_PASSW_LOW_WORD 0x09 #define RMREG_PASSW_HIGH_WORD 0x0A #define RMREG_PASSW_STATE 0x0B #define RMREG_AUTOPLAY 0x0C #define RMREG_PBC_OFF 0x0D #define RMREG_MACROVISION 0x0E #define RMREG_REGION_CODE 0x0F #define RMREG_AUDIO_TYPE 0x10 #define RMREG_OUTPUTMODE 0x11 #define RMREG_HDTV_RES 0x12 #define RMREG_MAX 0x13 /******************************************************************************* * FMP Commands *******************************************************************************/ #define FMP_DRIVERUNLOAD 0xDD /* Unload the MPEG driver */ #define FMP_CLOSEFILE 0xCC /* Close the file and get ready to play another one */ #define FMP_STOPFILE 0xBB /* Stop Playing a File and get ready to replay at the beginning */ #define FMP_PLAYFILE 0xAA /* Really Play a File */ #define FMP_OPEN 0x01 /* Open New Stream */ #define FMP_CLOSE 0x02 /* Close Stream */ #define FMP_PLAY 0x03 /* Play Stream */ #define FMP_PAUSE 0x04 /* Pause Stream */ #define FMP_STOP 0x05 /* Stop Stream */ #define FMP_SEEK 0x06 /* Seek inside the stream */ #define FMP_STEP 0x07 /* Step a number of frames inside the stream */ #define FMP_SET 0x09 /* Driver Settings &#58; set */ #define FMP_GET 0x0A /* Driver Settings &#58; get */ #define FMP_PUSH 0x0B /* Push model &#58; push one buffer*/ #define FMP_FLUSH 0x0C /* Flush all the data inside the driver */ #define FMP_GETBUFFER 0x0D /* Get a buffer from the driver */ #define FMP_EJECT_DISC 0x0E /* issue an eject command to the dvdrom */ #define FMP_LOAD_DISC 0x0F /* issue a load command to the dvdrom */ #define FMP_SHOW_BITMAP 0x10 /* show a bitmap on the screen */ #define FMP_ENABLE_OSD 0x11 /* enable osd functionality */ #define FMP_SET_SOURCE 0x12 /* set the source capture dimensions */ #define FMP_SET_VISIBLE_SOURCE 0x13 /* set the dimensions in source to be zoomed in destination*/ #define FMP_SET_DESTINATION 0x14 /* set the destination rectangle */ #define FMP_ENABLE_OVERLAY 0x15 /* enable overlay functionality */ #define FMP_ENABLE_FULLSCREEN 0x16 /* enable full screen functionality */ #define FMP_IS_DISC_LOADED 0x17 /* Test whether a Disc is present in the drive */ #define FMP_QUERY_INTERFACE 0x18 /* Query Specific interfaces*/ #define FMP_REGISTER_INTERFACE 0x19 /* Register external interface */ #define FMP_SET_VIDEOPORT_DIMENSIONS 0x1a /* set dimensions of the output video port */ #define FMP_PROPERTY_GET 0x1b /* get properties */ #define FMP_PROPERTY_SET 0x1c /* get properties */ #define FMP_PROPERTY 0x1d /* reference to the FMPProperty&#40;&#41; function, I need that flag&#46; &#40;Pascal&#41; */ #define FMP_REGIONCONTROL 0x1e /* Region Code Control */ #define FMP_NAV_EOS 0x0100 /* Simulate EOS &#40;internal function&#41; */ #define FMP_NAV_CHECK_EOS 0x0101 /* Check if EOS is needed &#40;internal function&#41; */ #define FMP_NAV_AUTOPAUSE 0x0102 /* auto pause sector &#40;SVCD&#41; has finished */ #define FMP_NAV_COMMAND 0x0103 /* general navigation command */ #define FMP_TITLEPLAY 0x0200 /* DVD Title Play */ #define FMP_TIME_PLAY 0x0205 /* Time Play */ #define FMP_TIME_SEARCH 0x0208 /* Time Search */ #define FMP_RESUME 0x0210 /* Resume */ #define FMP_PREV_PG_SEARCH 0x020A /* Previous Program Search */ #define FMP_NEXT_PG_SEARCH 0x020C /* Next Program Search */ #define FMP_AST_STREAM_CHANGE 0x021B /* Audio Stream Change */ #define FMP_QUERY_ATTRIBUTE 0x0223 #define FMP_FORWARD_SCAN 0x020D /* Forward Scan */ #define FMP_BACKWARD_SCAN 0x020E /* Backward Scan */ #define FMP_REPEAT_TITLE 0x0224 /* Repeat Title */ #define FMP_REPEAT_CHAPTER 0x0225 /* Repeat Chapter */ #define FMP_REPEAT_AB 0x0226 /* AB Repeat */ #define FMP_CLEAR_REPEAT_AB 0x0227 /* AB Repeat */ #define FMP_STORE_BOOKMARK 0x0228 /* Store bookmark */ #define FMP_RESUME_BOOKMARK 0x0229 /* Restore bookmark */ #define FMP_DVD_PTT_PLAY 0x0201 /* Chapter Play */ #define FMP_DVD_STOP 0x0206 /* Stop */ #define FMP_DVD_GO_UP 0x0207 /* Go Up */ #define FMP_DVD_PTT_SEARCH 0x0209 /* Chapter Search */ #define FMP_DVD_TOP_PG_SEARCH 0x020B /* Top Program Search */ #define FMP_DVD_MENU_CALL 0x020F /* Menu Call */ #define FMP_DVD_UPPER_BUTTON_SELECT 0x0211 /* Upper Button Select */ #define FMP_DVD_LOWER_BUTTON_SELECT 0x0212 /* Lower Button Select */ #define FMP_DVD_LEFT_BUTTON_SELECT 0x0213 /* Left Button Select */ #define FMP_DVD_RIGHT_BUTTON_SELECT 0x0214 /* Right Button Select */ #define FMP_DVD_BUTTON_ACTIVATE 0x0215 /* Button Activate */ #define FMP_DVD_BUTTON_SELECT_AND_ACTIVATE 0x0216 /* Button Select and Activate */ #define FMP_DVD_STILL_OFF 0x0217 /* Still Off */ #define FMP_DVD_MENU_LANGUAGE_SELECT 0x021A /* Menu Language Select */ #define FMP_DVD_SPST_STREAM_CHANGE 0x021C /* Subpicture Stream Change */ #define FMP_DVD_ANGLE_CHANGE 0x021D /* Angle Change */ #define FMP_DVD_PARENTAL_LEVEL_SELECT 0x021F /* Parental Level Change */ #define FMP_DVD_PARENTAL_COUNTRY_SELECT 0x0220 /* Parental Country Change*/ #define FMP_DVD_KARAOKE_AUDIO_PRESENTATION 0x0221 /* Karaoke Audio Presentation change */ #define FMP_DVD_VIDEO_PRESENTATION_MODE_CHANGE 0x0222 /* Video Presentation Mode Change */ #define FMP_VCD_STOP_FOR_RESUME 0x0300 #define FMP_VCD_RETURN_PG_SEARCH 0x0306 /* VCD Return Play Item Search */ #define FMP_VCD_DEFAULT_PG_SEARCH 0x0307 /* VCD Default Play Item Search */ #define FMP_VCD_NUMERIC_SELECTIONS 0x0308 /* VCD Numeric Selection */ #define FMP_VCD_FAST_FORWARD 0x0309 /* VCD Numeric Selection */ #define FMP_VCD_REWIND 0x030A /* VCD Numeric Selection */ #define FMP_CDDA_NEXT_TRACK 0x0400 #define FMP_CDDA_PREV_TRACK 0x0401 #define FMP_CDDA_TRACK_DURATION 0x0402 #define FMP_CDDA_PLAY_TRACK 0x0403 #define FMP_WRITE_PROFILE_WORD 0x0500 #define FMP_GET_PROFILE_WORD 0x0501 #define FMP_ANALOG_OVERLAY 0x10000000 /* Analog Overlay */ #define FMP_EXTENDED_CMD_MASK 0xF0000000 /* Extended commands mask */ #define FMP_EXTENDED_SUBCMD_MASK 0x0FFFFFFF /* Extended subcommands mask */ /******************************************************************************* // FMP Errors *******************************************************************************/ #define FMPE_OK 0x00000000 /* No error */ #define FMPE_ERROR 0xFFFFFFFF /* Error &#58; use getLastError to get the Error code */ #define FMPE_DRIVER_OPEN 0x00000001 /* Driver Already Open &#40;FMPOpen&#41; */ #define FMPE_DRIVER_NOT_OPEN 0x00000002 /* Driver Not Open &#40;FMPClose&#41; */ #define FMPE_CANNOT_OPEN_DRIVER 0x00000003 /* Cannot open the MPEG driver */ #define FMPE_NOT_ENOUGH_MEMORY 0x00000004 /* No more memory available */ #define FMPE_NOT_IMPLEMENTED 0x00000005 /* This function is not implemented */ #define FMPE_INVALID_INDEX 0x00000006 /* Invalid Index &#40;settings&#41;*/ #define FMPE_READ_ONLY 0x00000007 /* Read Only settings */ #define FMPE_PUSH_WHILE_STOPPED 0x00000008 /* Pushing data in Stopped state */ #define FMPE_INVALID_PARAMETER 0x00000009 /* Invalid Parameter */ #define FMPE_NO_MPEG_SERVER 0x0000000A /* No MPEG Server is running*/ #define FMPE_NO_ANALOG_OVERLAY_CAPABILITY 0x0000000B /* No Analog Overlay */ #define FMPE_INVALID_STREAM_TYPE 0x0000000C /* This function does not support the current stream type */ #define FMPE_ENTRY_MOD_INIT_FAILED 0x0000000D /* MPEGDriverEntry Failed &#58; Module loader failed to initialize */ #define FMPE_ENTRY_HWL_INIT_FAILED 0x0000000E /* MPEGDriverEntry Failed &#58; Failed to create MPEG Hardware driver*/ #define FMPE_ENTRY_DVDDEV_INIT_FAILED 0x0000000F /* MPEGDriverEntry Failed &#58; Failed to create DVD-ROM device driver*/ #define FMPE_CDDA_FAILURE 0x00000010 /* CDDANextTrack &#58; Failure or end of disk has been reached &#40;or beginning&#41;*/ #define FMPE_UNEXPECTED 0x00000011 /* Unexpected unknown errors for VCD and SVCD */ #define FMPE_DISABLED 0x00000012 /* The function is currently is disabled */ #define FMPE_INVALIDARG 0x00000013 /* The list offset requested is out of range */ #define FMPE_TIMERACTIVATED 0x00000014 /* The timer has been activated */ #define FMPE_FAILURE 0x00000015 /* For VCD and SVCD failure */ /******************************************************************************* * FMP Settings *******************************************************************************/ #define FMPI_TRICKMODE 0x00000001 #define FMPI_STC 0x00000002 #define FMPI_PTS 0x00000003 #define FMPI_AUDIO_COUNT 0x00000004 #define FMPI_AUDIO_SELECT 0x00000005 #define FMPI_NPT_REFERENCE 0x00000006 #define FMPI_STC_REFERENCE 0x00000007 #define FMPI_BRIGHTNESS 0x00000008 #define FMPI_SATURATION 0x00000009 #define FMPI_CONTRAST 0x0000000A #define FMPI_LEFT_VOLUME 0x0000000B #define FMPI_RIGHT_VOLUME 0x0000000C #define FMPI_MUTE 0x0000000D #define FMPI_AUDIO_OUTPUT 0x0000000E #define FMPI_AUDIO_MODE 0x0000000F #define FMPI_AUDIO_VCXO 0x00000010 #define FMPI_VIDEOOUT 0x00000011 #define FMPI_SOURCE_WINDOW 0x00000012 #define FMPI_VISIBLE_SOURCE_WINDOW 0x00000013 #define FMPI_DESTINATION_WINDOW 0x00000014 #define FMPI_OVERLAY_FLAGS 0x00000015 #define FMPI_VIDEO_SPEED 0x00000016 #define FMPI_VIDEOPORT_WINDOW 0x00000017 #define FMPI_VIDEOASPECT 0x00000018 #define FMPI_AUDIO_SPEED 0x00000019 #define FMPI_DISC_TYPE 0x00001001 #define FMPI_ANGLES_AVAILABLE 0x00001002 #define FMPI_AUDIO_STREAMS_AVAILABLE 0x00001003 #define FMPI_BUTTONS_AVAILABLE 0x00001004 #define FMPI_CAN_SCAN 0x00001005 #define FMPI_CAN_SEEK 0x00001006 #define FMPI_CURRENT_ANGLE 0x00001007 #define FMPI_CURRENT_AUDIO_STREAM 0x00001008 #define FMPI_CURRENT_BUTTON 0x00001009 #define FMPI_CURRENT_CHAPTER 0x0000100A #define FMPI_CURRENT_DOMAIN 0x0000100B #define FMPI_CURRENT_POSITION 0x0000100C #define FMPI_CURRENT_SUBPICT_STREAM 0x0000100D #define FMPI_CURRENT_TIME 0x0000100E #define FMPI_CURRENT_TITLE 0x0000100F #define FMPI_SUBPICTURE_ON 0x00001010 #define FMPI_SUBPICTURE_STREAM_AVAILABLE 0x00001011 #define FMPI_TITLES_AVAILABLE 0x00001012 #define FMPI_TOTAL_TITLE_TIME 0x00001013 #define FMPI_CURRENT_SPEED 0x00001014 #define FMPI_SVCD_TRICK_MODE 0x00002000 #define FMPI_CURRENT_TRACK 0x00002001 #define FMPI_SVCD_DISCONTINUITY 0x00002002 #define FMPI_SVCD_CURRENT_VOLUME 0x00002003 #define FMPI_SVCD_VOLUMES_AVAILABLE 0x00002004 #define FMPI_TRACKS_AVAILABLE 0x00002005 #define FMPI_TOTAL_TRACK_TIME 0x00002006 #define FMPI_CDDA_REPEAT_MODE 0x00002007 /******************************************************************************* * FMP Messages *******************************************************************************/ #define FMPM_ERROR 0x00000001 #define FMPM_STARVATION 0x00000002 #define FMPM_EOS 0x00000003 #define FMPM_DVDROM_NOT_READY 0x00000004 #define FMPM_AUTOPAUSE 0x00000005 #define FMPM_REGION_MISMATCH 0x00000006 #define FMPM_TRICK_MODE_CHANGE 0x00000007 #define FMPM_DVD_ANGLE_CHANGE 0x00000100 #define FMPM_DVD_ANGLES_BLOCK 0x00000101 #define FMPM_DVD_AUDIO_STREAM_CHANGE 0x00000102 #define FMPM_DVD_BUTTONS_CHANGE 0x00000103 #define FMPM_DVD_BUTTON_CHANGE 0x00000104 #define FMPM_DVD_PROGRAM_START 0x00000105 #define FMPM_DVD_CURRENT_TIME 0x00000106 #define FMPM_DVD_DOMAIN_CHANGE 0x00000107 #define FMPM_DVD_NO_FP_PGC 0x00000108 #define FMPM_DVD_PARENTAL_LEVEL_CHANGE 0x00000109 #define FMPM_DVD_PLAYBACK_STOPPED 0x0000010A #define FMPM_DVD_STILL_OFF 0x0000010B #define FMPM_DVD_STILL_ON 0x0000010C #define FMPM_DVD_SUBPICTURE_STREAM_CHANGE 0x0000010D #define FMPM_DVD_TITLE_CHANGE 0x0000010E #define FMPM_DVD_VALID_UOPS_CHANGE 0x0000010F #define FMPM_DVD_CHAPTER_CHANGE 0x00000110 #define FMPM_DVD_PARENTAL_ERROR 0x00000111 #define FMPM_DVD_PARENTAL_CHECK 0x00000112 #define FMPM_DVD_TITLE_AUTHENTICATION_ERR 0x00000113 #define FMPM_DVD_DISC_AUTHENTICATION_ERR 0x00000114 #define FMPM_DVD_END_PLAYBACK 0x00000115 #define FMPM_DVDROM_ERR 0x00000116 #define FMPM_DVD_MACROVISION_LEVEL 0x00000117 #define FMPM_DVD_FATAL_ERROR 0x00000118 #define FMPM_SVCD_PSD_END 0x00000200 #define FMPM_CDDA_PSD_END 0x00000300 /******************************************************************************* * FMP Values *******************************************************************************/ #define FMPV_TRICKMODE_NOCHANGE 0x00000000 #define FMPV_TRICKMODE_START 0x00000001 #define FMPV_TRICKMODE_END 0x00000002 // FMPI_VIDEOOUT related values&#46; // They have to match values in mpegcmn&#46;h used by hardware library&#58; // Bit7,Bit6 = COMPOSITE, COMPONENT_YUV, COMPONENT_RGB // Bit4 = SET_TV_AS_SOURCE, SET_TV_AS_USER // Bit2 = SET_ONETOONE, SET_SCALE // Bit3,Bit1 = SET_NTSC, SET_PAL, SET_PAL60, SET_PALM // Bit5,Bit0 = SET_VGA, SET_TV, SET_HDTV #define FMPV_VIDEOOUT_COMPONENT_MASK 0x00C0 #define FMPV_VIDEOOUT_COMPOSITE 0x0000 #define FMPV_VIDEOOUT_COMPONENT_YUV 0x0080 #define FMPV_VIDEOOUT_COMPONENT_RGB 0x00C0 #define FMPV_VIDEOOUT_MODE_MASK 0x0021 #define FMPV_VIDEOOUT_VGA 0x0000 #define FMPV_VIDEOOUT_TV 0x0001 #define FMPV_VIDEOOUT_HDTV 0x0020 #define FMPV_VIDEOOUT_STANDARDTV_MASK 0x000A #define FMPV_VIDEOOUT_NTSC 0x0000 #define FMPV_VIDEOOUT_PAL 0x0002 #define FMPV_VIDEOOUT_PAL60 0x0008 #define FMPV_VIDEOOUT_PALM 0x000A #define FMPV_VIDEOOUT_ONETOONE 0x0000 #define FMPV_VIDEOOUT_SCALE 0x0004 #define FMPV_VIDEOOUT_TV_AS_SOURCE 0x0010 #define FMPV_VIDEOOUT_TV_AS_USER 0x0000 // FMPI_VIDEOASPECT related values - they should be in sync // with KSPROPERTY_MPEG2VID enum defined in cgraphm&#46;h // FMPV_VIDEOASPECT_4x3_16x9_ZOOM_ON is not recommended for DVD because // the subpicture is not visible // Syntax of the setting name&#58; // FMPV_VIDEOASPECT_InputAspectRatio_OutputAspectRatio_UserDisplayOption // InputAspectRatio - video material aspect ratio&#58; 4x3 or 16x9 // OutputAspectRatio - output display device&#58; 4x3=standardTV or 16x9=wide TV // UserDisplayOption - user choice if the input and output aspect ratio are not // the same and if video material permit #define FMPV_VIDEOASPECT_4x3_4x3_NORMAL 0x0002 // normal #define FMPV_VIDEOASPECT_4x3_16x9_ZOOM_ON 0x0003 // upscale video to fit width keeping 4&#58;3 aspect ratio, cropping top and bottom #define FMPV_VIDEOASPECT_4x3_16x9_ZOOM_OFF 0x0004 // video not scaled horizontally centered, black on sides #define FMPV_VIDEOASPECT_16x9_16x9_NORMAL 0x0005 // normal #define FMPV_VIDEOASPECT_16x9_4x3_PANSCAN 0x0006 // pan and scan #define FMPV_VIDEOASPECT_16x9_4x3_LETTERBOX 0x0007 // letter box // FMPI_AUDIO_MODE related values&#46; // They have to match values in mpegcmn&#46;h used by hardware library&#58; #define FMPV_AUDIO_MODE_STEREO 0x0000 #define FMPV_AUDIO_MODE_RIGHT_ONLY 0x0001 #define FMPV_AUDIO_MODE_LEFT_ONLY 0x0002 #define FMPV_AUDIO_MODE_MONOMIX 0x0003 /******************************************************************************* * DVD Error Messages *******************************************************************************/ #define DVDE_HANDLE 0x2000 #define DVDE_ARG 0x2100 #define DVDE_TITLENUMBER 0x2200 #define DVDE_PTTNUMBER 0x2300 #define DVDE_UNAUTHORIZED 0x2400 #define DVDE_OUT_OF_MEM 0x2500 #define DVDE_INCORRECT_STRUCT 0x2600 #define DVDE_NORESUME 0x2700 #define DVDE_PARENTAL_LOCK 0x2800 /******************************************************************************* * DVD Menu ID *******************************************************************************/ #define DVD_TITLE_ID 0x02 #define DVD_ROOT_ID 0x03 #define DVD_AUDIO_ID 0x05 #define DVD_SUBPICTURE_ID 0x04 #define DVD_ANGLE_ID 0x06 #define DVD_PTT_ID 0x07 /******************************************************************************* * DVD Index *******************************************************************************/ #define FMPI_DVD_VTS_NS 0x0A01 // for internal use only #define DVDI_TT_SRPTI 0x0001 #define DVDI_AST_ATR 0x0002 #define DVDI_SPST_ATR 0x0003 #define DVDI_SPRM 0x0004 #define DVDI_VIDEO_MODE 0x0005 #define DVDI_TIME 0x0006 // for internal use only #define DVDI_UOP_CTL 0x0007 // for internal use only #define DVDI_STATE 0x0008 // for internal use only #define DVDI_REPEATMODE 0x0009 // for internal use only #define DVDI_VATR 0x000A // video attribute #define DVDI_CURRENT_UOPS 0x000B /******************************************************************************* * System Parameters &#40;SPRMs&#41; *******************************************************************************/ // &#40;VI4-157&#41; #define M_LCD 0 #define ASTN 1 #define SPSTN 2 #define AGLN 3 #define TTN 4 #define VTS_TTN 5 #define TT_PGCN 6 #define PTTN 7 #define HL_BTTN 8 #define NV_TMR 9 #define NV_TMR_TT_PGCN 10 #define P_AMXMD 11 #define CTY_CD 12 #define PTL_LVL 13 #define P_CFGV 14 #define P_CFGA 15 #define INI_LCD_AST 16 #define INI_LCD_EXT_AST 17 #define INI_LCD_SPST 18 #define INI_LCD_EXT_SPST 19 #define PRC 20 /******************************************************************************* * Structures *******************************************************************************/ #define MAX_AST 8 // 0&#46;&#46;7 #define MAX_SP 32 // 0&#46;&#46;31 #define MAX_TT 100 // 1&#46;&#46;99 #define MAX_AGL 10 // 1&#46;&#46;9 // TT_SRPTI typedef struct &#123; BYTE bTT_SRP_Ns; BYTE bALG_Ns &#91;MAX_TT&#93;; WORD wPTT_Ns &#91;MAX_TT&#93;; &#125; TT_SRPTI, * PTT_SRPTI; // AST_ATR typedef struct &#123; BYTE bAST_Ns; BOOL bAvailable &#91;MAX_AST&#93;; BYTE bAudioCodingMode &#91;MAX_AST&#93;; BOOL bMultichannelExtenstion &#91;MAX_AST&#93;; BYTE bAudioType &#91;MAX_AST&#93;; BYTE bAudioApplicationMode &#91;MAX_AST&#93;; BYTE bQuantization &#91;MAX_AST&#93;; BYTE bfs &#91;MAX_AST&#93;; BYTE bNumberOfAudioChannels &#91;MAX_AST&#93;; WORD wLanguageCode &#91;MAX_AST&#93;; WORD wLanguageCodeExtension &#91;MAX_AST&#93;; BYTE bApplicationExtension &#91;MAX_AST&#93;; &#125; AST_ATR, *PAST_ATR; // SPST_ATR typedef struct &#123; BYTE bSPST_Ns; BOOL bAvailable &#91;MAX_SP&#93;; BYTE bSubpictureType &#91;MAX_SP&#93;; WORD wLanguageCode &#91;MAX_SP&#93;; WORD wLanguageCodeExtension &#91;MAX_SP&#93;; &#125; SPST_ATR, *PSPST_ATR; // VIDEO_MODE typedef struct &#123; BYTE bAspectRatio; BYTE bDisplayMode; &#125; VIDEO_MODE, *PVIDEO_MODE; #define CRMBookmark_SIZE 9400 /****************************************************************************** * CDDA Index *******************************************************************************/ #define CDDAI_TOC 0x0010 /******************************************************************************* * Structures *******************************************************************************/ typedef DWORD CDDA_CONTENT&#91;99&#93;; typedef DWORD* PCDDA_CONTENT&#91;99&#93;; /******************************************************************************* * FMPAnalogOverlay Functions *******************************************************************************/ DWORD FMPAnalogOverlay&#40;DWORD SubCommand,DWORD dwArg1,DWORD dwArg2, DWORD dwArg3,DWORD dwArg4,DWORD dwArg5&#41;; // FMPAnalogOverlay subcommand #define FMP_ANALOG_OVERLAY_ACCESS 0x1000 // FMPAnalogOverlay subcommand #define FMP_ANALOG_OVERLAY_GET 0x1001 #define FMP_ANALOG_OVERLAY_SET 0x1002 // General commands #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAKEY 0x202 // vgakey selection &#40;dwArg2=R<<16+G<<8+B&#46; indexed mode is not supported&#41; #define FMP_ANALOG_OVERLAY_ATTRIBUTE_DISPLAYRESOLUTION 0x203 // send dwArg2=depth &#40;8,16,24,32&#41;, dwArg3=physical display width, dwArg4=physical display height #define FMP_ANALOG_OVERLAY_ATTRIBUTE_MODE 0x204 // mode selection &#40;dwArg2=0&#40;none&#41;,1&#40;rectangle&#41;,2&#40;overlay&#41;&#41; #define FMP_ANALOG_OVERLAY_ATTRIBUTE_OVERLAY_CABLE_PRESENT 0x205 // get only&#58; 1=yes, 0=no // fine-tuning #define FMP_ANALOG_OVERLAY_ATTRIBUTE_XOFFSET 0x301 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_YOFFSET 0x302 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGACORRECTION 0x303 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARUPPER 0x304 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGARLOWER 0x305 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGUPPER 0x306 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGAGLOWER 0x307 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABUPPER 0x308 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_VGABLOWER 0x309 #define FMP_ANALOG_OVERLAY_ATTRIBUTE_FINEADJUSTMENT 0x30a #define FMP_ANALOG_OVERLAY_ATTRIBUTE_HFREQUENCY 0x30b #define FMP_ANALOG_OVERLAY_ATTRIBUTE_JITTERADJUSTMENT 0x30c // FMPAnalogOverlay subcommand #define FMP_ANALOG_OVERLAY_AUTOCALIBRATION 0x1003 /* then dwArg2=0x88 YOffset autocalibration &#40;horizontal at top pattern&#41; dwArg2=0x89 XOffset autocalibration &#40;vertical at left pattern&#41; dwArg2=0x8a Correction autocalibration &#40;vertical offset right pattern&#41; dwArg2=0x80 Color &#40;WHITE&#41; autocalibration &#40;full white vertical bar pattern&#41; dwArg2=0x82 Color &#40;GREY&#41; autocalibration &#40;half white vertical bar pattern&#41; */ /******************************************************************************* * Misc Values *******************************************************************************/ #define FMP_MPEG_SERVER "REALmagic/MPEGsvr" #define FMP_MPEG_CLIENT "REALmagic/MPEGclient" #ifdef __cplusplus &#125; #endif #endif [/code:35otkmf4] Lib, include with email check please..... thank.
linux gcc compiler error help me.
[code:2ytjsj0q] fmp&#46;h&#58;20&#58; error&#58; redefinition of typedef ‘LONG’ &#46;/&#46;&#46;/&#46;&#46;/harbour/include/hbdefs&#46;h&#58;190&#58; error&#58; previous declaration of ‘LONG’ was here fmp&#46;h&#58;22&#58; error&#58; redefinition of typedef ‘BYTE’ &#46;/&#46;&#46;/&#46;&#46;/harbour/include/hbdefs&#46;h&#58;181&#58; error&#58; previous declaration of ‘BYTE’ was here fmp&#46;h&#58;23&#58; error&#58; redefinition of typedef ‘BOOL’ &#46;/&#46;&#46;/&#46;&#46;/harbour/include/hbdefs&#46;h&#58;168&#58; error&#58; previous declaration of ‘BOOL’ was here In file included from yunb&#46;prg&#58;37&#58; fmp&#46;h&#58;232&#58;21&#58; error&#58; rm84cmn&#46;h&#58; No such file or directory fmp&#46;h&#58;241&#58;18&#58; error&#58; ifmp&#46;h&#58; No such file or directory [/code:2ytjsj0q] We also need those missing .h files: rm84cmn.h, ifmp.h Besides them, there are conflicts for LONG, BYTE and BOOL definitions. We can solve the BOOL one, but not sure about LONG and BYTE. We need to try it.
linux gcc compiler error help me.
Hi Antonio. The next file is SDK. Thank you. <!-- m --><a class="postlink" href="http://www.bongku.net/down/Netstream2000-1.6.73.0.zip">http://www.bongku.net/down/Netstream2000-1.6.73.0.zip</a><!-- m --> yunbg1. Fivelinux USER
linux gcc compiler error help me.
You need to modify these lines in fmp.h: #ifdef _DEFINE_FMP_TYPES_ typedef unsigned long DWORD; // typedef long LONG; typedef unsigned short WORD; // typedef unsigned char BYTE; // typedef int BOOL; Now it compiles fine
lisdir() problem
Hi, If I call this lisdir() returns FALSE, even when I use lfn2sfn. [code:3qhpoxp4] local cValue &#58;= GetEnv&#40; "USERPROFILE"&#41; msginfo&#40;lfn2sfn&#40;cValue+'\Local Settings\Application Data'&#41;,cValue+'\Local Settings\Application Data'&#41; msginfo&#40;lisdir&#40;lfn2sfn&#40;upper&#40;cValue+'\Local Settings\Application Data'&#41;&#41;&#41;&#41; msginfo&#40;lisdir&#40;upper&#40;cValue+'\Local Settings\Application Data'&#41;&#41;&#41; [/code:3qhpoxp4] Is there an error in lisdir()? Thanks, Marc
lisdir() problem
i dont think so... here in my testes both returns .T. ( directory exists !!! ) [code:22sz37e8] local cValue &#58;= GetEnv&#40; "USERPROFILE"&#41; local cDirec &#58;= '\Configurações locais\Application Data' msginfo&#40;lIsDir&#40;lfn2sfn&#40;upper&#40;cValue+cDirec&#41;&#41;&#41;&#41; msginfo&#40;lIsDir&#40;cValue+cDirec&#41;&#41; [/code:22sz37e8] regards
lisdir() problem
Marc, lIsDir() is not working with hidden directories. Try this sample: [code:2ghgwhq9] function Main&#40;&#41; local cValue &#58;= GetEnv&#40; "USERPROFILE"&#41; msginfo&#40; cValue &#41; msginfo&#40; lIsDir&#40; cValue + "\Documents" &#41; &#41; return nil [/code:2ghgwhq9]
lisdir() problem
Antonio, That seems to be the problem. In FW1.9.5 it was working <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Regards, Marc
lisdir() problem
Marc, Fixed. Simply add this function to your main PRG: [code:p0rxoopw] function lIsDir&#40; cDirName &#41; // Checks an existing directory local aResult &#58;= Directory&#40; cDirName, "DHS" &#41; return Len&#40; aResult &#41; == 1 &#46;and&#46; "D" $ aResult&#91; 1 &#93;&#91; 5 &#93; [/code:p0rxoopw] sample: [code:p0rxoopw] function Main&#40;&#41; local cValue &#58;= GetEnv&#40; "USERPROFILE"&#41; msginfo&#40; cValue &#41; msginfo&#40; lIsDir&#40; cValue + "\Application Data" &#41; &#41; return nil [/code:p0rxoopw]
lisdir() problem
Thanks Antonio, It's working fine now!! Regards, Marc
lisdir() problem
[quote="Antonio Linares":2r6yowuk] [code:2r6yowuk]function lIsDir&#40; cDirName &#41; // Checks an existing directory local aResult &#58;= Directory&#40; cDirName, "DHS" &#41; return Len&#40; aResult &#41; == 1 &#46;and&#46; "D" $ aResult&#91; 1 &#93;&#91; 5 &#93; [/code:2r6yowuk] [/quote:2r6yowuk] a trailing \ in cDirName makes DIRECTORY returning the CONTENT of cDirName [code:2r6yowuk]function lIsDir&#40; cDirName &#41; // Checks an existing directory Local aResult If Right&#40;cDirName,1&#41;="" ; cDirName&#58;=Left&#40;cDirName,Len&#40;cDirName&#41;-1&#41; ; Endif aResult &#58;= Directory&#40; cDirName, "DHS" &#41; Return Len&#40; aResult &#41; == 1 &#46;and&#46; "D" $ aResult&#91; 1 &#93;&#91; 5 &#93; [/code:2r6yowuk] FWH 7.07 - xH 0.99.71 Hi, Davide
lisdir() problem
Davide, Thanks!
list with excel
transform a list or report in excel how it works
list of bitmaps
I must show many buttons as btnbmp on a dialog but I wish scroll all easy I need btnbmp because the user must click on each button to open a different pocedure I thinked to insert them on tpanel but it is not run vertical scroll how I can make ..exit a sample please
list of bitmaps
Search MetroPnel sample or with xbrowse with images
list of bitmaps
CNavarro , perhaps you not understood me I not Know How make it pls I sent you a test
list of sections
If I Have a file .INI If on this INI I have many sections for sample [test1] ... [test2] ... ... [test3] ... ... can I have an array with the name of sections to insert into a xbrowse object ?
list of sections
[code=fw:15gvicjb]<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> crlf CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span> cIni <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> i<br /><span style="color: #00C800;">LOCAL</span> aSections := count_sections<span style="color: #000000;">&#40;</span> cIni <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aSections <span style="color: #000000;">&#41;</span><br />    ? aSections<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">NEXT</span> i<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> COUNT_SECTIONS<span style="color: #000000;">&#40;</span> cIni <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> cString := MEMOREAD<span style="color: #000000;">&#40;</span> cIni <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nRows   := MLCOUNT<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> iR<br /><span style="color: #00C800;">LOCAL</span> cRow<br /><span style="color: #00C800;">LOCAL</span> nCounted := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> aSections := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">FOR</span> iR := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nRows<br />    cRow := MEMOLINE<span style="color: #000000;">&#40;</span> cString , , iR <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"["</span> , cRow <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> .AND. <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"]"</span> , cRow <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />       AADD<span style="color: #000000;">&#40;</span> aSections , ALLTRIM<span style="color: #000000;">&#40;</span> cRow <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">NEXT</span> iR<br /><br /><span style="color: #00C800;">RETURN</span> aSections</div>[/code:15gvicjb]
list of sections
This is better: [code=fw:1dbozbeg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> GETPVPROFSECTIONS<span style="color: #000000;">&#40;</span> cIni <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> cBuf := SPACE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">65536</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> aSec := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; GETPRIVATEPROFILESECTIONNAMES<span style="color: #000000;">&#40;</span> cBuf, <span style="color: #000000;">65536</span>, cIni <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">WHILE</span> <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span> cBuf, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> != CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AADD<span style="color: #000000;">&#40;</span> aSec, <span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span> cBuf, <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, cBuf <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cBuf = <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cBuf, <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, cBuf <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> aSec<br /><br /><br />DLL <span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GETPRIVATEPROFILESECTIONNAMES<span style="color: #000000;">&#40;</span> cRetBuf AS LPSTR, nSize AS LONG, cFileName AS LPSTR <span style="color: #000000;">&#41;</span> AS DWORD;<br />&nbsp; &nbsp; PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"GetPrivateProfileSectionNamesA"</span> LIB <span style="color: #ff0000;">"kernel32.dll"</span></div>[/code:1dbozbeg] <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
list of sections
thanks to all.
list of sections
[code=fw:3fmmb6w7]<div class="fw" id="{CB}" style="font-family: monospace;">hIniFile &nbsp; &nbsp; &nbsp;:= HB_ReadIni<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MyINIfile.INI"</span> <span style="color: #000000;">&#41;</span><br />aCompany:=HGetKeys<span style="color: #000000;">&#40;</span> hIniFile <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Returns an array of Section names</span></div>[/code:3fmmb6w7] Regards [b:3fmmb6w7]Anser[/b:3fmmb6w7]
list of sections
[quote="anserkk":2d6ri3vd][code=fw:2d6ri3vd]<div class="fw" id="{CB}" style="font-family: monospace;">hIniFile      := HB_ReadIni<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MyINIfile.INI"</span> <span style="color: #000000;">&#41;</span><br />aCompany:=HGetKeys<span style="color: #000000;">&#40;</span> hIniFile <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Returns an array of Section names</span></div>[/code:2d6ri3vd] Regards [b:2d6ri3vd]Anser[/b:2d6ri3vd][/quote:2d6ri3vd] [img:2d6ri3vd]http&#58;//img197&#46;imageshack&#46;us/img197/3809/e5v8&#46;jpg[/img:2d6ri3vd] give me the right array but it insert also another string "Main"
list of sections
[code=fw:1fekoism]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// The last parameter .F. in HB_ReadIni() eliminates the entry MAIN while using HGetKeys()</span><br />hIniFile      := HB_ReadIni<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MyINIfile.INI"</span>, , ,.F. <span style="color: #000000;">&#41;</span> <br />aCompany:=HGetKeys<span style="color: #000000;">&#40;</span> hIniFile <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Returns an array of Section names</span><br />&nbsp;</div>[/code:1fekoism] Regards [b:1fekoism]Anser[/b:1fekoism]
list of zipped files with date time and size
How can I obtain also date, time and dimension of every file present in zip file? In this way I have only name. aFiles := hb_GetFilesInZip( cPar2 ) FOR i := 1 TO LEN( aFiles ) ? aFiles[ i ] NEXT i Many Thanks Marco
list of zipped files with date time and size
[code=fw:2x1go1w2]<div class="fw" id="{CB}" style="font-family: monospace;">aFiles := hb_GetFilesInZip<span style="color: #000000;">&#40;</span> cPar2, .t. <span style="color: #000000;">&#41;</span><br />XBROWSER aFiles <br />&nbsp;</div>[/code:2x1go1w2]
list of zipped files with date time and size
<!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> Many Thanks Marco
listar estructura e indices
Buenas tardes. existe algun utilitario que permita imprimir la estructura de uns dbf y sus indices asociados? gracias
listar estructura e indices
Holá, IMPSTRUC.PRG. Download completo aqui: [url:c2kt0uvb]https&#58;//mega&#46;nz/file/cBN03bQZ#OZ9TzAqgepeyj18Qddyxcys0q46u9xmXvfIyqAO865g[/url:c2kt0uvb] Original: [url:c2kt0uvb]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=2&t=21604[/url:c2kt0uvb] Regards, saludos.
listbox
@ 3, 1 LISTBOX alm_ListBox ; FIELDS almacen->descrip,; // Campos que contendr  transform(almacen->preveneur,"99,999.99"),; // el TBrowse. transform(almacen->preproeur,"99,999.99"),; transform(almacen->preneteur,"99,999.99"),; substr(almacen->nomprov,1,20),; transform(almacen->stoact,"99999"),; transform(almacen->stomin,"99999"),; transform(almacen->stomax,"99999"),; transform(almacen->consumo,"9,999,999"); FIELDSIZES 250,50,50,50,90,50,50,50,50 ; // Dimensiones de c/campo (en pixeles) HEADERS "DESCRIPCION", "PVP ", "P.EMPRESA","P.NETO COMPRA","NOM.PROV.","STOACT","STOCKMIN","STOCKMAX","CONSUMO"; SIZE 380, 150; // Tama¤o del TBrowse ON LEFT DBLCLICK alm_bajoBuscar(alm_diaBuscar,almacen->descrip); // Al doble click se editar  el registro OF alm_diaBuscarDado este codigo cuando haces doble click entonces se ejecuta alm_bajoBuscar pero COMO HACER PARA QUE SE EJECUTE HACIENDO TAMBIEN ENTERGRACIAS
listbox
Hola., Añade la linea de colorON LEFT DBLCLICK alm_bajoBuscar(alm_diaBuscar,almacen->descrip); // Al doble click se editar el registro OF alm_diaBuscar [b:15jglfup]alm_ListBox:bKeyDown := { |nKey,nFlags|If(nKey=13,alm_bajoBuscar(alm_diaBuscar,almacen->descrip) }[/b:15jglfup]Salu2
listbox
Angel,Bienvenido a los foros! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
listbox
can someone tell me a simple way to search/scroll in a listbox/combobox by typing the first characters of an item that is part of the listbox? kind regards jds
listbox
Dear JDS, you can enable the incremental search.. oClass:lIncSearch := .T. hope it works for you.
listbox
Is it possible to modify directly data in the fields of a listbox without open a whole record