topic
stringlengths
1
63
text
stringlengths
1
577k
dialogo por sobre todo el resto de ventana...?
Hola Gustavo, usa esta funcion que alguna vez encontre en el foro [code=fw:jxgdjtcg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Alertas "</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">09</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">28</span>,<span style="color: #000000;">135</span> <span style="color: #0000ff;">OF</span> oApp:<span style="color: #000000;">oWnd</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> DlgOnTop<span style="color: #000000;">&#40;</span> .t.,oDlg:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">function</span> DlgOnTop<span style="color: #000000;">&#40;</span> lState, hWnd <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nRet := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">DEFAULT</span> hWnd := GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> !lState<br />      nRet = AcpOnTop<span style="color: #000000;">&#40;</span> hWnd, <span style="color: #000000;">-2</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      nRet = AcpOnTop<span style="color: #000000;">&#40;</span> hWnd, <span style="color: #000000;">-1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> nRet<br /> </div>[/code:jxgdjtcg]
dialogo por sobre todo el resto de ventana...?
BringWindowToTop( < hWnd > )
dialogo sobre imagen pdf
Hola Necesito mostrar unos datos sobre un pdf que abro desde código y hacer que un dialogo quede en primer plano sobre una imagen pdf, es decir algo asi ShellExecute( ,"print", (oApp:dirpdf + aAfile[olbx:nAt,1]),,,1 ) dialogo que necesito sobre el pdf Ah y en el shellExecute puedo indicarle en que impresora lo necesito imprimir. Desde ya gracias
dialogo sobre imagen pdf
Luis, Imagino que lo que necesitas es aguardar a que se muestre el PDF antes de mostrar el diálogo. Podrias probar a hacer un bucle for next por un cierto tiempo y desde él llamar a SysRefresh()
dialogo sobre imagen pdf
Sí efectivamente necesito eso voy a probar- En el shellexecute es "open" no print. Mañana lo pruebo Gracias
dialogos transparentes
Holas, si les interesa el tema de transparencia, pueden probrar [quote:rv4lpkv0]#include "fivewin.ch" #include "Slider.ch" FUNCTION main() LOCAL oDlg, nTrans := 128, para DEFINE DIALOG oDlg FROM 10,10 TO 20,40 @ 1,1 SLIDER nTrans OF oDlg; HORIZONTAL ; LEFT DIRECTION ; RANGE 0, 255 ; MARKS 25 ; ON THUMBPOS ( setlayeredwindowattributes( oDlg:hWnd, 0, ntrans, 2 ), sysrefresh() ); ON CHANGE ( setlayeredwindowattributes( oDlg:hWnd, 0, ntrans, 2 ), sysrefresh() ) ACTIVATE DIALOG oDlg CENTER ON INIT ( para := getwindowlong( oDlg:hWnd, -20 ), ; setwindowlong( oDlg:hWnd, -20, nOr( para, 524288 ) ) , ; setlayeredwindowattributes( oDlg:hWnd, 0, ntrans, 2 ) ) RETURN(NIL) DLL32 function getwindowlong( hwnd as LONG, index as LONG ) AS LONG PASCAL FROM "GetWindowLongA" lib "user32.dll" DLL32 function setwindowlong( hwnd as LONG, index as LONG, newlog as LONG ) AS LONG PASCAL FROM "SetWindowLongA" lib "user32.dll" DLL32 function setlayeredwindowattributes( hwnd as LONG, crkey as LONG, alpha as WORD, flag as LONG ) AS LONG PASCAL FROM "SetLayeredWindowAttributes" lib "user32.dll" [/quote:rv4lpkv0] No pude hacer que la transparencia varie mientras cambia el slider, pero quien sabe alguien lo logre. saludos Marcelo
dialogos transparentes
I'm founding some thing of it but I wish show a bitmap trasparent If you go to mg sample you found a car bmp you can see only this car and not see the dialog... Do U undestand ?
dialogos transparentes
See this sample: [code:3g4c3gm6] /* * * *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * Programador&#58; Jose Carlos da Rocha * CopyRights&#46;&#58; 5Volution Desenvolvimento * *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * */ #include "fivewin&#46;ch" #define SRCPAINT 15597702 #define SRCAND 8913094 function main&#40;&#41; DEFINE BRUSH oBrush STYLE NULL DEFINE DIALOG oWnd TITLE "Transparence" SIZE 800,600 BRUSH oBrush STYLE WS_POPUP ACTIVATE DIALOG oWnd CENTERED ; ON PAINT ShowBmp&#40; oWnd, "transpr1&#46;bmp", "transpr2&#46;bmp" &#41; ; VALID iif&#40;MsgYesNo&#40;'Deseja encerrar o programa?','Atencao'&#41;,&#46;t&#46;,&#46;f&#46;&#41; function ShowBmp&#40; oDlg, cBmp1, cBmp2 &#41; local hDC &#58;= oDlg&#58;hDC local oBmp1, oBmp2 DEFINE BITMAP oBmp1 FILENAME cBmp1 DEFINE BITMAP oBmp2 FILENAME cBmp2 DrawBitmap&#40; hDC, oBmp2&#58;hBitmap, 0, 0, 0, 0, SRCPAINT &#41; DrawBitmap&#40; hDC, oBmp1&#58;hBitmap, 0, 0, 0, 0, SRCAND &#41; oBmp1&#58;End&#40;&#41; oBmp2&#58;End&#40;&#41; return nil [/code:3g4c3gm6] And here, the bitmaps <!-- m --><a class="postlink" href="http://www.5volution.com/forum/transpr.zip">http://www.5volution.com/forum/transpr.zip</a><!-- m -->
dialogos transparentes
I saw it but I cannot move the dialog with the mouse If you go to see the sample of minigui you can understand me
dialogos transparentes
Silvio Can you send me? <!-- e --><a href="mailto:irochinha@itelefonica.com.br">irochinha@itelefonica.com.br</a><!-- e -->
dialogos transparentes
i sent now the prg
dialogos transparentes
Test this now: [code:1ok9uyjn] /* * * *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * Descricao&#46;&#46;&#58; Modulo de PDV * Programador&#58; Jose Carlos da Rocha * CopyRights&#46;&#58; Konectiva Automacao * *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * */ #include "fivewin&#46;ch" #define SRCPAINT 15597702 #define SRCAND 8913094 function main&#40;&#41; PUBLIC lNoPaint &#58;= &#46;f&#46; DEFINE BRUSH oBrush STYLE NULL DEFINE DIALOG oWnd TITLE "Transparence" SIZE 800,600 BRUSH oBrush STYLE WS_POPUP @ 0,0 BITMAP filename "" OF oWnd NOBORDER PIXEL SIZE 10,10 ON LEFT CLICK WindowMove&#40;&#41; ACTIVATE DIALOG oWnd CENTERED ; ON PAINT ShowBmp&#40; oWnd, "transpr1&#46;bmp", "transpr2&#46;bmp" &#41; ; VALID iif&#40;MsgYesNo&#40;'Deseja encerrar o programa?','Atencao'&#41;,&#46;t&#46;,&#46;f&#46;&#41; function ShowBmp&#40; oDlg, cBmp1, cBmp2 &#41; local hDC &#58;= oDlg&#58;hDC local oBmp1, oBmp2 DEFINE BITMAP oBmp1 FILENAME cBmp1 DEFINE BITMAP oBmp2 FILENAME cBmp2 DrawBitmap&#40; hDC, oBmp2&#58;hBitmap, 0, 0, 0, 0, SRCPAINT &#41; DrawBitmap&#40; hDC, oBmp1&#58;hBitmap, 0, 0, 0, 0, SRCAND &#41; oBmp1&#58;End&#40;&#41; oBmp2&#58;End&#40;&#41; return nil function WindowMove&#40;&#41; Do while GetKeyState&#40;VK_LBUTTON&#41; onde&#58;=GetCursorpos&#40;&#41; MoveWindow&#40; oWnd&#58;hWnd, onde&#91;1&#93;, onde&#91;2&#93;, 20, 20, &#46;t&#46; &#41; SysRefresh&#40;&#41; If !GetKeyState&#40;VK_LBUTTON&#41; Exit Endif Enddo MoveWindow&#40; oWnd&#58;hWnd, onde&#91;1&#93;, onde&#91;2&#93;, 800, 600, &#46;t&#46; &#41; Return nil [/code:1ok9uyjn]
dialogos transparentes con degrado
antonio buenas tardes pregunta concreta tengo Fwh2.7 cuando hago un dialog con degradado los say que actualizo en runtime me salen con otro color que no corresponde, la pregunta es si en la ultima version ya tienes un remedio para eso, es decir para los Says , los Radio Buttoms y otros elementos ?? aca una imagen de esto [url=http&#58;//img167&#46;imageshack&#46;us/my&#46;php?image=dialognooi3&#46;jpg:1iu1no4s][img:1iu1no4s]http&#58;//img167&#46;imageshack&#46;us/img167/7896/dialognooi3&#46;th&#46;jpg[/img:1iu1no4s][/url:1iu1no4s] espero haberme explicado y gracias
dialogos transparentes con degrado
Wilson, Estás haciendo el degradado usando un brush ? Hazlo con un brush DEFINE BRUSH oBru FILENAME "degradado.bmp" DEFINE DIALOG oDlg SIZE 400, 200 BRUSH oBru TRANSPARENT
dialogos transparentes con degrado
asi queda Antonio, correcto [url=http&#58;//img513&#46;imageshack&#46;us/my&#46;php?image=degrast6&#46;jpg:1gbji2ga][img:1gbji2ga]http&#58;//img513&#46;imageshack&#46;us/img513/7122/degrast6&#46;th&#46;jpg[/img:1gbji2ga][/url:1gbji2ga] gracias, una sola pregunta se puede asignarle el oBrush al dialog en el evento on INIT ?? otra pregunta el BMP de que dimensiones debe ser para que quede bien ?? y si es posible cargarlo desde recursos ?? gracias x tu ayuda saludos
dialogos transparentes con degrado
Wilson, > gracias, una sola pregunta se puede asignarle el oBrush al dialog en el evento on INIT ?? > Sí, deberías poder asignarlo desde ahí sin problemas > otra pregunta el BMP de que dimensiones debe ser para que quede bien ?? Lo idóneo es estrecho y vertical, con una longitud suficiente para que rellene todo el alto del diálogo, con colores degradados > y si es posible cargarlo desde recursos ?? Si, perfectamente <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
dialogos transparentes con degrado
gracias Antonio por tu ayuda saludos
dibujar lineas curvas etc
saludos compañeros, a los que ayudan y los que solo se dedican a leer y no aportan nada, tengo el siguiente problema: tengo un dialogo o ventana, en cualquiera de los 2 se presente el mismo problema, al cual pe pongo controles, tanto a mano como con workshop, todos los casos los he probado, bien necesito hacerle a manera de casillas varias lineas, boxes, etc lo cual si lo puedo hacer pero solo a mano, por recurso no se puede o no se, uds diran cual es el problema?, el problema radica es que las lineas solo salen despues del activate windows|dialog, bien si pongo un boton para que llame a una funcion y las dibuje o las ponga en el "on init" o en el "on paint" del activate, nunca antes como los controles, bien es es el primer problema, el segundo a pesar que de con on init u paint puedo hacer que aparezca al momento de entrar cuando muevo el formulario con el scroll sencillamente van desapareciendo si vuelvo a poner el windows|dialogo en la posicion inicial, osea no son parte del windows|dialogo porque se dibujan despues, si alguien ha tenido la necesidad de enfrentar este detalle o sabe como dibujarlas en el dialog con workshop o pelles le agradeceria me ayudara gracias desde venezuela
dibujar lineas curvas etc
És posible proporcionar un ejemplo sencillo? Una imagen por favor? Saludos.
dibujar lineas curvas etc
Buen día para todos... Que tal QAZWSX2K, por casualidad has probado con las clase TSLine del amigo Manuel Mercado?.
dibujar lineas curvas etc
ARCC NO CONSIGUO NI SIQUIERA INFORMACION DE QUE EXISTA ESA CLASE, SI TU LA TIENE Y ES FREE ME LA PODRIAS MANDAR? KARINHA NO PUEDO SUBIR IMAGENES POR AQUI
dibujar lineas curvas etc
BIEN ARCC, YA LA CONSEGUI, LA PROBE, Y EXCELENTE RESUELVE 100% MI PROBLEMA, GRACIAS DESDE CARACAS
dibujar lineas curvas etc
Buen día para todos.... [quote="QAZWSX2K":2k3e8l0y]BIEN ARCC, YA LA CONSEGUI, LA PROBE, Y EXCELENTE RESUELVE 100% MI PROBLEMA, GRACIAS DESDE CARACAS[/quote:2k3e8l0y] Ok tranquilo estamos a la orden por acá en Maracaibo
dibujar una region de un color
Hola amigos: Desearía saber si hay alguna manera de dibujar en una MDICHILD una region de un color distinto que el fondo. Gracias. Carlos
dibujo de cajas bajo codigo
Pues eso... ¿es posible dibujar cajas directamente desde codigo para un formulario? --- sin el Workshop!!! Saludos Armando
dibujo de cajas bajo codigo
[quote="Armando Picon":3tl3kizx]Pues eso... ¿es posible dibujar cajas directamente desde codigo para un formulario? --- sin el Workshop!!! Saludos Armando[/quote:3tl3kizx] Te refieres a esto? [code=FW:3tl3kizx]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Benvingut a AMPA32"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">125</span>,<span style="color: #000000;">172</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">307</span>,<span style="color: #000000;">584</span> <span style="color: #0000ff;">PIXEL</span> ;<br />    <span style="color: #0000ff;">FONT</span> 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;">0</span>,<span style="color: #000000;">-11</span>,.F.,.F.,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">400</span>,.F.,.F.,.F.,<span style="color: #000000;">0</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span><br /><br />@  <span style="color: #000000;">5</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Data Hora .EXE............"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFontArial10 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250.00</span>, ;<br />    <span style="color: #000000;">10.00</span> <span style="color: #0000ff;">UPDATE</span><br /><br />@  <span style="color: #000000;">5</span>,<span style="color: #000000;">70</span> <span style="color: #0000ff;">SAY</span> DToC<span style="color: #000000;">&#40;</span> dDateEXE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"  "</span> + cTimeExe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> 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;">0</span>,<span style="color: #000000;">-11</span>,.F., .F.,<span style="color: #000000;">0</span>,;<br />     <span style="color: #000000;">0</span>,<span style="color: #000000;">400</span>,.F.,.F.,.F.,<span style="color: #000000;">0</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250.00</span>,<span style="color: #000000;">10.00</span> <span style="color: #0000ff;">UPDATE</span><br /><br />....</div>[/code:3tl3kizx]
dibujo de cajas bajo codigo
Pues no... este código solamente pone un marco alrededor del texto o de la variable. Lo que necesito es poder dibujar una caja que actúe como delimitador de una zona o de zonas en el formulario... sin utilizar el Workshop (en el cual es sencillo).
dibujo de cajas bajo codigo
[quote="Armando Picon":1syiwmpo]Pues no... este código solamente pone un marco alrededor del texto o de la variable. Lo que necesito es poder dibujar una caja que actúe como delimitador de una zona o de zonas en el formulario... sin utilizar el Workshop (en el cual es sencillo).[/quote:1syiwmpo] Quizás esto otro: [code=FW:1syiwmpo]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">396</span>,<span style="color: #000000;">533</span> GROUP oGrBt <span style="color: #0000ff;">TO</span> <span style="color: #000000;">481</span>,<span style="color: #000000;">792</span> <span style="color: #0000ff;">OF</span> oAlumne01 <span style="color: #0000ff;">COLOR</span> J02CLRTEXTO,J02CLRWND <span style="color: #0000ff;">PIXEL</span> ;<br />    <span style="color: #0000ff;">FONT</span> J02FONTSAY</div>[/code:1syiwmpo] Otra opción es usar la DATA bpainted y aplicarle una función que llame al método Box de la clase TWindow. [code=FW:1syiwmpo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">DATA</span>   bInit, bMoved, bLClicked, bLButtonUp, bKeyDown, bPainted<br /><br /><span style="color: #00C800;">METHOD</span> Box<span style="color: #000000;">&#40;</span> nTop, nLeft, nBottom, nRight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TWindow<br />   ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   WndBox<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, nTop, nLeft, nBottom, nRight <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1syiwmpo] Que tengas suerte.
dibujo de cajas bajo codigo
Tal parece que voy a optar por el GROUP. El otro trozo de código obligaría a extender la clase tWindow cuyos resultados por ahora me son impredecibles pues no los he practicado. Gracias por los tips FiveWIDI Armando
diccionario ADS y Areas
Haciendo pruebas con el Diccionario de datos me tope con ke no me respeta las areas que asigno, solo me permite utilizar numeros, osea sele AA use base_1 Sele BB use base_2 Sele AA go top me marca que el alias no existe, si lo hago asi: AA->(dbgotop()) tampoco pero si el area asigno un numero, si lo hace, osea: sele 10 use base_1 Sele 20 use base_2 Sele 10 go top o de la otra forma: 10->(dbgotop()) funciona, resulta que asi tengo bqastantes lineas de codigo (no lo hice yo, aclaro) pero seria tocar muchisimas lineas, existira una forma para que me reconozca las areas??? ahhh por si decian que con alias, pues igual, asigno un alias en el use y no lo hace, osea no registra el alias, aun lo haga con el dbuse(,,base,alias,.t.) ahhh y silo hago de la otra manera, el area se va encimando, osea, al marcarme el error solo marca la ultima tabla como area activa en el error.log que estoy haciendo mal?? o debo recodificar lo mencionado??? gracias por su atencion y salu2 por cierto, algun camarada de otro pais no se interesa por un tipo que es honesto, honrado, formal, no es demagogo, muuuuy buen lider, carismatico, para presidente de su pais?? aqui nos sobra uno y va con gabinete y gallito incluido. ademas fomenta el turismo haciendo el zocalo y reforma un excelente area de veraneo con casas de campaña y lonas, actividades artisticas, culturales, y nadade disturbios a las vialidades??
diccionario ADS y Areas
yo uso esto sin problemas: USE tabla1 INDEX indice1 NEW ALIAS AL1 SHARED USE tabla2 INDEX indice2 NEW ALIAS AL2 SHARED USE tabla3 INDEX indice3 NEW ALIAS AL3 SHARED OJO con el NEW. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> suerte
diccionario ADS y Areas
yo he usado toda la vida alias como cadenas de caracteres y funcionan en todas las versiones de ads y xharbour
diccionario ADS y Areas
pues algo he de andar haciendo mal, gracias por los comentarios
diesable navigation Buttons using TArrayData():Edit() ?
hi, to "edit" a Recored i´m using [code=fw:3swojjl2]<div class="fw" id="{CB}" style="font-family: monospace;">oRec := TArrayData<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: #000000;">&#123;</span> aValue <span style="color: #000000;">&#125;</span>, aFields <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// disable navigation Buttons ?</span><br />lEdit := oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:3swojjl2] [img:3swojjl2]https&#58;//i&#46;postimg&#46;cc/02XWTNCd/Edit-Button-navigation&#46;jpg[/img:3swojjl2] there are some navigation Button on left Side, how to disable them <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
diesable navigation Buttons using TArrayData():Edit() ?
Syntax: [code=fw:1z02n7yi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> lReadOnly, lNavigate, cTitle <span style="color: #000000;">&#41;</span></div>[/code:1z02n7yi] We can write: [code=fw:1z02n7yi]<div class="fw" id="{CB}" style="font-family: monospace;">TArrayData<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: #000000;">&#123;</span>aValue<span style="color: #000000;">&#125;</span>, aFields <span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, .f. <span style="color: #000000;">&#41;</span></div>[/code:1z02n7yi]
diesable navigation Buttons using TArrayData():Edit() ?
hi, thx for Answer [quote="nageswaragunupudi":nk0meahz]Syntax: [code=fw:nk0meahz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> lReadOnly, lNavigate, cTitle <span style="color: #000000;">&#41;</span></div>[/code:nk0meahz] We can write: [code=fw:nk0meahz]<div class="fw" id="{CB}" style="font-family: monospace;">TArrayData<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: #000000;">&#123;</span>aValue<span style="color: #000000;">&#125;</span>, aFields <span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, .f. <span style="color: #000000;">&#41;</span></div>[/code:nk0meahz][/quote:nk0meahz] it seems not to make any difference <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> [code=fw:nk0meahz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">CLASS</span> TArrayData<br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">record</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:nk0meahz] there are no Parameter to pass ...
diesable navigation Buttons using TArrayData():Edit() ?
[quote:i4t382wf]it seems not to make any difference <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Code: CLASS TArrayData METHOD Edit() INLINE ::record():Edit() there are no Parameter to pass ... [/quote:i4t382wf] Sorry and also thanks for pointing our oversight. Please use this: This is working: [code=fw:i4t382wf]<div class="fw" id="{CB}" style="font-family: monospace;">TArrayData<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: #000000;">&#123;</span>aValues<span style="color: #000000;">&#125;</span>, aFields <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Record</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, .t. <span style="color: #000000;">&#41;</span></div>[/code:i4t382wf]
diesable navigation Buttons using TArrayData():Edit() ?
hi, [quote="nageswaragunupudi":1p7ohmju]Please use this: This is working: [code=fw:1p7ohmju]<div class="fw" id="{CB}" style="font-family: monospace;">TArrayData<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: #000000;">&#123;</span>aValues<span style="color: #000000;">&#125;</span>, aFields <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Record</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, .t. <span style="color: #000000;">&#41;</span></div>[/code:1p7ohmju][/quote:1p7ohmju] Yes, now it work, thx
diferencia de Setfocus() o SetScope()
Gracias quique por escribir. Me toco ponerle al XBrowse(), el SetScope() y cuando sale se lo quito. La diferencia que tenia el anterior setfilter() era que no tenia ningun filtro al indice, sino al momento de desplegar solo mostraba los registros dentro dl rango y cuando salia no habia que quitar nada ya que el truco solo mostraba registro.En el XBrowse() puse un objeto que se carga antes de activar el Xbrowse() y guarda los datos de la Base de datos y cuando sale restaura con todos los scope que tenga. /**** DBFINFO()* Syntax .....: DBFINFO()* Crea la Clase DbfInfo() que contiene la Informacion actual de la Base de Datos*/ CLASS DBFINFO // *** VARIABLES DEL OBJETO *** EXPORT: DATA cAlias // Alias de la Base de Datos DATA nRecNo // Numero del Registro Actual DATA nOrder // Numero actual del Order del Index DATA aTags // Array de Tags de los Index DATA nIndex // Numero de Indexs DATA aKeys // Array de Keys de los Index DATA cFocus // Nombre del Order del Index DATA aScope // Array de Scope de los Index // *** METODOS DEL OBJETO *** METHOD New() CONSTRUCTOR // Inicializa los Parametros METHOD End() // Finaliza el objetoENDCLASS* EOF DBFINFO/**** New()* Syntax .....: New(<cAlias>)* Arguments ..: <cAlias> Alias de la Base de Datos* Examples ...: New("MaLiq")* Inicializa los Valores de la Base de Datos*/ METHOD New(cAlias) CLASS DBFINFOBegin Sequence Default cAlias to Alias() // Chequea si el Alias esta activa if Empty(Select(cAlias)) Break(NIL) endif // Actualiza los Datos de la Base de Datos ::cAlias := cAlias // Alias de la Base de Datos ::nRecNo := (cAlias)->(RecNo()) // Numero del Registro Actual ::nOrder := (cAlias)->(OrdNumber()) // Numero del Order del Index ::cFocus := (cAlias)->(OrdName()) // Focus Actual del Index ::aTags := (cAlias)->(GetOrdNames()) // Nombre de los Tags de los Index ::nIndex := Len(::aTags) // Numero de Indexs // Adiciona las Keys de los Index ::aKeys := {} AEval(::aTags, {|x, i|AAdd(::aKeys, Upper(OrdKey(i)))}) // Adiciona los Scope de los Index ::aScope := {} AEval(::aTags, {|x, i|(cAlias)->(OrdSetFocus(i)),; AAdd(::aScope, {(cAlias)->(OrdScope(0)), (cAlias)->(OrdScope(1))})})EndSequenceReturn Self* EOF New/**** End()* Syntax .....: End()* Restaura la Base de Datos segun los parametros guardado de la Base de Datos*/ METHOD End() CLASS DBFINFOLocal cAliasBegin Sequence // Inicializa las Variables cAlias := ::cAlias // Restaura el Focus (cAlias)->(OrdSetFocus(::nOrder)) // Restaura el Scope AEval(::aScope, {|x, i|(cAlias)->(OrdSetFocus(i)),; (cAlias)->(OrdScope(0, x[1])),; (cAlias)->(OrdScope(1, x[2]))}) // Posiciona el Registro (cAlias)->(DbGoTo(::nRecNo))EndSequenceReturn NIL* EOF End
diferencia de Setfocus() o SetScope()
No creo que necesites todo eso con que guardes el registro y el índice creo que es suficiente:al crear el objeto[code:3dhqhk93]nReg &#58;= &#40; cAlias &#41;->&#40; recNo&#40;&#41; &#41; cInd &#58;= &#40; cAlias &#41;->&#40; ordSetFocus&#40;&#41; &#41;[/code:3dhqhk93] y al terminar [code:3dhqhk93]nCont &#58;= 0 do while &#46;t&#46; &#40; cAlias &#41;->&#40; ordSetFocus&#40; ++nCont &#41; &#41; if empty &#40; &#40; cAlias &#41;->&#40; ordSetFocus&#40;&#41; &#41; &#41; exit endIf &#40; cAlias &#41;->&#40; ordScope&#40; 0, nil &#41; &#41; &#40; cAlias &#41;->&#40; ordScope&#40; 1, nil &#41; &#41; endDo &#40; cAlias &#41;->&#40; dbGoto&#40; nReg &#41; &#41; &#40; cAlias &#41;->&#40; ordSetFocus&#40; cInd &#41; &#41;[/code:3dhqhk93]
diferencia de Setfocus() o SetScope()
Quique Muchas gracias por tiempoCordial SaludoAlberto Fernandez Maya
diferencia entre harbour y xharbour
Cuál es la diferencia entre harbour y el harbour que viene en \xharbour ?Estoy tratando de compilar con el xharbour pero tengo el siguiente problema, estoy usando archivos .clp para compilar varios programas, con harbour se generan archivos .c con el mismo nombre pero con xharbour se genera un .c por cada programa. Hay alguna forma de indicarle que genere también un solo .c o tengo que escribir por cada programa las lineas para el compilador c (borland) ?
diferencia entre harbour y xharbour
Mario,Por lo que tengo entendido el soporte de ficheros CLP no está completado en Harbour/xHarbour.Para evitar tener que usar multiples llamadas a Harbour.exe con cada PRG, puedes usar un fichero BAT asi:for %%f in (*.prg) do c:\harbour\bin\harbour %%f /n /ic:\fwh\include;c:\harbour\include for %%f in (*.c) do c:\bcc55\bin\bcc32 -c -Ic:\bcc55\include;c:\harbour\include %%f
diferencia entre harbour y xharbour
Muchas gracias, Antonio. Quedó perfecto.
diferencia entre harbour y xharbour II
Probando encontré un comportamiento desigual con los campos memo Imagen en harbour [url=http&#58;//www&#46;subirimagenes&#46;net/i/140621125254264845&#46;jpg:1ybv5jll][img:1ybv5jll]http&#58;//sim1&#46;subirimagenes&#46;net/img/2014/06/21//140621125254264845&#46;jpg[/img:1ybv5jll][/url:1ybv5jll] Imagen en xharbour (correcta) [url=http&#58;//www&#46;subirimagenes&#46;net/i/140621125256264846&#46;jpg:1ybv5jll][img:1ybv5jll]http&#58;//sim1&#46;subirimagenes&#46;net/img/2014/06/21//140621125256264846&#46;jpg[/img:1ybv5jll][/url:1ybv5jll] el código es el siguiente [code=fw:1ybv5jll]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; aPedido:<span style="color: #000000;">observa1</span> := &nbsp;oPmemo1:<span style="color: #000000;">observa</span> <br />&nbsp; &nbsp; &nbsp; etc etc<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> aPedido:<span style="color: #000000;">observa1</span> MEMO <span style="color: #0000ff;">id</span> <span style="color: #000000;">109</span> <span style="color: #0000ff;">of</span> odlgped <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp; &nbsp;odlgped:<span style="color: #000000;">bStart</span> := <span style="color: #000000;">&#123;</span>|| oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetSel</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1ybv5jll] Alguna idea o sugerencia Gracias
diferencia entre harbour y xharbour II
Luis, Para mi es una diferencia en como xharbour 2 y Harbour 3.2 alamacenan los campos memo. Si pudieses salvarlos desde tu aplicación con xHarbour 2 a un fichero ascii, por ejemplo, y luego leerlos desde Harbour desde ese fichero externo y volver a guardarlos como memo, de esa manera se corregiría. Seguro habrá otras formas, pero basicamente consistirían en los mismo (a mi entender), salvarlos a algo que no sea memo, y luego con Harbour leerlos y volver a almacenarlos como memo. Pienso que un fichero ascii podría ser lo más sencillo. Entre registro y registro, sitúa algún caracter (ó caracteres) que te sirvan para delimitar cada uno, incluso podrias anotar el número de registro tambien para luego asegurarte que se leen y se almacenan nuevamente en el orden correcto.
diferencia entre harbour y xharbour II
Gracias Antonio los voy a cambiar e informo Luis
diferencia entre harbour y xharbour II
Bueno aparentemente se arreglo fácil lo que hice fue [code=fw:23unojb6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aPedido:<span style="color: #000000;">observa</span> := &nbsp;StrTran<span style="color: #000000;">&#40;</span>oPmemo:<span style="color: #000000;">observa</span>,<span style="color: #ff0000;">"?"</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span> <br />&nbsp;</div>[/code:23unojb6] Espero sirva en mi caso los campos memos es para guardar detalles intrínsecos con la mercadería que se entrega y no hay "?" en estos casos. Ya había hecho de borrar los "?" manualmente en un pedido y luego guardarlo. Al reabrir el pedido me lo mostraba correctamente. Por eso el intento de utilizar strtran Luis
diferencia entre harbour y xharbour II
Me parece que no es una forma de guardar distinto los datos de los compiladores, porque tengo otra bases de datos (guardo separado los memos de la base principal en todos los casos) ejemplo clientes.dbf y datocliente.dbf (codigo,memo), y en ellas estan bien . ¿Es posible que en pedidos dejan espacios vacíos antes de escribir algo y eso se rellene con "?" ? Luis
diferencia entre harbour y xharbour II
SOLUCIONADO pero no entendido por mi, paso a explicarles Seguí tratando de ver el comportamiento de los campos memos. Trate de abrir los mismos desde dbwide, y me decía que estaban las dbf en cuestión corruptas, el programa las abría. Entonces hice desde el programa que esta en xharbour un copy to Ejemplo copy to pedmemo to tempe y luego las renombre Antes de hacer el copy to la base dbf vieja y la nueva 297455 bytes pero la fpt vieja tenía 6081453 y la nueva 1992053 bytes indudablemente había problemas en pedmemo.fpt, hice lo mismo con todos los que uso ya que estaban igual. Ahora el programa hecho en harbour lee bien los campos memo. En xharbour me leía bien antes y ahora. ¿Es posible que en xharbour los vaya degradando con el uso? Y no nos damos cuenta ya que igual los abre y los lee correctamente cosa que harbour no lo tolera. Bueno eso escapa a mis conocimientos pero por ahí andaba Garay. Luis
diferencia entre harbour y xharbour II
Luis, Excelente <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Me alegro que lo hayas solucionado. Ya verás como cada vez te sientes más a gusto con Harbour.
diferencias entre HB_SetCodePage() HB_CDPSELECT y FW_SetUni
Hola: Me gustaría saber por favor la diferencia entre estas funciones por favor. Muchas gracias. Saludos
diferencias entre HB_SetCodePage() HB_CDPSELECT y FW_SetUni
Mira: HB_SetCodePage() [url:20i9puym]http&#58;//www&#46;fivetechsoft&#46;com/harbour-docs/api&#46;html[/url:20i9puym] HB_CDPSELECT() [url:20i9puym]https&#58;//vivaclipper&#46;wordpress&#46;com/2014/01/16/hb_cdpselect/[/url:20i9puym] [url:20i9puym]https&#58;//vivaclipper&#46;wordpress&#46;com/tag/hb_cdpselect/[/url:20i9puym] FW_SetUnicode [url:20i9puym]http&#58;//fivetechsupport&#46;com/forums/viewtopic&#46;php?f=3&t=36637[/url:20i9puym] Saludos.
diferencias entre HB_SetCodePage() HB_CDPSELECT y FW_SetUni
Muchas gracias, ya leí la documentación y vi que el parámetro de hb_codepage() y hb_cdpseelct() es el mismo, pero sigo sin saber las diferencias. Gracias.
diferencias entre HB_SetCodePage() HB_CDPSELECT y FW_SetUni
Moisés, pueden parecer iguales Aqui tienes la información necesaria <!-- m --><a class="postlink" href="http://harbourlanguage.blogspot.com/2010/06/harbour-codepage.html">http://harbourlanguage.blogspot.com/201 ... epage.html</a><!-- m -->
diferencias entre el HARBOUR y el XHARBOUR
SALUDOS: favor indicarme las diferencias mas importantes entre los dos productos antes mencionados, pienso que si recien ingreso a este mundo y ya que tengo algo de experiencia en CLIPPER, porque no hacerlo directamente con el HHARBOUR, i disculpen mi INMODESTIA Saludos y Gracias RODOLFO SILVA <!-- e --><a href="mailto:sildata@cantv.net">sildata@cantv.net</a><!-- e -->
diferencias entre el HARBOUR y el XHARBOUR
Rodolfo, En primer lugar indicarte que está utilizando el foro en INGLES. Si te fijas en la página inicial del foro, existe un FIVEWIN PARA HARBOUR/XHARBOUR que es en español. A lo que preguntas, Harbour es un compilador clónico de Clipper a 32 bit. xHarbour (la x es de extended) es una derivación de Harbour y contiene, además, comandos y funciones que no contiene el viejo y querido Clipper. Mi opinión personal es que entre los dos, me quedo con xHarbour.
difference between xp and seven
Marco: Try in your resources file to use -1 value for the groupbox instead 116 value. Regards
difference between xp and seven
Is it normal this difference? (see below screen shots) Thanks in advance Marco >>fold.prg<<< #include "fivewin.ch" FUNCTION MAIN() LOCAL oDlg LOCAL oFld LOCAL aFld := { } LOCAL oSay1 , cSay1 := "First" LOCAL oGet1 , cGet1 := SPACE( 10 ) LOCAL oSay2 , cSay2 := "Second" LOCAL oGet2 , cGet2 := SPACE( 10 ) DEFINE DIALOG oDlg RESOURCE "DIALOG_1" REDEFINE SAY oSay1 ID 401 OF oDlg REDEFINE GET oGet1 ID 101 OF oDlg REDEFINE FOLDER oFld ID 301 OF oDlg PROMPT "Folder" DIALOGS "FOLD_1" REDEFINE SAY oSay2 ID 402 OF oFld:aDialogs[ 1 ] REDEFINE GET oGet2 ID 102 OF oFld:aDialogs[ 1 ] ACTIVATE DIALOG oDlg CENTER RETURN NIL >>fold.rc<<< /**************************************************************************** fold.rc produced by Borland Resource Workshop *****************************************************************************/ DIALOG_1 DIALOG 3, 3, 341, 240 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX FONT 8, "MS Sans Serif" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL { CONTROL "Work", 610, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 6, 0, 321, 69 CONTROL "", 101, "EDIT", ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 107, 18, 42, 16 CONTROL "First", 401, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 19, 18, 34, 13 CONTROL "", 1029, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 473, 9, 74, 13 CONTROL "", 301, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 75, 324, 151 } FOLD_1 DIALOG 4, -10, 137, 98 STYLE WS_CHILD FONT 8, "MS Sans Serif" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL { CONTROL "Descrizioni", 116, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 5, 6, 130, 81 CONTROL "Second", 402, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 53, 15, 56, 13 CONTROL "", 102, "EDIT", ES_LEFT | ES_READONLY | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 37, 119, 20 } 1 24 LOADONCALL MOVEABLE { '3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31' '2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54' '46 2D 38 22 20 73 74 61 6E 64 61 6C 6F 6E 65 3D' '22 79 65 73 22 3F 3E 0D 0A 3C 61 73 73 65 6D 62' '6C 79 20 78 6D 6C 6E 73 3D 22 75 72 6E 3A 73 63' '68 65 6D 61 73 2D 6D 69 63 72 6F 73 6F 66 74 2D' '63 6F 6D 3A 61 73 6D 2E 76 31 22 20 6D 61 6E 69' '66 65 73 74 56 65 72 73 69 6F 6E 3D 22 31 2E 30' '22 3E 0D 0A 3C 61 73 73 65 6D 62 6C 79 49 64 65' '6E 74 69 74 79 0D 0A 20 20 20 20 76 65 72 73 69' '6F 6E 3D 22 31 2E 30 2E 30 2E 30 22 0D 0A 20 20' '20 20 70 72 6F 63 65 73 73 6F 72 41 72 63 68 69' '74 65 63 74 75 72 65 3D 22 58 38 36 22 0D 0A 20' '20 20 20 6E 61 6D 65 3D 22 46 69 76 65 54 65 63' '68 20 53 6F 66 74 77 61 72 65 2E 46 69 76 65 57' '69 6E 2E 33 32 62 69 74 73 22 0D 0A 20 20 20 20' '74 79 70 65 3D 22 77 69 6E 33 32 22 0D 0A 2F 3E' '0D 0A 3C 64 65 73 63 72 69 70 74 69 6F 6E 3E 59' '6F 75 72 20 61 70 70 6C 69 63 61 74 69 6F 6E 20' '64 65 73 63 72 69 70 74 69 6F 6E 20 68 65 72 65' '2E 3C 2F 64 65 73 63 72 69 70 74 69 6F 6E 3E 0D' '0A 3C 64 65 70 65 6E 64 65 6E 63 79 3E 0D 0A 20' '20 20 20 3C 64 65 70 65 6E 64 65 6E 74 41 73 73' '65 6D 62 6C 79 3E 0D 0A 20 20 20 20 20 20 20 20' '3C 61 73 73 65 6D 62 6C 79 49 64 65 6E 74 69 74' '79 0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 74' '79 70 65 3D 22 77 69 6E 33 32 22 0D 0A 20 20 20' '20 20 20 20 20 20 20 20 20 6E 61 6D 65 3D 22 4D' '69 63 72 6F 73 6F 66 74 2E 57 69 6E 64 6F 77 73' '2E 43 6F 6D 6D 6F 6E 2D 43 6F 6E 74 72 6F 6C 73' '22 0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 76' '65 72 73 69 6F 6E 3D 22 36 2E 30 2E 30 2E 30 22' '0D 0A 20 20 20 20 20 20 20 20 20 20 20 20 70 72' '6F 63 65 73 73 6F 72 41 72 63 68 69 74 65 63 74' '75 72 65 3D 22 58 38 36 22 0D 0A 20 20 20 20 20' '20 20 20 20 20 20 20 70 75 62 6C 69 63 4B 65 79' '54 6F 6B 65 6E 3D 22 36 35 39 35 62 36 34 31 34' '34 63 63 66 31 64 66 22 0D 0A 20 20 20 20 20 20' '20 20 20 20 20 20 6C 61 6E 67 75 61 67 65 3D 22' '2A 22 0D 0A 20 20 20 20 20 20 20 20 2F 3E 0D 0A' '20 20 20 20 3C 2F 64 65 70 65 6E 64 65 6E 74 41' '73 73 65 6D 62 6C 79 3E 0D 0A 3C 2F 64 65 70 65' '6E 64 65 6E 63 79 3E 0D 0A 3C 2F 61 73 73 65 6D' '62 6C 79 3E 0D 0A' } two screenshot first xp [img:v5sfv69m]http&#58;//www&#46;hardservice&#46;it/images/xp&#46;jpg[/img:v5sfv69m] second windows 7 [img:v5sfv69m]http&#58;//www&#46;hardservice&#46;it/images/windows7&#46;jpg[/img:v5sfv69m]
difference between xp and seven
In Xp computer I set Windows Classic Style. I obtain the same problem of Windows 7 Pc If I don't redefine SAY objects // REDEFINE SAY oSay2 ID 402 OF oFld:aDialogs[ 1 ] they appears in this way [img:1130nbe7]http&#58;//www&#46;hardservice&#46;it/images/xp2&#46;jpg[/img:1130nbe7] Is there a solution to resolve this problem? I obviously want to avoid the redefine of every say object.... Many thanks Marco
difference between xp and seven
I do not understand but..... thank you very much .... SOLVED!
difference between xp and seven
Marco, Do you mean you don't understand why -1 works, or that you found a different solution. The value -1, signifies static text--any positive number signifies text that can be redefined. They are handled differently by Windows. Regards, James
difference between xp and seven
James, very helpful person as usual. many thanks marco
difference between xp and seven
[quote="James Bott":1rpv9m71]The value -1, signifies static text--any positive number signifies text that can be redefined. They are handled differently by Windows.[/quote:1rpv9m71] I didn't know that Windows managed id -1 labels and id positive number labels differently. Where can I read some MS documentation about this behavior? EMG
difference between xp and seven
Enrico, I don't know that much about them. Here are a few references although they don't provide much info either. Static Text: <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/dd373650(v=vs.85">http://msdn.microsoft.com/en-us/library ... 50(v=vs.85</a><!-- m -->).aspx Static Controls: <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/ms997560.aspx">http://msdn.microsoft.com/en-us/library/ms997560.aspx</a><!-- m --> Negative resource IDs: <!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/bb759919(v=vs.85">http://msdn.microsoft.com/en-us/library ... 19(v=vs.85</a><!-- m -->).aspx Set text color on a static text control: <!-- m --><a class="postlink" href="http://www.programmersheaven.com/mb/windows/305707/374492/re-set-text-color-on-a-static-text-control/?S=B20000">http://www.programmersheaven.com/mb/win ... /?S=B20000</a><!-- m --> Regards, James
difference between xp and seven
Can you point me at the exact place where they say that Windows treats a -1 id controls different from a positive id one, please? EMG
difference between xp and seven
Says with ID -1 (static) are not transparent in the dialogs. Only when the dialog are set to transparent, the static says are transparent. On redefined says with ID > 0 all is ok!
difference between xp and seven
Can I see a reduced sample of this behavior? Is this behavior seen on W7 only? EMG
difference between xp and seven
Please try next code to see the effect: DEFINE DIALOG oDlg OF oWin TITLE "Test" COLOR CLR_BLACK,CLR_YELLOW RESOURCE "ffff" and make in the RC a static say! It seems, only when a color of the dialog is defined, the static say is not transparent.
difference between xp and seven
This is a sample: [code=fw:2y47d8qz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> oDlg<br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />           <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"LABELS"</span>;<br />           <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_GREEN<br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />             <span style="color: #0000ff;">CENTER</span><br /><br />    <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2y47d8qz] [code=fw:2y47d8qz]<div class="fw" id="{CB}" style="font-family: monospace;">LABELS <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">96</span>, <span style="color: #000000;">44</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">230</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br />LANGUAGE LANG_NEUTRAL , SUBLANG_NEUTRAL<br /><span style="color: #000000;">&#123;</span><br /> LTEXT <span style="color: #ff0000;">"A label test"</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">25</span><br /><span style="color: #000000;">&#125;</span></div>[/code:2y47d8qz] The label is [b:2y47d8qz]not[/b:2y47d8qz] transparent. EMG
difference between xp and seven
Please test with ID -1 !!
difference between xp and seven
Same result. Did you test my sample? EMG
difference betwen 'PIXEL' and. 'TRUEPIXEL'
Hi all what is the difference between 'truepixel' and 'pixel' clause ? Thank
difference betwen 'PIXEL' and. 'TRUEPIXEL'
Look, [url:2jmhrypl]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=33179[/url:2jmhrypl]
different DEFINE WINDOW and DEFINE DIALOG
what is different in using DEFINE WINDOW and DEFINE DIALOGbest regardskajot
different DEFINE WINDOW and DEFINE DIALOG
DEFINE WINDOW is for creating WINDOWs and DEFINE DIALOG is for creating DIALOGs. What else? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->EMG
different DEFINE WINDOW and DEFINE DIALOG
[quote="kajot":3e4qpjn9]what is different in using DEFINE WINDOW and DEFINE DIALOG best regards kajot[/quote:3e4qpjn9]This is a question that i asked myself several times.No matter if i define a window or a dialog, i can place there controls like gets, says, listboxes, browses and more.Apart from MDI designed applications, the differences i know ist that a dialog has other units for it's dimensions, you can ask for oDlg:nResult and a window can not be designed with Borland Workshop.I suppose that kajot's question ( and also mine ) was about the real differences between dialogs and windows.Regards,Detlef
different DEFINE WINDOW and DEFINE DIALOG
Detlef,>I suppose that kajot's question ( and also mine ) was about the real differences between dialogs and windows. >The differences comes from the Windows API itself:Windows manages windows and dialogs as different kind of objects, though in fact, a dialog is a kind of a window (a specialized one for managing controls). i.e: In a standard window, Tab will not change the focus to the next control.FiveWin closely follows the Windows API where you can find CreateWindow() for creating a window and CreateDialog() (and DialogBox(), etc.) for creating a dialog.The Windows API provides support for building a dialog from resources, but does not offer such functionality for windows. This is just an example, there are some more differences.
different DEFINE WINDOW and DEFINE DIALOG
Dear Antonio,I think if FW add more option cluase like RESIZE16 for Dialog to use the same dimension of Window. Then we can use @ 10, 10 SAY 'Hello world' OF oDlgACTIVATE DIALOG oDlg [b:22fqtwi9]ASWIN[/b:22fqtwi9]show like@ 10, 10 SAY 'Hello world' OF oWndACTIVATE DIALOG oWndIt'll be good. Regards,Dutch[/b]
different DEFINE WINDOW and DEFINE DIALOG
Dutch,Yes, you are right, but we have to keep backwards compatibility, or we can break many users applications.Also, its a better choice if we let the Windows API manage the dimensions by itself. If we change the dimensions, the results may be different for different resolutions, fonts, etc.
different Warning using BCC7 32 Bit / MSVC 64 Bit
hi, both Version "seems" to run so far but i got (different) Warnings bcc7 32 Bit [quote:1s945api]Warning W8004 .\\HB_FUNC.PRG 132: 'fAutoEject' is assigned a value that is never used in function EjectVolume Warning W8004 .\\HB_FUNC.PRG 132: 'fRemoveSafely' is assigned a value that is never used in function EjectVolume Warning W8075 .\\HB_FUNC.PRG 136: Suspicious pointer conversion in function HB_FUN_EJECTREMOVABLE[/quote:1s945api] msvc 64 bit [quote:1s945api]HB_FUNC.PRG(97): warning C4244: "=": Konvertierung von "BOOL" in "BOOLEAN", möglicher Datenverlust HB_FUNC.PRG(104): warning C4431: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C nicht mehr unterstützt. HB_FUNC.PRG(136): warning C4090: "Initialisierung": Unterschiedliche "const"-Qualifizierer[/quote:1s945api] who can help me to "fix" both Version [code=fw:1s945api]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#pragma</span> begindump<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <winioctl.h><br /><span style="color: #00D7D7;">#include</span> <tchar.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapifs.h"</span><br /><br /><span style="color: #B900B9;">// Prototypes</span><br />BOOL EjectVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span>;<br />HANDLE OpenVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span>;<br />BOOL LockVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL DismountVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume, BOOL fPrevent<span style="color: #000000;">&#41;</span>;<br />BOOL AutoEjectVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL CloseVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br /><br />LPTSTR szVolumeFormat = <span style="color: #0000ff;">TEXT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\\</span><span style="color: #000000;">\\</span>.<span style="color: #000000;">\\</span>%c:"</span><span style="color: #000000;">&#41;</span>;<br />LPTSTR szRootFormat = <span style="color: #0000ff;">TEXT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%c:<span style="color: #000000;">\\</span>"</span><span style="color: #000000;">&#41;</span>;<br /><br />HANDLE OpenVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HANDLE hVolume;<br />   UINT uDriveType;<br />   TCHAR szVolumeName<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>;<br />   TCHAR szRootName<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>;<br />   DWORD dwAccessFlags;<br /><br />   wsprintf<span style="color: #000000;">&#40;</span>szRootName, szRootFormat, cDriveLetter<span style="color: #000000;">&#41;</span>;<br />   uDriveType = GetDriveType<span style="color: #000000;">&#40;</span>szRootName<span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>uDriveType<span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />   <span style="color: #00C800;">case</span> DRIVE_REMOVABLE:<br />     dwAccessFlags = GENERIC_READ | GENERIC_WRITE;<br />     <span style="color: #00C800;">break</span>;<br />   <span style="color: #00C800;">case</span> DRIVE_CDROM:<br />     dwAccessFlags = GENERIC_READ;<br />     <span style="color: #00C800;">break</span>;<br />   <span style="color: #00C800;">default</span>:<br />     <span style="color: #00C800;">return</span> INVALID_HANDLE_VALUE;<br />   <span style="color: #000000;">&#125;</span><br /><br />   wsprintf<span style="color: #000000;">&#40;</span>szVolumeName, szVolumeFormat, cDriveLetter<span style="color: #000000;">&#41;</span>;<br /><br />   hVolume = CreateFile<span style="color: #000000;">&#40;</span> szVolumeName,<br />                         dwAccessFlags,<br />                         FILE_SHARE_READ | FILE_SHARE_WRITE,<br />                         <span style="color: #00C800;">NULL</span>,<br />                         OPEN_EXISTING,<br />                         <span style="color: #000000;">0</span>,<br />                         <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span> hVolume;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL CloseVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   <span style="color: #00C800;">return</span> CloseHandle<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#define</span> LOCK_TIMEOUT        <span style="color: #000000;">10000</span>       <span style="color: #B900B9;">// 10 Seconds</span><br /><span style="color: #00D7D7;">#define</span> LOCK_RETRIES        <span style="color: #000000;">20</span><br /><br />BOOL LockVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwBytesReturned;<br />   DWORD dwSleepAmount;<br />   int nTryCount;<br /><br />   dwSleepAmount = LOCK_TIMEOUT / LOCK_RETRIES;<br /><br />   <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> nTryCount = <span style="color: #000000;">0</span>; nTryCount < LOCK_RETRIES; nTryCount++ <span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#123;</span><br />     <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, FSCTL_LOCK_VOLUME, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />                          &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><br />     <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span> dwSleepAmount <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL DismountVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwBytesReturned;<br />   <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, FSCTL_DISMOUNT_VOLUME, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />                           &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume, BOOL fPreventRemoval<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwBytesReturned;<br />   PREVENT_MEDIA_REMOVAL PMRBuffer;<br />   PMRBuffer.PreventMediaRemoval = fPreventRemoval;<br />   <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, IOCTL_STORAGE_MEDIA_REMOVAL,<br />                           &PMRBuffer, sizeof<span style="color: #000000;">&#40;</span>PREVENT_MEDIA_REMOVAL<span style="color: #000000;">&#41;</span>,<br />                           <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />AutoEjectVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwBytesReturned;<br />   <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, IOCTL_STORAGE_EJECT_MEDIA, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />                         &dwBytesReturned,<br />                         <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL EjectVolume<span style="color: #000000;">&#40;</span> TCHAR cDriveLetter <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   HANDLE hVolume;<br />   BOOL fRemoveSafely ; <span style="color: #B900B9;">//  = FALSE;</span><br />   BOOL fAutoEject    ; <span style="color: #B900B9;">//  = FALSE;</span><br /><br />   hVolume = OpenVolume<span style="color: #000000;">&#40;</span>cDriveLetter<span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hVolume == INVALID_HANDLE_VALUE <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> LockVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> && DismountVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />     fRemoveSafely = <span style="color: #00C800;">TRUE</span>;<br />   <span style="color: #000000;">&#123;</span><br />     <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>hVolume, <span style="color: #00C800;">FALSE</span><span style="color: #000000;">&#41;</span> && AutoEjectVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />           fAutoEject = <span style="color: #00C800;">TRUE</span>;<br />   <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ! CloseVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> EJECTREMOVABLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   char * szDrive = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   hb_retl<span style="color: #000000;">&#40;</span> EjectVolume<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> TCHAR <span style="color: #000000;">&#41;</span> *szDrive <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <span style="color: #00C800;">return</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> enddump</div>[/code:1s945api]
different Warning using BCC7 32 Bit / MSVC 64 Bit
You have to fix the function EjectVolume() as it is not well written. What this is supposed to mean? [code=fw:31vir7dl]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> LockVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> && DismountVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;fRemoveSafely = <span style="color: #00C800;">TRUE</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>hVolume, <span style="color: #00C800;">FALSE</span><span style="color: #000000;">&#41;</span> && AutoEjectVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fAutoEject = <span style="color: #00C800;">TRUE</span>;<br />&nbsp; &nbsp;<span style="color: #000000;">&#125;</span></div>[/code:31vir7dl]
different Warning using BCC7 32 Bit / MSVC 64 Bit
hi Enricon [quote="Enrico Maria Giordano":3qaqa8o8]You have to fix the function EjectVolume() as it is not well written.[/quote:3qaqa8o8] while i had Problem with my DLLCALL Version i have search and found this Version in HMG Forum [url:3qaqa8o8]https&#58;//www&#46;hmgforum&#46;com/viewtopic&#46;php?t=4524[/url:3qaqa8o8] but as i´m not a "C" Programmer i have no Idea how to change CODE --- Waring around Line 13x are "clear" (so far ...) but what is "BOOL" vs. "BOOLEAN" which i got using MSVC 64 Bit <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> i guess it is Parameter BOOL fPreventRemoval [quote="Enrico Maria Giordano":3qaqa8o8]What this is supposed to mean? [code=fw:3qaqa8o8]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> LockVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> && DismountVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />     fRemoveSafely = <span style="color: #00C800;">TRUE</span>;<br />   <span style="color: #000000;">&#123;</span><br />     <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>hVolume, <span style="color: #00C800;">FALSE</span><span style="color: #000000;">&#41;</span> && AutoEjectVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />           fAutoEject = <span style="color: #00C800;">TRUE</span>;<br />   <span style="color: #000000;">&#125;</span></div>[/code:3qaqa8o8][/quote:3qaqa8o8] Variable fRemoveSafely and fAutoEject are IMHO "not need" ... but how "without" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
different Warning using BCC7 32 Bit / MSVC 64 Bit
Dear Jimmy, Do you mean this code ? [code=fw:3baiz136]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// test program</span><br />request hb_gt_win_default<br />PROC MAIN<span style="color: #000000;">&#40;</span> cDriveLetter <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; hb_Default<span style="color: #000000;">&#40;</span> @cDriveLetter, <span style="color: #ff0000;">"G:"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> EjectRemovable<span style="color: #000000;">&#40;</span> cDriveLetter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"The drive "</span> + cDriveLetter + <span style="color: #ff0000;">" can be safely removed."</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Failed to safely remove/eject drive "</span> + cDriveLetter<br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; WAIT<br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><br /><span style="color: #B900B9;">// end test program</span><br /><br />***************************************************************<br /><span style="color: #00D7D7;">#pragma</span> begindump<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <winioctl.h><br /><span style="color: #00D7D7;">#include</span> <tchar.h><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><br /><span style="color: #B900B9;">// Prototypes</span><br />BOOL EjectVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span>;<br />HANDLE OpenVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span>;<br />BOOL LockVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL DismountVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume, BOOL fPrevent<span style="color: #000000;">&#41;</span>;<br />BOOL AutoEjectVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br />BOOL CloseVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span>;<br /><br />LPTSTR szVolumeFormat = <span style="color: #0000ff;">TEXT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\\</span><span style="color: #000000;">\\</span>.<span style="color: #000000;">\\</span>%c:"</span><span style="color: #000000;">&#41;</span>;<br />LPTSTR szRootFormat = <span style="color: #0000ff;">TEXT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%c:<span style="color: #000000;">\\</span>"</span><span style="color: #000000;">&#41;</span>;<br /><br />HANDLE OpenVolume<span style="color: #000000;">&#40;</span>TCHAR cDriveLetter<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; HANDLE hVolume;<br />&nbsp; &nbsp; UINT uDriveType;<br />&nbsp; &nbsp; TCHAR szVolumeName<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; TCHAR szRootName<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; DWORD dwAccessFlags;<br /><br />&nbsp; &nbsp; wsprintf<span style="color: #000000;">&#40;</span>szRootName, szRootFormat, cDriveLetter<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; uDriveType = GetDriveType<span style="color: #000000;">&#40;</span>szRootName<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>uDriveType<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> DRIVE_REMOVABLE:<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">dwAccessFlags</span> = GENERIC_READ | GENERIC_WRITE;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> DRIVE_CDROM:<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">dwAccessFlags</span> = GENERIC_READ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">default</span>:<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> INVALID_HANDLE_VALUE;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; wsprintf<span style="color: #000000;">&#40;</span>szVolumeName, szVolumeFormat, cDriveLetter<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; hVolume = CreateFile<span style="color: #000000;">&#40;</span> &nbsp; szVolumeName,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dwAccessFlags,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FILE_SHARE_READ | FILE_SHARE_WRITE,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NULL</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OPEN_EXISTING,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> hVolume;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL CloseVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> CloseHandle<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#define</span> LOCK_TIMEOUT &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">10000</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// 10 Seconds</span><br /><span style="color: #00D7D7;">#define</span> LOCK_RETRIES &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">20</span><br /><br />BOOL LockVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD dwBytesReturned;<br />&nbsp; &nbsp; DWORD dwSleepAmount;<br />&nbsp; &nbsp; int nTryCount;<br /><br />&nbsp; &nbsp; dwSleepAmount = LOCK_TIMEOUT / LOCK_RETRIES;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span> nTryCount = <span style="color: #000000;">0</span>; nTryCount < LOCK_RETRIES; nTryCount++ <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, FSCTL_LOCK_VOLUME, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span> dwSleepAmount <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL DismountVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD dwBytesReturned;<br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, FSCTL_DISMOUNT_VOLUME, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume, BOOL fPreventRemoval<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD dwBytesReturned;<br />&nbsp; &nbsp; PREVENT_MEDIA_REMOVAL PMRBuffer;<br />&nbsp; &nbsp; PMRBuffer.PreventMediaRemoval = fPreventRemoval;<br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, IOCTL_STORAGE_MEDIA_REMOVAL,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&PMRBuffer, sizeof<span style="color: #000000;">&#40;</span>PREVENT_MEDIA_REMOVAL<span style="color: #000000;">&#41;</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />AutoEjectVolume<span style="color: #000000;">&#40;</span> HANDLE hVolume <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD dwBytesReturned;<br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, IOCTL_STORAGE_EJECT_MEDIA, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&dwBytesReturned,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />BOOL EjectVolume<span style="color: #000000;">&#40;</span> TCHAR cDriveLetter <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; HANDLE hVolume;<br /><br />&nbsp; &nbsp; BOOL fRemoveSafely = <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; BOOL fAutoEject = <span style="color: #00C800;">FALSE</span>;<br /><br />&nbsp; &nbsp; hVolume = OpenVolume<span style="color: #000000;">&#40;</span>cDriveLetter<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hVolume == INVALID_HANDLE_VALUE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> LockVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> && DismountVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; fRemoveSafely = <span style="color: #00C800;">TRUE</span>;<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>hVolume, <span style="color: #00C800;">FALSE</span><span style="color: #000000;">&#41;</span> && AutoEjectVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fAutoEject = <span style="color: #00C800;">TRUE</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ! CloseVolume<span style="color: #000000;">&#40;</span>hVolume<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapifs.h"</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> EJECTREMOVABLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span> <br />&nbsp; &nbsp; char * szDrive = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; hb_retl<span style="color: #000000;">&#40;</span> EjectVolume<span style="color: #000000;">&#40;</span> *szDrive <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>; <br />&nbsp; &nbsp; <span style="color: #00C800;">return</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> enddump</div>[/code:3baiz136]
different Warning using BCC7 32 Bit / MSVC 64 Bit
hi Antonio, [quote="Antonio Linares":2st7pght]Do you mean this code ?[/quote:2st7pght] Yes, this CODE give me under BCC7 32 Bit this Warnings [quote:2st7pght]Warning W8004 TEST1.prg 147: 'fAutoEject' is assigned a value that is never used in function EjectVolume Warning W8004 TEST1.prg 147: 'fRemoveSafely' is assigned a value that is never used in function EjectVolume Warning W8075 TEST1.prg 153: Suspicious pointer conversion in function HB_FUN_EJECTREMOVABLE[/quote:2st7pght] as it are "only Warning" and CODE "seems" to work i can use it ... but i don´t like "warning"
different Warning using BCC7 32 Bit / MSVC 64 Bit
[quote="Jimmy":2az6cwq8]Variable fRemoveSafely and fAutoEject are IMHO "not need" ... but how "without" <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->[/quote:2az6cwq8] Yes, they are not needed because they are not used.
different Warning using BCC7 32 Bit / MSVC 64 Bit
hi, now i have create own Structure, from Original (and add "X"), but change Member from BOOLEAN to BOOL [code=fw:26ot610o]<div class="fw" id="{CB}" style="font-family: monospace;">typedef struct _PREVENT_MEDIA_REMOVALX <span style="color: #000000;">&#123;</span><br />  BOOL PreventMediaRemoval;<br /><span style="color: #000000;">&#125;</span> PREVENT_MEDIA_REMOVALX, *PPREVENT_MEDIA_REMOVALX;<br /><br />BOOL PreventRemovalOfVolume<span style="color: #000000;">&#40;</span>HANDLE hVolume, BOOL fPrevent <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dwBytesReturned;<br />   PREVENT_MEDIA_REMOVALX PMRBuffer;<br />   <br />   PMRBuffer.PreventMediaRemoval = <span style="color: #000000;">&#40;</span>BOOL<span style="color: #000000;">&#41;</span> fPrevent ;<br /><br />   <span style="color: #00C800;">return</span> DeviceIoControl<span style="color: #000000;">&#40;</span> hVolume, IOCTL_STORAGE_MEDIA_REMOVAL,<br />                           &PMRBuffer, sizeof<span style="color: #000000;">&#40;</span>PREVENT_MEDIA_REMOVALX<span style="color: #000000;">&#41;</span>,<br />                           <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, &dwBytesReturned, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:26ot610o] this now give me no Warning any more <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
different backgroundcolors for each column
Hi,Is it possible to have in each column an other backgroundcolor with the normal browse or should I use xBrowse?Thanks,Marc
different backgroundcolors for each column
Marc,You can have different background colors for each column with TWBrowse this way:oBrowse:nClrPane := { | nCol | ColumnColor( nCol ) }where function ColumnColor( nColumn ) should return the nRGB() color to use for each column
different backgroundcolors for each column
Antonio,I use[code:1co0ijky]func ColumnColor&#40;ncol&#41; local ret_val msginfo&#40;ncol&#41; if ncol= 1 ret_val = arts->hkleur else ret_val = arts->kleur endif return ret_val [/code:1co0ijky]The fields [b:1co0ijky]arts->hkleur[/b:1co0ijky] and [b:1co0ijky]arts->kleur[/b:1co0ijky] are holding the rgb color.I inserted a msginfo() to see the value in [b:1co0ijky]ncol[/b:1co0ijky] but it's always returing [b:1co0ijky]nil[/b:1co0ijky]. How do I know the column number?Thanks,Marc
different backgroundcolors for each column
Marc,What FWH version are you using ?Please check that you have this code in Class TWBrowse, function wBrwLine()[code:21wqtc4t] SetBkColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrBack &#41; == "B",; Eval&#40; nClrBack, n &#41;, nClrBack &#41;,; If&#40; ValType&#40; nClrPane &#41; == "B", Eval&#40; nClrPane, n &#41;, nClrPane &#41; &#41; &#41; [/code:21wqtc4t]
different backgroundcolors for each column
Antonio,I use FWH7.10.I have this line[code:3fx9lo4l] SetBkColor&#40; hDC, If&#40; nColAct != nil, If&#40; ValType&#40; nClrBack &#41; == "B",; Eval&#40; nClrBack &#41;, nClrBack &#41;, nClrPane &#41; &#41; [/code:3fx9lo4l]Regards,Marc
different backgroundcolors for each column
Marc,Please modify it as I have described itAnyhow, if you want that one and many other new features, then I suggest you to upgrade to current FWH 8.07
different backgroundcolors for each column
Thanks Antonio,It"s working now!!!Marc
different colors
I have this xbrowse [img:2w71f1r7]https&#58;//i&#46;postimg&#46;cc/4NSJBBmD/hhhhhh&#46;png[/img:2w71f1r7] Is it possible to divide the columns into different colors? like the scheme I put below or just the outlines? [img:2w71f1r7]https&#58;//i&#46;postimg&#46;cc/9fnmNb8R/h1&#46;jpg[/img:2w71f1r7]
different colors
oBrw:bPainted
different colors
[quote="nageswaragunupudi":1t2px3li]oBrw:bPainted[/quote:1t2px3li] Nages, only the line Now there is :nColDividerStyle := LINESTYLE_LIGHTGRAY I wish change the Line at columns only the * :SetGroupHeader( "Estrazione", 1, 2) :SetGroupHeader( "Bari", 3, 7 ) * :SetGroupHeader( "Cagliari", 8, 12 ) * :SetGroupHeader( "Firenze", 13, 17 ) * :SetGroupHeader( "Genova", 18, 22 ) * :SetGroupHeader( "Milano", 23, 27 ) * :SetGroupHeader( "Napoli", 28, 32 ) * :SetGroupHeader( "Palermo", 33, 37 ) * :SetGroupHeader( "Roma", 38, 42 ) * :SetGroupHeader( "Torino", 43, 47 ) * :SetGroupHeader( "Venezia", 48, 52 ) * :SetGroupHeader( "Nazionale", 53, 57 ) *
different column color
Hi, I'm trying to obtain a coloured column without success! REDEFINE BROWSE oBrw ID 101 OF oDlg FONT oFont cHeading := "CODE KIT" bLine := "{|| field->code }" oCol := TcColumn():New( cHeading , &bLine , , CLR_GREEN , CLR_WHITE , 0 , 100 , , , , , , , ) oBrw:addcolumn( oCol ) Thanks in advance Marco
different column color
Marco, You can define the col-Background-color, or use a function, to define different cell-colors of a column. [color=#0000FF:2u0nuc12][b:2u0nuc12]oBrw:aCols[4]:bClrstd := {|| { 0, 255 } } // TEST_SIZE(oBrw, 4) } } oBrw:aCols[5]:bClrstd := {|| { 16777215, 11556864 } } // TEST_SIZE(oBrw, 5) } }[/b:2u0nuc12][/color:2u0nuc12] [img:2u0nuc12]http&#58;//www&#46;pflegeplus&#46;com/pictures/colcolor1&#46;jpg[/img:2u0nuc12] [color=#0000FF:2u0nuc12][b:2u0nuc12]Define Column / cell-color from Function[/b:2u0nuc12][/color:2u0nuc12] [code=fw:2u0nuc12]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br /><span style="color: #B900B9;">// The selected Columns 4 and 5, to define the color </span><br /><span style="color: #B900B9;">// instead of TEST_SIZE(oBrw,.... ) You can use a color-value</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, TEST_SIZE<span style="color: #000000;">&#40;</span>oBrw, <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrstd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>, TEST_SIZE<span style="color: #000000;">&#40;</span>oBrw, <span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />...<br />...<br /><span style="color: #00C800;">FUNCTION</span> TEST_SIZE<span style="color: #000000;">&#40;</span>oBrw,nCol<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> nColor := <span style="color: #000000;">16777215</span><br /><span style="color: #00C800;">IF</span> ncol = <span style="color: #000000;">4</span><br />    <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGWIDTH > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">250</span><br />        nColor :=  <span style="color: #000000;">13092607</span><br />    ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGWIDTH > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">200</span><br />        nColor :=  <span style="color: #000000;">11906815</span><br />    ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGWIDTH > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">150</span><br />        nColor :=  <span style="color: #000000;">9997567</span><br />        ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGWIDTH  > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">100</span><br />        nColor :=  <span style="color: #000000;">6446847</span><br />        ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGWIDTH > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">50</span><br />        nColor :=  <span style="color: #000000;">5329407</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> ncol = <span style="color: #000000;">5</span><br />    <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGHEIGHT > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">250</span><br />        nColor :=  <span style="color: #000000;">13092607</span><br />    ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGHEIGHT > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">200</span><br />        nColor :=  <span style="color: #000000;">11906815</span><br />    ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGHEIGHT > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">150</span><br />        nColor :=  <span style="color: #000000;">9997567</span><br />        ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGHEIGHT  > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">100</span><br />        nColor :=  <span style="color: #000000;">6446847</span><br />        ELSEIF <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->IMGHEIGHT > aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> - <span style="color: #000000;">50</span><br />        nColor :=  <span style="color: #000000;">5329407</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> nColor<br /> </div>[/code:2u0nuc12] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
different column color
Many thanks Uwe, It's very strange! oBrw:aCols[1]:bClrstd := {|| { 0, 255 } } oBrw:aCols[2]:bClrstd := {|| { 0, 255 } } When I run it I have this error Application =========== Path and name: c:\bin\kit\kit_pto.exe (32 bits) Size: 2,708,992 bytes Time from start: 0 hours 0 mins 1 secs Error occurred at: 12/04/2013, 16:20:43 Error description: Warning BASE/1004 Message not found: TCBROWSE:ACOLS Args: Stack Calls =========== Called from: source\rtl\tobject.prg => TCBROWSE:ERROR(172) Called from: source\rtl\tobject.prg => TCBROWSE:MSGNOTFOUND(205) Called from: source\rtl\tobject.prg => TCBROWSE:ACOLS(0) Called from: cal.prg => DISTINTE(490)