app crash FWH 13.04

app crash FWH 13.04

Postby toyet » Mon Jul 08, 2013 8:32 pm

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
toyet
 
Posts: 39
Joined: Thu Apr 05, 2007 12:52 am
Location: Philippines

Re: app crash FWH 13.04

Postby cnavarro » Mon Jul 08, 2013 8:49 pm

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 view


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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 106 guests