app crash FWH 13.04

Post Reply
User avatar
toyet
Posts: 39
Joined: Thu Apr 05, 2007 12:52 am
Location: Philippines

app crash FWH 13.04

Post by toyet »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: app crash FWH 13.04

Post by cnavarro »

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


     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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Post Reply