topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Cancelar con BTNBMP | Hola Antonio,
Para que no evalúe los valids de los controles de un diálogo, en el botón de salir se pone la clausula CANCEL.
Pero al sustituir un TBUTTON por un TBTNBMP para poder usar colores, me encuento que no existe la clausula CANCEL y además no sé como hacer la misma funcionalidad.
¿Se te ocurre como puedo cancelar con un TBTNBMP? |
Cancelar con BTNBMP | Joaquín,
Este ejemplo basado en el que te mostré para probar los BTNBMPs funciona bien:
[code=fw:1n96cz7w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fwce.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oBtn<br /> <span style="color: #00C800;">local</span> cVar := <span style="color: #ff0000;">"This is a test"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Test"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cVar <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> .F.<br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ok"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> MsgBeep<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBtn:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> CLR_WHITE, CLR_BLUE <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1n96cz7w] |
Cancelar con BTNBMP | Antonio,
Pero no es el cancel para todos los gets del diàlogo,
que cada uno tiene un valid diferente.
He visto el fuente de Tbutton y la data lcancel. Eso falta en la clase tbtnbmp y sería muy fàcil implementarlo.
Yo podría modificar la clase, peeo lo suyo sería que esa modificaciòn fuera dentro de la librería. |
Cancelar con BTNBMP | Joaquín,
Si eres tan amable, modifica la clase y me la envias y la incluyo en FWPPC.
Hay muy pocos usuarios de FWPPC y no hay tiempo para todo, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cancelar con BTNBMP | Antonio,
Ya he implementado la clausula CANCEL en FWCE.ch y en BTNBMP.prg
Funciona de lujo.
DIme como te lo hago llegar para que lo incluyas en la LIB. |
Cancelar con BTNBMP | Joaquín,
Por favor envíame por email los PRGs y CH modificados y los incluiré en el repositorio de FWPPC
La próxima versión que se publique de FWPPC incluirá tus cambios.
Muchas gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cancelar proceso en curso | Hola!En mi apliación, hay una función que tarda un rato en finalizar el proceso. Por eso, le he puesto un MsgRun con un texto de 'APLICACION EN PROCESO'Mi pregunta es,¿si el ususario desea cancelar el proceso en cualquier momento, hay algún modo de harcelo? Gracias, y un saludo. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
Cancelar proceso en curso | Javier,La función TerminateProcess() podría servir:<!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/ms686714(VS.85">http://msdn.microsoft.com/en-us/library/ms686714(VS.85</a><!-- m -->).aspx |
Cancelar proceso en curso | Prueba con este ejemplo.<!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=681">http://www.fivewin.com.br/exibedicas.asp?id=681</a><!-- m -->Saludos. |
Cancelar proceso en curso | Gracias, pero creo que no me he explicado bien.No quiero eliminar un proceso .EXE como si nos fueramos al administrador de tareas.Lo que quiero es interrumpir una función que está ejecutandose para salir de ella y así volver al menú principal de la aplicación, y no, interrumpir la aplicación en si.Karina, en tu ejemplo, creo que killprocess, lo que hace es cerrar la aplicación exe que se está ejecutando, con lo cual no me sirve.Antonio, en tu ejemplo, no lo tengo claro. Pues viene escrito en visual C. De modo que no sé como podría usar tu ejemplo. <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> |
Cancelar proceso en curso | jfafive:yo hago lo siguiente:me creo una funcion que me muestra la evolucion de lo que estoy haciendo.[code:2847jaaw]
***************
STATIC FUNCTION BoxStatus()
***************
LOCAL aStru
// IF EMPTY( aStatus )
aStatus := ARRAY(7)
aStatus[7] := .F. // lCancel
// ENDIF
aStru := {}
AADD( aStru, { "TESTO" , "C", 120, 0 } )
DbCreate( "status.dbf", aStru )
select 0
USE status NEW ALIAS status exclusive
DEFINE DIALOG aStatus[1] NAME "DLG_ACQ_VEN_STATUS"
REDEFINE LISTBOX aStatus[2];
FIELDS status->testo;
HEADERS "";
ALIAS "status";
ID 101 OF aStatus[1]
REDEFINE METER aStatus[3] VAR aStatus[6] ID 102 OF aStatus[1]
REDEFINE SAY aStatus[4] PROMPT "" ID 103 OF aStatus[1]
REDEFINE BUTTON aStatus[5] ID 501 ACTION ( aStatus[7]:=.T., aStatus[1]:end() )
ACTIVATE DIALOG aStatus[1] CENTER NOWAIT;
VALID (aStatus[3]:end(), status->( dbCloseArea() ), FERASE( "status.dbf" ), .T. )
RETURN NIL
*
** BoxStatus
[/code:2847jaaw]
y luego la llamo desde mi funcion, aqui te escribo una parte para que te hagas una idea:
[code:2847jaaw]
BoxStatus()
aStatus[3]:SetTotal( nCorr )
// nCorr = totale articoli che corrispondono con il filtro.
nSecIni := SECONDS()
nSecTot := nCorr * 3 // facciamo 3 secondi per fare il calcolo per ogni articolo o taglia trovata
DO WHILE art->( !eof() ) .AND. !aStatus[7]
InfStat("Che corrispondono con il filtro: " + NTRIM( nTrovatiConFiltro ) + " Art. att. " + art->cod )
status->( add_rec() )
REPLACE status->testo WITH art->cod + " - " + art->des
status->( dbUnLock() )
aStatus[4]:varput( " Tempo residuo: " + TimeAsString( nSecTot ) )
aStatus[4]:refresh()
aStatus[2]:goBottom()
aStatus[2]:refresh()
..
..
ENDDO
[/code:2847jaaw]Cuando !aStatus[7] es falso, me salgo de mi funcion.Espero te sirva la idea.Saludos |
Cancelar proceso en curso | Javier,Lo que te indica Pedro, es la forma de hacerlo:[code:3trpe19l]
while lSigue
... haz lo que sea
end
[/code:3trpe19l]si lSigue cambia a .F. entonces se sale del bucle. |
Cancelar proceso en curso | Ok,Gracias por vuestros consejos.Lo voy a poner en práctica a ver como va. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
Cancelar proceso en curso | HolaLo otro que puedes hacer es usar la funcion GetKeyState..[code:3udzjna0]do while Eval( bBusqueda )
if GetKeyState( 27 )
if MsgYesNo( "¿Ha presionado la tecla ESC, desea salir?", "Usuario" )
exit
endif
endif
bla..bla..cl
enddo[/code:3udzjna0] |
Cancelar proceso en curso | [quote="jfafive":23i71vvn]Hola!
En mi apliación, hay una función que tarda un rato en finalizar el proceso. Por eso, le he puesto un MsgRun con un texto de 'APLICACION EN PROCESO'
Mi pregunta es,
¿si el ususario desea cancelar el proceso en cualquier momento, hay algún modo de harcelo?
Gracias, y un saludo.
<!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:23i71vvn]Con la function MsgMeter() puedes hacerlo, ya que trae un botón "Cancel" que detiene el proceso. En source esta el codigo y lo puedes modificar a tus necesidades.Saludos. |
Cancellare il buffer di tastiera | Salve,
esiste una funzione per cancellare il buffer di tastiera ?
In pratica sto gestendo l'inserimento automatico tramite codice a barre: il cliente passa il lettore sul codice quando si trova su una get e si apre automaticamente un'altra finestra con i dati collegati a quel codice.
Il problema è che alcuni lettori (a seconda di come configurati) aggiungono un invio al termine della stringa del codice a barre, così facendo il tasto di invio mi chiude immediatamente la finestra che apro leggendo il codice a barre perché il focus è direttamente sul pulsante "Ok".
Qualche idea ?
Grazie
Marco |
Cancellare il buffer di tastiera | Attivare il SET CONFIRM ON?
EMG |
Cancellare il buffer di tastiera | Puoi riconfigurare il lettore eliminando il comando invio alla lettura .
Ciao MAurizio |
Cancellare il buffer di tastiera | Per gestire l'acquisizione di un codice tramite barcode, devo necessariamente utilizzare una get con clausola ON CHANGE e verificare se il dato inserito è congruo, questo perché non conosco a priori se il lettore di barcode del cliente è preconfigurato per la trasmissione del codice di invio a fine scansione o meno.
Sarebbe piuttosto complicato richiedere di settare questo parametro nella configurazione del lettore a causa dell'elevato numero di clienti e del fatto che la maggioranza dei barcode ha un manuale di configurazione in inglese.
Il problema è che la finestra che apro dopo aver letto il codice è già precompilata con valori di default che nella maggioranza delle situazioni vanno bene e non richiedono modifiche da parte dell'utente, pertanto per velocizzare l'input dei dati ho posizionato il focus di questa finestra direttamente sul pulsante "ok", questo ovviamente mi crea però il problema che se il barcode mi trasmette anche il codice di invio allora la finestra mi si richiuderà all'istante in quanto il focus è proprio sul pulsante di chiusura. Per il momento ho spostato il focus sul campo precedente l'Ok in modo che anche se venisse trasmesso il codice di invio il focus andrebbe solo allora su Ok e la finestra non verrebbe chiusa, tuttavia in questo modo costringo tutti gli altri clienti che non hanno il lettore che trasmette l'invio a spostarsi di un campo per confermare la finestra rallentando l'input. |
Cancellare il buffer di tastiera | Torno alla mia proposta: attiva il SET CONFIRM ON ma rendi la cosa opzionale così l'utente può attivarlo o disattivarlo a seconda di come è configurato il suo lettore.
EMG |
Cancellazione Directory e subDirectory | Ciao a Tutti,volevo chiedere come posso cancellare tutto il contenuto di una directory (cartella) dove all'interno sono contenuti file e anche altre sotto cartellechiaramente sempre con FWPPCGrazie mille a tutti |
Cancellazione Directory e subDirectory | Usa la funzione Directory() per trovare e cancellare tutti i file della directory indicata. La funzione dovrà essere ricorsiva se all'interno della directory vi sono delle subdirectory. Un esempio non funzionante tanto per avere un'idea di come procedere:[code:1lct0wn1]FUNCTION DELETEDIR( cDir )
LOCAL aDir, cName
LOCAL i
aDir = DIRECTORY( cDir + "\*.*", "HRD" )
FOR i = 1 TO LEN( aDir )
cName = aDir[ i, F_NAME ]
IF cName == "."; LOOP; ENDIF
IF cName == ".."; LOOP; ENDIF
cName = cDir + "\" + cName
IF "D" $ aDir[ i, F_ATTR ]
IF !DELETEDIR( cName )
RETURN .F.
ENDIF
ELSE
IF FERASE( cName ) = -1
POPMSG( "Impossibile cancellare il file " + cName + ".", 1 )
RETURN .F.
ENDIF
ENDIF
NEXT
IF !REMOVEDIR( cDir )
POPMSG( "Impossibile cancellare la cartella " + cDir + ".", 1 )
RETURN .F.
ENDIF
RETURN .T.[/code:1lct0wn1]EMG |
Cannot Create Dialog Error | Hi,
I have just added a new dialog/tab to a folder and it works fine in all the machines i have tested it on in my office, however, when i have installed the app at my clients i get a cannot create dialog error - can anyone offer any advice in tracking down what is causing this error?
I am currently using FWH 7.12 with the latest version of commercial xHarbour
Thanks in advance
Pete |
Cannot Create Dialog Error | I've narrowed this down to an image i'm displaying on the new tab.
I'm using REDEFINE IMAGE to display the image, how should this be defined in the .rc file? Currently i'm using:
CONTROL "TBitmap", 114, "TBitmap" ....
should i replace "TBitmap" with "TImage" ? |
Cannot Create Dialog Error | Yes, TImage.
EMG |
Cannot Create Dialog Error | Thats fixed it - weird how it only errors on certain pcs/installations! |
Cannot Create Dialog Error | Yes, I can't imagine any valid reasons for that behavior... <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
EMG |
Cannot Load FreeImage64.dll | Computadora con 8 Gbs de memóra RAM esta con este problema: CANNOT LOAD FREEIMAGE64.DLL que hacer?
Windows 8 de 64 bits.
Gracias, saludos. |
Cannot Load FreeImage64.dll | João,
Por favor prueba esto:
MsgInfo( LoadLIbrary( "freeimage64.dll" ) )
y dime que valor te muestra |
Cannot Load FreeImage64.dll | Master, windows 8 64 bits 8 Gbs de RAM, no carga la dll, que puede ser, corrupta? Retorno: 0 - zero.
[code=fw:wbhkpwqf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> LoadLIbrary<span style="color: #000000;">(</span> <span style="color: #ff0000;">"freeimage64.dll"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:wbhkpwqf]
<!-- m --><a class="postlink" href="http://i.imgur.com/fWtg7lt.png">http://i.imgur.com/fWtg7lt.png</a><!-- m -->
[img:wbhkpwqf]http://i.imgur.com/fWtg7lt.png[/img:wbhkpwqf]
Gracias, saludos. |
Cannot Load FreeImage64.dll | Prueba con esta
<!-- m --><a class="postlink" href="https://www.dropbox.com/s/1ra2116tzn0l8me/freeimage64.dll?dl=0">https://www.dropbox.com/s/1ra2116tzn0l8 ... 4.dll?dl=0</a><!-- m --> |
Cannot Load FreeImage64.dll | Gracias Master, no funciona:
[img:1xwhqdso]http://i.imgur.com/8m5rXai.png[/img:1xwhqdso]
FWH1306 de 32 bits, hay algun cambio en IMAGE.PRG que resolva ó el FHW de 32 bits actual carga la DLL FREEIMAGE.DLL en windows 8 de 64 bits? Mi executábles és de 32 bits.
Gracias, saludos. |
Cannot Load FreeImage64.dll | Master puedo cambiar la IMAGE.PRG,
[code=fw:1c6paax1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">CLASS</span> TImage <span style="color: #0000ff;">FROM</span> TBitmap<br /><br /> <span style="color: #00C800;">DATA</span> nProgress<br /><br /> <span style="color: #00C800;">DATA</span> nFormat<br /><br /> CLASSDATA cResFile AS CHARACTER ;<br /> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ISWIN64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"freeimage64.dll"</span>, <span style="color: #ff0000;">"freeimage.dll"</span> <span style="color: #000000;">)</span><br /> </div>[/code:1c6paax1]
Para:
[code=fw:1c6paax1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">CLASS</span> TImage <span style="color: #0000ff;">FROM</span> TBitmap<br /><br /> <span style="color: #00C800;">DATA</span> nProgress<br /><br /> <span style="color: #00C800;">DATA</span> nFormat<br /><br /> CLASSDATA cResFile AS CHARACTER ;<br /> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ISWIN64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"freeimage.dll"</span>, <span style="color: #ff0000;">"freeimage.dll"</span> <span style="color: #000000;">)</span><br /> </div>[/code:1c6paax1]
Funcionara em windows 8 de 64 bits la DLL FREEIMAGE.DLL de 32 bits o no?
Solo asta hacermos la actualización de version del FWH de 2016.
Gracias, saludos. |
Cannot Load FreeImage64.dll | Creo que quedaria mejor asi
[code=fw:wes2srmi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> CLASSDATA cResFile AS CHARACTER ;<br /> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ISExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"freeimage64.dll"</span>, <span style="color: #ff0000;">"freeimage.dll"</span> <span style="color: #000000;">)</span><br /> <br /> </div>[/code:wes2srmi] |
Cannot Load FreeImage64.dll | [quote="cnavarro":1oukdv1f]Creo que quedaria mejor asi
[code=fw:1oukdv1f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> CLASSDATA cResFile AS CHARACTER ;<br /> <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ISExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"freeimage64.dll"</span>, <span style="color: #ff0000;">"freeimage.dll"</span> <span style="color: #000000;">)</span><br /> <br /> </div>[/code:1oukdv1f][/quote:1oukdv1f]
Master en la version FWH1306 no ejiste esta funcion ISExe64()
Gracias, saludos. |
Cannot Load FreeImage64.dll | La solución de Cristobal es la correcta |
Cannot Load FreeImage64.dll | Gracias maestro. El próximo mes, vamos a actualizar la Fivewin a la última versión 2016. Me encanta Fivewin.
Súper agradecido.
Saludos. |
Cannot Load FreeImage64.dll | João,
[code=fw:3n8imoxp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> ISEXE64 <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Check if our app is 64 bits</span><br /><span style="color: #000000;">{</span><br /> hb_retl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> sizeof<span style="color: #000000;">(</span> void * <span style="color: #000000;">)</span> == <span style="color: #000000;">8</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span></div>[/code:3n8imoxp] |
Cannot Load FreeImage64.dll | Gracias master, resuelto:
[code=fw:6ii3f46f]<div class="fw" id="{CB}" style="font-family: monospace;"><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> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapierr.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> ISEXE64 <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Check if our app is 64 bits</span><br /><br /><span style="color: #000000;">{</span><br /> hb_retl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> sizeof<span style="color: #000000;">(</span> void * <span style="color: #000000;">)</span> == <span style="color: #000000;">8</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span> <br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:6ii3f46f]
|
Cannot Load FreeImage64.dll | Hola a todos, estoy a un paso de conseguir que funcione mi primera aplicación a 64bits.
el error que aparece es el consabido "[b:22aau081]Cannot load Freeimage64.dll[/b:22aau081]"
- FreeImage64.dll está en el directorio del .EXE
- Si hago [b:22aau081]MsgInfo(LoadLibrary("freeimage64.dll"))[/b:22aau081] me devuelve un valor distinto de 0
- Falla justo al crear TImage() según figura en el código expuesto mas abajo
[code=fw:22aau081]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ICON</span> oIcon <span style="color: #0000ff;">FROM</span> nFilaSup, nColIzq <span style="color: #0000ff;">TO</span> nFilaInf, nColDer <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> APP_NAME <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">(</span>oMenu<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">CURSOR</span> oMano <span style="color: #0000ff;">OF</span> oWnd _2007<br /><br /> <span style="color: #B900B9;">// *********** bmp de fondo ********************************************</span><br /> oBmpFondo = TImage<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> , <span style="color: #ff0000;">"fondo.jpg"</span> <span style="color: #000000;">)</span><br /> hDC := oWnd:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #000000;">bPainted</span> = <span style="color: #000000;">{</span> | hDC | PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oBmpFondo:<span style="color: #000000;">hBitMap</span>,, oWnd:<span style="color: #000000;">nWidth</span>, oWnd:<span style="color: #000000;">nHeight</span>,, .t.<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> SendMessage<span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">1</span>, oIcon:<span style="color: #000000;">hIcon</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> FILENAME <span style="color: #ff0000;">"printer.bmp"</span> <span style="color: #0000ff;">OF</span> oBar NOBORDER TOP <span style="color: #0000ff;">FONT</span> oFontBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Print"</span> GROUP ;<br /> TOOLTIP <span style="color: #ff0000;">"Selección de impresora"</span> <span style="color: #0000ff;">ACTION</span> PrinterSetup<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> FILENAME <span style="color: #ff0000;">"Exit.bmp"</span> <span style="color: #0000ff;">OF</span> oBar NOBORDER TOP <span style="color: #0000ff;">FONT</span> oFontBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> ;<br /> TOOLTIP <span style="color: #ff0000;">"Fin de la sesión"</span> <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd</div>[/code:22aau081]
La version 32 bits de la misma aplicación funciona sin problemas.
¿Que puedo hacer?
FWH64 abril de 2020 + BCC71 64 + Harbour 64 para BCC71 |
Cannot Load FreeImage64.dll | Jose Vicente, por qué no utilizas la clase TXImage y te quitas dependencias externas? |
Cannot Load FreeImage64.dll | Cristobal, he cambiado la clase y ahora no da errores, gracias <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
Cannot close Excel with WIN32OLE | Is there anybody who knows,
what i can do to close Excel ?
With the old TAutoOle : oExcel:End() it was ok.
Antonio told me : oExcel := NIL.
It is not working, because in the Filemanager
Excel is still visible and not closed.
Regards U.König <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Cannot close Excel with WIN32OLE | With Fivewin and xharbour, just comment your line oxls:end()
You dont need it anymore .
Good luck |
Cannot close Excel with WIN32OLE | I think what you want is
oExcel:quit()
oExcel := nil |
Cannot close Excel with WIN32OLE | [quote="Gale FORd":296dl8tu]I think what you want is
oExcel:quit()
oExcel := nil[/quote:296dl8tu]
The last is not needed.
EMG |
Cannot close Excel with WIN32OLE | I thought the same as you, but after helping someone with an Excel problem we found that Excel will still be running even though you cannot see it.
Running the task manager after doing the oExcel:quit() shows that Excel would still be resident until the variable was set to nil. |
Cannot close Excel with WIN32OLE | oExcel:Quit()
oExcel := NIL
works fine.
but it creates the worksheet in the background.
I tried to do nothing on the end.
It works also, but with the difference : Excel shows the sheet
and stays open.
I have to close excel with the button ( because I want to check the sheet )
A Test with the Taskmanager shows, that Excel is closed.
Thank you
U. König <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
Cannot close Excel with WIN32OLE | What if you try this way
oExcel:WorkBooks:Close()
oExcel:Quit()
Regards |
Cannot close Excel with WIN32OLE | [quote="Gale FORd":17b62dhs]I thought the same as you, but after helping someone with an Excel problem we found that Excel will still be running even though you cannot see it.
Running the task manager after doing the oExcel:quit() shows that Excel would still be resident until the variable was set to nil.[/quote:17b62dhs]
This is definitely not true. Please, show a sample to demonstrate the problem.
EMG |
Cannot close Excel with WIN32OLE | I did not believe it either. I will put something together tomorrow. |
Cannot close Excel with WIN32OLE | Ok, thank you. I'm pretty curious...
EMG |
Cannot close Excel with WIN32OLE | I went back and looked at my test prg's and I could not find the one in question so I created one. At first it worked like you said and what I thought originally. Then I got to thinking about how this problem came up. Then I recall that the problem showed up when the function was still running or the variable was a static.
[code:1azaghsh]
FUNCTION MAIN()
LOCAL lRunTest := .t.
LOCAL oExcel, oSheet
clear screen
do while lRunTest
@ 10, 0 say 'Run Excel Test ' get lRunTest picture 'y'
read
if lastkey() = 27
exit
endif
if lRunTest
@ 20, 0
// This does not work
// even though you tell excel to quit it is still
// running until variable gets reset.
oExcel = CREATEOBJECT( "Excel.Application" )
oExcel:quit()
@ 20, 0 say 'Ok now check with Task Manager'
wait
// Works if you run in function that releases variable
// or you release variable yourself
oExcel := nil
TestExcel()
@ 20, 0 clear
@ 20, 0 say 'Ok now check Task Manager again'
endif
enddo
RETURN( nil )
FUNCTION TestExcel()
LOCAL oExcel, oSheet
oExcel = CREATEOBJECT( "Excel.Application" )
oExcel:quit()
RETURN( nil )
[/code:1azaghsh] |
Cannot close Excel with WIN32OLE | I forgot to mention that when you check in the task manager, you have to look under the Processs tab. It is not in the Applications tab. |
Cannot close Excel with WIN32OLE | This is perfectly normal as the automatic destructor is called when the variable exits the scope. It's not a problem at all.
EMG |
Cannot close Excel with WIN32OLE | It was a problem for the person I was helping some time ago because he was using a prg wide static variable. The person in this thread mentioned that Excel was still running so without seeing how he was using the variable I wanted to make sure the variable lost the connection with Excel.
Have a great day. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
Cannot close Excel with WIN32OLE | Ok, understood.
EMG |
Cannot create Dialog Box | ON PROGRAM
[code:10p7tylw] DEFINE DIALOG oDlg RESOURCE "MAIN"
ACTIVATE DIALOG oDlg CENTER[/code:10p7tylw]
IT MAKE THIS ERROR
Path and name: C:\Work\PRG\img\Immagine.Exe (32 bits)
Size: 434,688 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 04/17/06, 00:39:02
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: MAIN
THE RESOURCE
[code:10p7tylw]
#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
#define DIALOG_1 1
MAIN DIALOG 13, 50, 770, 332
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CAPTION "PHOTO HUNT"
FONT 8, "MS Sans Serif"
{
CONTROL "TBitMap", 100, "TBitMap", 0 | WS_CHILD | WS_VISIBLE, 5, 7, 377, 314
CONTROL "TBitMap", 200, "TBitMap", 0 | WS_CHILD | WS_VISIBLE, 388, 7, 377, 314
}
[/code:10p7tylw]
WHY ? |
Cannot create Dialog Box | Because you need to redefine those two TBitmap controls that you have placed in the dialog. |
Cannot create Dialog Box | SORRY u ARE RIGHT |
Cannot create Dialog Box (fwh1201) not in fwh8.10 | Hello,
I am trying to convert a big aplication from fwh8.10 (XHB comercial) to FWH1201 (BCC) and am not able to run the aplication (see subject).
The error occurs in a dialog with multiple Folders.
Isolating the problem , i made a aplication wich only calls the dialog with a minimum of code (also in the rc-file) , it works
[code=fw:3ooibpgi]<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;">RESOURCE</span> <span style="color: #ff0000;">"InvKlantLev"</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Klant"</span> , <span style="color: #ff0000;">"Leverancier"</span> ;<br /> <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"KlntFld"</span> , <span style="color: #ff0000;">"LevFld"</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFldK <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Facturatie Adres"</span> , <span style="color: #ff0000;">"Extra gegevens klant"</span> , <span style="color: #ff0000;">"Postadres"</span> ;<br /> <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"KlntAdres"</span> , <span style="color: #ff0000;">"KlntLevKlnt"</span> , <span style="color: #ff0000;">"KlntPostAdres"</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFldL <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Adres Leverancier"</span> , <span style="color: #ff0000;">"Extra gegevens leverancier"</span> ;<br /> <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"LefAdres"</span> , <span style="color: #ff0000;">"KlntLevLev"</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /> </div>[/code:3ooibpgi]
Linking in this code in the main aplication (with the same rc-data) , gives a error on the dialog KlntPostAdres (as it did in the original full main program). Without this dialog
DIALOGS "KlntAdres" , "KlntLevKlnt" // , "KlntPostAdres"
the aplication works
I have no idea what else i can try. Why works this code in a litle program , not in the main aplication ?
If i can not solve this , conversion to fwh1201 is not possible !!!!!!!
Frank Demont |
Cannot create Dialog Box (fwh1201) not in fwh8.10 | Demont,
normally there is an unknown control in the .rc file.
Can you post that part of your resource file, where the error occurs ? |
Cannot create Dialog Box (fwh1201) not in fwh8.10 | Stefan,
Thanks for the reply , but it seems that there was some confusion about linking in the rc-file.
It is not clear what the problem was in the main program , there was no reason to not include the dialog.
I will try the rewrite the module
Frank |
Cannot create Dialog Box Error | Hi friends.
I have rondomly "Cannot create Dialog Box" message error one or two times a day.
What is the circunstancies when this error appear? I tryed to find anything wrong in my app but all seems fine.
Thanks for any hint.
Best regards,
Toninho. |
Cannot create Dialog Box Error | Hello toninhofwi
Please post error log and RC section with the problem, is better to help you |
Cannot create Dialog Box Error | Error from:
CREATEDLGERROR()
TDIALOG:ACTIVATE()
...
The two errors allways is the same above, but the rest change. As I sayd, it is randomly, and my resources is correct.
My question is: What can cause this error?
Thanks and best regards,
Toninho. |
Cannot create Dialog Box Error | Toninho,
What controls do you use in that dialogbox ? |
Cannot create Dialog Box Error | Hi Antonio.
Common controls like GET, SAY and TSBROWSE. I revised my RC file and all is correct.
Please see that error is *random* sometimes a simple DEFINE/ACTIVATE DIALOG with a message can display it.
My question is: what kind of problem can cause this error? I don't understand right this scenario. Is this a ms-windows or a fwh limitation/issue ?
Thank you and best regards,
Toninho. |
Cannot create Dialog Box Error | Toninho,
Do you keep your resources inside your EXE or inside an external DLL ? |
Cannot create Dialog Box Error | Antonio, my resources is INSIDE my EXE.
Regards,
Toninho. |
Cannot create Dialog Box Error | Toninho,
El EXE está en el ordenador local ó se carga desde un servidor ?
A veces pueden aparecer errores asi al no poderse cargar bien el EXE desde el servidor, pues Windows no carga todo el EXE sino partes de él, y al ir a acceder a una parte puede no poder acceder a él por problemas de lectura en la red. |
Cannot create Dialog Box Error | Hi Antonio.
Thanks for this useful info. Maybe you are right, because I have a lot of apps like this installed and only in one client this problem occur.
Regards,
Toninho. |
Cannot create Dialog Box Error | We have encountered this when the dialog TITLE is too long............. |
Cannot create Dialog Box con Resource Workshop | <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Hola, de nuevo aqui molestando a todos ustedes..
Estoy empezando con los 32 bits y tengo problemas al mostrar una dialogo en el cual pido contraseña para entrar, ya estuve investigando en la red y supe que los controles de borland no son para 32 bits por los cual ya quite el unico que tenia, pero sigo sin poder mostrar el dialogo poruqe marca error:
Application
===========
Path and name: C:\SISA2007\SISA2007.Exe (32 bits)
Size: 2,083,840 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 18/05/2007, 18:26:41
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: Acceso
Stack Calls
===========
Called from: => CREATEDLGERROR(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: => LGETPASSWORD(222)
Called from: sisa2007.prg => MAIN(40)
este el el código que uso:
STATIC FUNCTION lGetPassword()
LOCAL oDlg,oBmp,oCbx,oGet,oBtn1,oBtn2,oBit,oIco,oBmpx,oFnt,oCur
LOCAL lSalir := .F.
LOCAL nTries := 0
LOCAL tPassword := SPACE (15)
LOCAL hDC := oDlg
DEFINE CURSOR oCur RESOURCE "Mano"
DEFINE FONT oFnt NAME "Arial" WEIGHT 8
DEFINE DIALOG oDlg RESOURCE "Acceso" TITLE "Control de Acceso al Sistema" FONT oFnt
REDEFINE BITMAP oBmp ID 052 FILENAME ".\SUPPORT\ENGINE\IMAGHAND.SUP" OF oDlg
REDEFINE BITMAP oBmpx ID 600 FILENAME ".\SUPPORT\ENGINE\IMAINTRO.SUP" OF oDlg Adjust
REDEFINE COMBOBOX oCbx VAR nItem ID 101 Of oDlg UPDATE ITEMS oApp:cUsuario STYLE CBS_DROPDOWN
REDEFINE GET oGet VAR tPassword ID 102 OF oDlg PICTURE "@!"
REDEFINE BUTTON oBtn1 ID 400 OF oDlg ACTION (lSalir:=.T. , nTries++ , ;
lSi := ALLTRIM( tPassword ) == ALLTRIM( oApp:cPassword[nItem] ), ;
IF( nTries > 3 .OR. lSi , oDlg:END(), ;
( MsgStop( "¿ OLVIDO SU CONTRASEÑA..?"+CRLF+CRLF+;
"Haga click en el botón < RECORDAR > para ver "+CRLF+;
"su recordatorio según el Nombre de Usuario... ", "¡ Acceso Denegado !" ), lSalir:=.F., oGet:SetFocus(.T.) ) ) )
REDEFINE BUTTON oBtn2 ID 415 OF oDlg ACTION (lSalir:=.T., oDlg:END())
REDEFINE BTNBMP oBit ID 104 OF oDlg RESOURCE "RECORDAR" ACTION ( MsgInfo("Palabra o frase para Recordar su Clave de Acceso: "+CRLF+CRLF+ ALLTRIM( oApp:cRecordar[nItem] ),"Recordar Clave se Acceso"), oGet:SetFocus(.T.) )
oDlg:lHelpIcon := .F.
oBit:cToolTip := "Recordar"+CRLF+"Contaseña"
oBmp:lTransparent := .T.
oBtn1:oCursor := oCur
oBtn2:oCursor := oCur
oBit:oCursor := oCur
ACTIVATE DIALOG oDlg CENTERED VALID (lSalir) ON INIT( SetWindowPos( oDlg:hWnd, -1, 0, 0, 0, 0, 3 ) )
oFnt:END()
oBmp:END()
oBmpX:END()
oCur:END()
RETURN (lSi)
el díalogo estaba en una dll de 16 bits y la tengo en un rc para incrustarlo en el exe.
este es el rc del dialogo
ACCESO DIALOG 241, 76, 174, 253
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_CAPTION
FONT 8, "MS Sans Serif"
{
COMBOBOX 101, 85, 177, 79, 76, CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
EDITTEXT 102, 85, 195, 78, 12, ES_UPPERCASE | ES_PASSWORD | WS_BORDER | WS_TABSTOP
CONTROL "Button", 400, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 18, 225, 51, 17
CONTROL "TBtnBmp", 104, "TBtnBmp", WS_CHILD | WS_VISIBLE | WS_BORDER, 131, 222, 25, 23
LTEXT "Usuario:", 29, 58, 180, 26, 8, SS_NOPREFIX | WS_GROUP
LTEXT "Contraseña:", 30, 46, 196, 38, 8
CONTROL "TBitmap", 52, "TBitmap", WS_CHILD | WS_VISIBLE, 11, 169, 34, 44
CONTROL "Button", 415, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE, 75, 225, 51, 17
CONTROL "TBitMap", 600, "TBitMap", WS_CHILD | WS_VISIBLE | WS_BORDER, 17, 15, 140, 148
}
No se si es recomendable usar el Resource Workshop pra trabajar con rc, ayer baje el Pelles C pero no entiendo ni "j" es algo confunso y en ocaciones te muestra el rc con texto codificado y a veces los recursos incrustados, porfa <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> digamne <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> con que editor de recursos podría trabajar..? <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
Cannot create Dialog Box con Resource Workshop | Cuate,, este es mis msg. <!-- e --><a href="mailto:ccc_3_ccc@hotmail.com">ccc_3_ccc@hotmail.com</a><!-- e -->
yo te puedo apoyar,
yo usaba worshop,
pero lo cambie ya por pelles C
por la simple razon de que pelles C es un sistema a 32 bits
y workshop 16 bits.
saludos.. |
Cannot create Dialog Box con Resource Workshop | [quote="sysctrl2":p4hqg9ed]Cuate,, este es mis msg. <!-- e --><a href="mailto:ccc_3_ccc@hotmail.com">ccc_3_ccc@hotmail.com</a><!-- e -->
yo te puedo apoyar,
yo usaba worshop,
pero lo cambie ya por pelles C
por la simple razon de que pelles C es un sistema a 32 bits
y workshop 16 bits.
saludos..[/quote:p4hqg9ed]
El workshop es a 16 bits, pero t genera recursos a 32 bits de igual manera que PellesC.
Creo que es cuestión de gustos. |
Cannot create Dialog Box con Resource Workshop | <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Gracias a los dos por haberme contestado, por suerte estuve revisando y compilando ejemplos de la carpeta samples y ahi encontre la respuesta:
habia que cambiar en el RC la líne que hacia referencia a los bitmaps:
CONTROL "TBitmap", 100, "TBitmap", 0 | WS_CHILD | WS_VISIBLE, 11, 9, 92, 87
por esto:
CONTROL "", 100, "TBitmap", WS_CHILD | WS_VISIBLE, 7, 8, 106, 120
Y esto poruqe el control Bitmap es de Borland <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> y no es para 32bits. <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: -->
<!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> Las cosas que hay que aprender para migrar, pero vale la pena interntar de todo, no lo creen..? <!-- s:arrow: --><img src="{SMILIES_PATH}/icon_arrow.gif" alt=":arrow:" title="Arrow" /><!-- s:arrow: -->
Saludos desde Chiapas, México |
Cannot create dialog box | Hi!
I have a lot of pain of "fivewin/3 error" and I stay without it since I used Borland resources in FW/Clipper. But this time I couldn't run <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> as follow:
I have a strange problem with a modal dialog using TxBrowse control.
I included a new dialog in my RC file and a dialog stop to open. The resource dialog name is "SELECIONA" and have a combobox, a get, a TxBrowse, OK and Cancel buttons.
I duplicate "SELECIONA" to "SELEC_PRINC" dialog (in same RC file), changed into my PRG and recompiled. I didn't changes into dialog, I only duplicated. It worked fine. Then I deleted SELECIONA (because SELEC_PRINC worked) and SELEC_PRINC stop to work!!!
I use FWH 2.7 March with xHB Builder March and I don't use any Borland style resource.
Any idea to solve or debug were is the problem?
Thanks a lot!
Maurilio |
Cannot create dialog box | Maurilio,
Please open the EXE with the resources workshop and check that the resources are properly placed inside. |
Cannot create dialog box | Antonio,
Yes, the resource is inside exe correctly.
When I add a dialog to resources it fail, if I add a blank dialog named SEL* (SEL_TEMP, SEL_XXX, etc) it work.
In all times when the dialog open OK and when occur Fivewin/3 error I checked and the dialog is inside exe. And I change nothing in code or dialog, only add or delete an empty dialog as I said...
I couldn't isolate the problem into a self contained prg <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Best regards,
Maurilio |
Cannot create dialog box | Maurilio,
We have found on some ocasions that the dialog name is not fine for Windows. Try to change it to a different name. |
Cannot create dialog box | Antonio,
I'll change the name and do any tests.
Any news I post here.
Thanks!
Maurilio |
Cannot create dialog box | Antonio,
I renamed the resource and don't worked <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
If I add or delete a resource into rc file it work fine.
To avoid app exiting I place 'activate dialog' inside a try/end...
Do you have any naming rule that I can follow to avoid this type of error?
Regards,
Maurilio |
Cannot create dialog box | [quote="Maurilio Viana":39ae0dj2]Antonio,
I renamed the resource and don't worked <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
If I add or delete a resource into rc file it work fine.
To avoid app exiting I place 'activate dialog' inside a try/end...
Do you have any naming rule that I can follow to avoid this type of error?
Regards,
Maurilio[/quote:39ae0dj2]
Hi Maurilio,
The subject issue is a pain in the butt indeed.
I have come into a serious straggling with FWH, dealing with the Error 3, cannot create dialog box, and here is how I finally managed to get it going...
1. The name of the resource, even if correct, does not always work,
although with Workshop there is no error.
2. The more important thing is to define these in the beginning of your MAIN prg file, because most of the time, dialogs cannot be created because their respective controls have not been registered. For example, if you use a TWBROWSE control in a dialog, it is almost sure that it will not work, unless you define each control:
Here's a copy of what I register in my main prg. Just below the local, private functions:
TWindow():Register()
TWBrowse():Register()
TBitmap():Register()
TFolder():Register()
TTabs():Register()
TDialog():Register()
TMeter():Register()
TMetafile():Register()
TComboBox():Register()
More about the resource name...
Unfortunatelly, there is no rule that I have come up with...
It seems that Windows does not "like" some names, although there is nothing wrong with the names, and most important, they worked fine in the 16-bit environment....
So, if a dialog I use (from resource, in the stand-alone exe file), does not work, the next thing I do is to add the letter "Z", or "Q" or something like that infront of the resource's name, and retry running the program.
Important: The same thing (with names) happens with other kinds of resource, especially with the bitmaps... Another pain in the butt...
You can try the same approach described above (add an extra character infront of the resource's name.
I hope that this helped you...
Kind regards
Evans |
Cannot create dialog box | Evans,
Thanks for your words.
The only different thing into these my "deffective resource" is a txbrowse control.
Based on what you said I must do in my main program:
TxBrowse():Register()
Is this right?
Regards
Maurilio |
Cannot create dialog box | [quote="Maurilio Viana":39leaje5]Evans,
Thanks for your words.
The only different thing into these my "deffective resource" is a txbrowse control.
Based on what you said I must do in my main program:
TxBrowse():Register()
Is this right?
Regards
Maurilio[/quote:39leaje5]
More or less YES.
I don't use TXBROWSE, however, you can try it, and in most cases you will have no problems with your dialogs using this control.
Kind regards
Evans |
Cannot create dialog box... | Converting my first FW project to FWH.
My dialogs were originally created with Borland Workshop 4.5. I’ve converted them using both the Pelles C and Microsoft Visual Studio tools, first into an RES file which I linked directly to the EXE. When that didn’t work I created a DLL in the same manner I used with the original FW version of the program. No matter what tools or techniques I use, the dialog resources will not load, “cannot create dialog…” All other resources, bitmaps and string tables, seem to have converted just fine. Only dialog boxes are giving me trouble.
Below is the RC text of one of the non-loading dialogs.
DLG_REINDEX DIALOG LOADONCALL MOVEABLE DISCARDABLE 52, 75, 205, 129
STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_CAPTION
CLASS "BorDlg"
CAPTION "Reindex Data Files"
FONT 6, "MS Sans Serif"
{
CONTROL "", 101, "BorShade", 1 | WS_CHILD | WS_VISIBLE, 10, 5, 180, 47
CTEXT "Process...", 2051, 16, 40, 168, 8
CONTROL "Text", 2052, "STATIC", SS_WHITERECT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP, 16, 25, 168, 14
CTEXT "Data File", 2050, 17, 12, 164, 8
CONTROL "Remove Records Marked for Deletion", 102, "BorCheck", 3 | WS_CHILD | WS_VISIBLE, 35, 62, 135, 10
CONTROL "Go", 1, "BorBtn", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 58, 96, 37, 25
CONTROL "Cancel", 2, "BorBtn", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 96, 37, 25
CONTROL "Resolve Orphan Claims", 103, "BorCheck", 3 | WS_CHILD | WS_VISIBLE, 35, 79, 95, 10
}
This is a dump from the run-time error log.
<=########################## START #################################=>
Application
===========
Path and name: E:\ABA\ABA_4\abawin.exe (32 bits)
Size: 1,363,968 bytes
Time from start: 0 hours 0 mins 19 secs
Error occurred at: 08/20/2010, 11:34:56
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: DLG_Reindex
Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: ABAIndex.prg => REINDEX(32)
Called from: abawin.prg => (b)BUILDMENU(295)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TMDIFRAME:ACTIVATE(0)
Called from: abawin.prg => START(71)
System
======
CPU type: Intel(R) Pentium(R) 4 CPU 1.60GHz 1600 Mhz
Hardware memory: 1536 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: Harbour Alpha build 46.2 Intl. (Flex)
Windows version: 5.1, Build 2600 Service Pack 3
Windows total applications running: 29
1 TF_FloatingLangBar_WndTitle
2 CiceroUIWndFrame
3
4 M
5 Default IME
6 ZoneAlarm Security Alert
7 ZoneAlarm Security Suite
8 AutoVPNAlertDlg
9 Accident Benefit Association (V100330-001)
10 MS-DOS Prompt
11 DDE Server Window
12 WOWExec
13 MCI command handling window
14 ISWHotKeyWindowClass_209b0000
15 Tukan
16 MMTrayNotificationWnd
17 AcrobatTrayIcon
18 MediaCenter
19 HPWU
20 Windows Defender
21 DMXLauncher
22 QTPlayer Tray Icon
23 Connections Tray
24 Power Meter
25 MS_WebcheckMonitor
26 NVSVCPMMWindowClass
27 GDI+ Window
28 Multi-Edit - [ABA.mak]
29 Program Manager
Variables in use
================
Procedure Type Value
==========================
CREATEDLGERROR
Param 1: O Class: TDIALOG
Local 1: C "DLG_Reindex"
Local 2: C " "
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: L .F.
Local 1: O Class: TDIALOG
Local 2: N 1769690
Local 3: U
Local 4: U
REINDEX
Local 1: O Class: TDIALOG
Local 2: N 0
(b)BUILDMENU
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 20019
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20019
Param 2: N 0
Local 1: O Class: TMDIFRAME
Local 2: N 0
Local 3: N 20019
Local 4: N 0
TMDIFRAME:COMMAND
Param 1: N 20019
Param 2: N 0
Local 1: O Class: TMDIFRAME
Local 2: L .F.
TMDIFRAME:HANDLEEVENT
Param 1: N 273
Param 2: N 20019
Param 3: N 0
_FWH
Param 1: N 0
Param 2: N 273
Param 3: N 20019
Param 4: N 0
Param 5: N 1
Local 1: O Class: TMDIFRAME
WINRUN
Param 1: N 1769690
TMDIFRAME:ACTIVATE
Param 1: C "NORMAL"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Local 1: O Class: TMDIFRAME
Local 2: U
Local 3: U
START
Local 1: C "USER"
Local 2: C ""
Local 3: C ""
Local 4: C ""
Local 5: O Class: TBRUSH
Local 6: O Class: TICON
Local 7: C "BORLAND"
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
Classes in use:
===============
1 HBCLASS
2 HBOBJECT
3 TWINDOW
4 TCONTROL
5 TICON
6 TBRUSH
7 TMDIFRAME
8 TMENU
9 TMENUITEM
10 TMDICLIENT
11 TFONT
12 TMSGBAR
13 TRECT
14 TMSGITEM
15 TTIMER
16 TDIALOG
17 TSAY
18 TGET
19 GET
20 TCLIPGET
21 TBUTTON
22 TCHECKBOX
23 TMETER
24 ERROR
25 TREG32
Memory Analysis
===============
309 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
<=########################### End ##################################=> |
Cannot create dialog box... | Don, I see you use Borland controls.
BorCheck
Do you have
local hBorland := LoadLibrary( "BWCC32.dll" )
BWCCRegister(GetResources())
DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL" ?
Best regards,
Otto |
Cannot create dialog box... | Thank you, Otto.
I had only "local hBorland := LoadLibrary( "BWCC32.dll" )" . I've added the other 2 lines as you suggested, but my problem remains.
My BWCC32.dll is version 2.4.0.2 dated 3 April 2002. Does that seem to you to be the correct verson?
Don |
Cannot create dialog box... | try creating RC files and linking those to the exe. Actually Borland will create the rc files which can be linked. I have many many rc file from borland and functioning well. |
Cannot create dialog box... | Don,
This is just a guess, but the Borland controls in the DLL are 16bit controls. It is possible (perhaps, probable) that you cannot use 16bit controls in a 32bit application.
I had so many problems with Borland controls that I dropped them all long before I even converted to 32bit.
I would make a backup of the DLL and remove all the borland controls from one of the dialogs and see if that solves the problem.
Also, did you convert your 16bit RC's to 32bit? If you don't know how to do this, just ask.
Regards,
James |
Cannot create dialog box... | Don
I suggest you use rc files, this is the best reliable solution
I use Pelles c in replacement of Borland work shop and it is working quite well
I guess you certainely need to remove CLASS "BorDlg"
remove it from your rc file it is not needed , you can just edit it with notepad
HTH
Richard |
Cannot create dialog box... | My problem has been solved!
Thanks to Otto's suggestion, and a little more study I was finally able to get my resources to work.
Thank you to everyone, especially Otto, for your advice.
Don |
Cannot turn off Bell at end of buffer entry in gets. | The command:
SET BELL OFF
is supposed to turn off the bell (sound in Windows) when at the end of entry in a get buffer. Whether SET BELL is OFF or ON I get the same result. Is this controlled in FW++ by the SET BELL command or is there another way to turn off the bell on beffer end? I want to turn off the bell at buffer end, but I can't.
The command:
SET CONFIRM ON works correctly in stopping at the end of buffer entry and not going to the next get. This is as expected.
Dan |
Cannot turn off Bell at end of buffer entry in gets. | Dan,
Fixed. These lines were missing from Class TGet:
[code:1dlz0n46]
if ::oGet:TypeOut
if ! Set( _SET_CONFIRM )
::oWnd:nLastKey = VK_RETURN
::oWnd:GoNextCtrl( ::hWnd )
else
if Set( _SET_BELL ) <<< New!
MsgBeep()
endif <<< New!
endif
endif
[/code:1dlz0n46]
Please email us privately to get an updated FW++ DLL and lib. |
Cannot turn off Bell at end of buffer entry in gets. | Hello Antonio,
Works just fine.
Thanks
Dan |
Cannot turn off Bell at end of buffer entry in gets. | gald to know it is ok <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
Cannot use cGetFile32 in some secure networks | Because of the way cGetFile32 uses ini file in the windows directory to communicate with rundlg32 I cannot use this function.
Some administrators limit the users access rights to the windows directory.
Is there a way to use an ini in a different directory or use the registry instead? |
Cannot use cGetFile32 in some secure networks | It seems that you are using the Clipper/FW version as the xHarbour/FWH one doesn't use rundlg32.dll at all.
EMG |
Cannot use cGetFile32 in some secure networks | I am not sure about that.
My source file is c:\fwh\source\function\dlgs32.prg
The function cGetFile32() uses
nRet := WinExec( "rundlg32 " + If( lSave, "2", "1" ) )
if nRet > 21 .or. nRet < 0
StopUntil( {|| GetPvProfString( cSection, "working", "0", INIFILE ) != "1" } )
/*while GetPvProfString( cSection, "working", "0", INIFILE ) == "1"
SysRefresh()
end*/
cFile := GetPvProfString( cSection, "lpstrFile", "", INIFILE )
nFilterIndex := Val( GetPvProfString( cSection, "nFilterIndex", "", INIFILE ) )
else
cFile := cGetFile( cFileMask, cTitle, nDefaultMask, cInitDir, lSave,, nFlags )
endif |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.