Pregunta sobre RichEdit

Pregunta sobre RichEdit

Postby ruben Dario » Thu Mar 15, 2012 9:18 pm

Saludos al Forum
Pregunta sobre RichEdit...

Tengo el suguiente Codigo , al ejecutar me carga el documento , y en dicho documento tengo unos Link, para accesar el navegador o enviar un correo. El Problema es que al darle Click genera un error en el Ejecutable. Es un memnsaje de Windows ..FOLDER.Exe ha detectado un problema y debe cerrarse.

Alguien le ha pasado esto o como lo soluciono.

Aqui easta todo el ejemplo para poder reproducir el error.


[url]
http://www.4shared.com/zip/0WgmoHwa/file.html
[/url]
Code: Select all  Expand view


#include "fivewin.ch"
#include "RichEdit.ch"


function Main()

   local oDlg, oFld, oGet, oRich, oRich1, oRich2, oBtn

   local lSyntaxHL := .f.

   local hDLL := LoadLibrary( "Riched20.dll" )

   DEFINE DIALOG oDlg RESOURCE "DIALOGO";
    TITLE "FiveWin Dynamic folders" ;
     
   REDEFINE  FOLDER oFld ID 4001 PROMPT "Fold1","Fold2","fold3" OF oDlg;
   DIALOGS "Fold1","fold2","fold3"
     
   oRich = TRichEdit():Redefine( 4001, { || "" }, oFld:aDialogs[1] )
   oRich:lHighLight = .f.
   oRich:LoadFromRTFFile( "GRACIAS.RTF" )

   oRich1 = TRichEdit():Redefine( 4002, { || "" }, oFld:aDialogs[2] )
   oRich1:lHighLight = .f.
   oRich1:LoadFromRTFFile( "GRACIAS.RTF" )

   oRich2 = TRichEdit():Redefine( 4003, { || "" }, oFld:aDialogs[3] )
   oRich2:lHighLight = .f.
   oRich2:LoadFromRTFFile( "GRACIAS.RTF" )

 

   Redefine  BUTTON oBtn ID 4004 OF oDlg ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED  //;
  //    ON INIT oRich:AutoURLDetect( .t. )
   FreeLibrary( hDLL )


 
 
return nil

procedure AppSys // Xbase++ requirement

return

 


Code: Select all  Expand view

// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.00".

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

DIALOGO DIALOGEX DISCARDABLE 6, 18, 266, 266
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 0, 0, 1
{
  CONTROL "", 4001, "SysTabControl32", TCS_MULTILINE, 4, 4, 260, 228
  CONTROL " ", 4004, "Button", WS_TABSTOP, 108, 240, 50, 14
}

FOLD1 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg", 0, 0, 1
{
  CONTROL "Rich-edit", 4001, "RichEdit20W", ES_MULTILINE|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}

FOLD2 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg", 0, 0, 1
{
  CONTROL "Rich-edit", 4002, "RichEdit20W", ES_MULTILINE|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}

FOLD3 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg", 0, 0, 1
{
  CONTROL "Rich-edit", 4003, "RichEdit20W", WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}



 
Last edited by ruben Dario on Mon Mar 26, 2012 6:38 pm, edited 1 time in total.
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
User avatar
ruben Dario
 
Posts: 1061
Joined: Thu Sep 27, 2007 3:47 pm
Location: Colombia

Re: Pregunta sobre RichEdit

Postby jll-fwh » Sun Mar 25, 2012 12:17 am

Hola ruben:

Ya has solucionado el problema?

Un saludo
JLL
Libreria: FWH/FWH1109 + Harbour 5.8.2 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA, OURXDBU
S.O: XP / Win 7 /Win10
Blog: http://javierlloris.blogspot.com.es/
e-mail: javierllorisprogramador@gmail.com
User avatar
jll-fwh
 
Posts: 408
Joined: Fri Jan 29, 2010 8:14 pm
Location: Meliana - Valencia

Re: Pregunta sobre RichEdit

Postby Antonio Linares » Sun Mar 25, 2012 10:22 am

Ruben,

Puedes proporcionar gracias.rtf ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Pregunta sobre RichEdit

Postby ruben Dario » Sun Mar 25, 2012 6:52 pm

En el link que coloqe esta el codigo el recurso y el arcuhivo rtf.
[url]
http://www.4shared.com/zip/0WgmoHwa/file.html
[/url]
Gracias por responder.

Coloque de nuevo el link , porque estaba corrupto
Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
User avatar
ruben Dario
 
Posts: 1061
Joined: Thu Sep 27, 2007 3:47 pm
Location: Colombia

Re: Pregunta sobre RichEdit

Postby jll-fwh » Mon Mar 26, 2012 9:55 pm

Hola Ruben:

No deja descargar los archivos ruben, no puedes colocarlos en algún otro sitio FTP gratuito?, por tanto, no puedo probar tu RTF.

Envíame el RTF a mi email y te lo pruebo: jllorispersonal@ono.com

¿ Que version de FWH usas ?

Como intuye el maestro antonio, posiblemente sea el fichero RTF, ya que yo tengo implementado un gestor de correo que en la creación de los correos estoy usando TRichEdit y yo no tengo ese tipo de problemas.

El gestor de correo lo empece hace unos meses, no esta terminado todavía porque todos estos meses no he estado programando en FWH, cuando lo finalice subíre los fuentes al Blog, pero como te comento a mi no me da ningún tipo de errores.

En mi caso, yo declaro así: ( aunque el problema no lo tienes aquí )

Code: Select all  Expand view
         @ 200,0  RICHEDIT oRTF VAR cRTF OF oWnd PIXEL;
                  FILE "TmpRTF.RTF"

                  oRTF:lReadOnly := .f.
 


Adjunto unas imagenes.

Image

Al ejecutar por ejemplo el link del blog muestra el IE sin errores.

Image

Un saludo
JLL
Libreria: FWH/FWH1109 + Harbour 5.8.2 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA, OURXDBU
S.O: XP / Win 7 /Win10
Blog: http://javierlloris.blogspot.com.es/
e-mail: javierllorisprogramador@gmail.com
User avatar
jll-fwh
 
Posts: 408
Joined: Fri Jan 29, 2010 8:14 pm
Location: Meliana - Valencia

Re: Pregunta sobre RichEdit

Postby Antonio Linares » Tue Mar 27, 2012 6:35 am

Ruben,

Tenias unos pequeños errores en el fichero RC. Usa este y verás como funciona bien :-)

Code: Select all  Expand view
#include <windows.h>
#include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

DIALOGO DIALOGEX DISCARDABLE 6, 18, 266, 266
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "MS Shell Dlg"
{
  CONTROL "", 4001, "SysTabControl32", TCS_MULTILINE, 4, 4, 260, 228
  CONTROL " ", 4004, "Button", WS_TABSTOP, 108, 240, 50, 14
}

FOLD1 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg"
{
  CONTROL "", 4001, "RichEdit20A", ES_MULTILINE|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}

FOLD2 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg"
{
  CONTROL "", 4002, "RichEdit20A", ES_MULTILINE|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}

FOLD3 DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_CHILD|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_SYSMENU|WS_VISIBLE
FONT 8, "MS Shell Dlg"
{
  CONTROL "", 4003, "RichEdit20A", WS_BORDER|WS_TABSTOP, 0, 0, 208, 140
}
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests