anybody,
what's wrong in the code below?
#include "FiveWin.ch"
#include "colors.ch"
//----------------------------------------------------------------------------//
function Main()
STATIC isOn := .F.
STATIC oDlgWt, nWidth, oFont14
Local oMsg, nHeight, nMsgWidth, nDlgWidth
DEFAULT cCaption := "Please wait..."
DEFINE FONT oFont14 NAME "Arial" SIZE 6,-12 ITALIC
cCaption := Alltrim(cCaption)
DEFINE DIALOG oDlgWt ;
FROM 0,0 TO 3, Len( cCaption ) + 4 ;
STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
FONT oFont14 COLOR CLR_YELLOW, CLR_BLUE
oDlgWt:cMsg := cCaption
nWidth := (oDlgWt:nRight - oDlgWt:nLeft)
nHeight := oDlgWt:nHeight
@ 15, 30 SAY oMsg VAR cCaption OF oDlgWt PIXEL font oFont14 ;
COLOR CLR_YELLOW, CLR_BLUE size nWidth-25, 16
ACTIVATE DIALOG oDlgWt CENTERED NOWAIT ;
ON INIT (isOn := .T., ;
oMsg:Move(15, 30), ;
nMsgWidth := GetTextWidth(oDlgWt, cCaption, oFont14), ;
nDlgWidth := (30 + nMsgWidth + 30), ;
oDlgWt:SetSize( nDlgWidth, nHeight ) )
return nil
//----------------------------------------------------------------------------//
function FWOpenPngFile() ; return 0
----
compiled with xHarbour 2009/FWH1304 with libs
mem32.lib
send32.lib
oledlg.lib
EXE is built but crash at runtime.
thanks for any help.
Toyet
app crash FWH 13.04
Re: app crash FWH 13.04
toyet wrote:anybody,
what's wrong in the code below?
#include "FiveWin.ch"
#include "colors.ch"
//----------------------------------------------------------------------------//
function Main()
STATIC isOn := .F.
STATIC oDlgWt, nWidth, oFont14
Local oMsg, nHeight, nMsgWidth, nDlgWidth
DEFAULT cCaption := "Please wait..."
DEFINE FONT oFont14 NAME "Arial" SIZE 6,-12 ITALIC
cCaption := Alltrim(cCaption)
DEFINE DIALOG oDlgWt ;
FROM 0,0 TO 3, Len( cCaption ) + 4 ;
STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
FONT oFont14 COLOR CLR_YELLOW, CLR_BLUE
oDlgWt:cMsg := cCaption
nWidth := (oDlgWt:nRight - oDlgWt:nLeft)
nHeight := oDlgWt:nHeight
@ 15, 30 SAY oMsg VAR cCaption OF oDlgWt PIXEL font oFont14 ;
COLOR CLR_YELLOW, CLR_BLUE size nWidth-25, 16
ACTIVATE DIALOG oDlgWt CENTERED NOWAIT ;
ON INIT (isOn := .T., ;
oMsg:Move(15, 30), ;
nMsgWidth := GetTextWidth(oDlgWt, cCaption, oFont14), ;
nDlgWidth := (30 + nMsgWidth + 30), ;
oDlgWt:SetSize( nDlgWidth, nHeight ) )
return nil
//----------------------------------------------------------------------------//
function FWOpenPngFile() ; return 0
----
compiled with xHarbour 2009/FWH1304 with libs
mem32.lib
send32.lib
oledlg.lib
EXE is built but crash at runtime.
thanks for any help.
Toyet
Try
Code: Select all | Expand
STATIC isOn := .F.
STATIC oDlgWt, nWidth, oFont14
function Main()
// DEFAULT cCaption := "Please wait..." ---> non defined
Local cCaption := "Please wait..."
Without seeing the file that generates the error is very difficult
Regards
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces