Fivewin/3 error

Fivewin/3 error

Postby kronos911 » Sun Mar 26, 2006 1:52 pm

Ok I’ve encountered a little problem. While trying to run my app I get Fivewin error/3 Can not create dialog.
The strange part of this error is when I have workshop running with the DLL loaded and run the app ther is no error. When I close workshop the error is there again.

Code: Select all  Expand view  RUN
#include "FIVEWIN.CH"
#INCLUDE "FOLDER2.CH" // tfolder addition from www.fivewin.info
#include "DBCOMBO.CH"
#include "SIXCDX2.CH"

PROCEDURE Main()
  LOCAL oFolderICO,;
        oBrush

  SetVarsUp()
  Settings()
  SET 3DLOOK ON
  SET MULTIPLE OFF
  SetWin95Look(.T.)
  RDDSETDEFAULT("SIXCDX")
  Sx_SetMemoBlock(16)

  IF !FILE(".\MONEY1.DLL")
    MSGStop("DLL .\money1.dll not found", "Exiting program")
    QUIT
  ENDIF
   

  SET RESOURCES TO "MONEY1.DLL"
  USE .\KLIMAKDE.DBF VIA "SIXCDX" ALIAS KLIMAKIA
  FillArrs()

  DEFINE DIALOG oMainWin NAME "MAIN_WIN1" FONT oMainFont COLOR CLR_YELLOW, CLR_BLACK

    REDEFINE SAY ID 101 OF oMainWin COLOR CLR_YELLOW, CLR_BLACK
    REDEFINE SAY ID 103 OF oMainWin COLOR CLR_YELLOW, CLR_BLACK

    REDEFINE DBCOMBO aDBCData[1,1] VAR aDBCData[1,2] ID 102 OF oMainWin COLOR CLR_YELLOW, CLR_BLACK;
     LIST aKlimak1 ITEMS aKlimak2
    REDEFINE DBCOMBO aDBCData[2,1] VAR aDBCData[2,2] ID 104 OF oMainWin COLOR CLR_YELLOW, CLR_BLACK;
     LIST aKratis1 ITEMS aKratis2

// tfolder addition from www.fivewin.info
    REDEFINE FOLDER oFld1 ID 105 OF oMainWin ITEMS "FULL PRG", "AMEA PRG";
     PAGES "PAGE_WIN", "PAGE_WIN";
     COLOR CLR_YELLOW, CLR_BLACK;
     TABCOLOR CLR_YELLOW;
     FOCUSCOLOR CLR_WHITE;

    oFld1:SetFont(oMainFont1)

    MkPg1()
    MkPg2()

    REDEFINE BUTTON ID 106 OF oMainWin ACTION oMainWin:End()
    REDEFINE BUTTON ID 107 OF oMainWin ACTION ShowPinak2()

  ACTIVATE DIALOG oMainWin CENTER

RETURN

STATIC PROCEDURE MkPg1()

  REDEFINE PAGES oPages1 ID 101 OF oFld1:aDialogs[ 1 ];
   DIALOGS "SMALL_PRG1", "SMALL_PRG2", "SMALL_PRG3", "SMALL_PRG4"

  oPages1:SetColor(CLR_YELLOW, CLR_BLACK)
  oPages1:aDialogs[ 1 ]:SetColor(CLR_YELLOW, CLR_BLACK)
  oPages1:aDialogs[ 2 ]:SetColor(CLR_YELLOW, CLR_BLACK)
  oPages1:aDialogs[ 3 ]:SetColor(CLR_YELLOW, CLR_BLACK)
  oPages1:aDialogs[ 4 ]:SetColor(CLR_YELLOW, CLR_BLACK)

  oPages1:aDialogs[ 1 ]:SetFont(oMainFont)
  oPages1:aDialogs[ 2 ]:SetFont(oMainFont)
  oPages1:aDialogs[ 3 ]:SetFont(oMainFont)
  oPages1:aDialogs[ 4 ]:SetFont(oMainFont)

  REDEFINE SAY ID 101 OF oPages1:aDialogs[ 1 ] COLOR CLR_YELLOW, CLR_BLACK
  REDEFINE GET aSmallPrg[1,1] VAR aSmallPrg[1,2] ID 102 OF oPages1:aDialogs[ 1 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 103 NAME "ADD_DAY" OF oPages1:aDialogs[ 1 ]    ACTION (aSmallPrg[1,2] ++, aSmallPrg[1,1]:Refresh())
  REDEFINE BTNBMP ID 104 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 1 ] ACTION (IIF(aSmallPrg[1,2] - 1 < 0, (aSmallPrg[1,2] := 0, MSGBeep()), aSmallPrg[1,2] --), aSmallPrg[1,1]:Refresh())
  REDEFINE SAY ID 105 OF oPages1:aDialogs[ 1 ] COLOR CLR_YELLOW, CLR_BLACK
  REDEFINE GET aSmallPrg[2,1] VAR aSmallPrg[2,2] ID 106 OF oPages1:aDialogs[ 1 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 107 NAME "ADD_DAY" OF oPages1:aDialogs[ 1 ]    ACTION (aSmallPrg[2,2] ++, aSmallPrg[2,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 108 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 1 ] ACTION (IIF(aSmallPrg[2,2] - 1 < 0, (aSmallPrg[2,2] := 0, MSGBeep()), aSmallPrg[2,2] --), aSmallPrg[2,1]:Refresh())

  REDEFINE SAY ID 101 OF oPages1:aDialogs[ 2 ] COLOR CLR_YELLOW, CLR_BLACK
  REDEFINE GET aSmallPrg[3,1] VAR aSmallPrg[3,2]ID 102 OF oPages1:aDialogs[ 2 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 103 NAME "ADD_DAY" OF oPages1:aDialogs[ 2 ]    ACTION (aSmallPrg[3,2] ++, aSmallPrg[3,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 104 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 2 ] ACTION (IIF(aSmallPrg[3,2] - 1 < 0, (aSmallPrg[3,2] := 0, MSGBeep()), aSmallPrg[3,2] --), aSmallPrg[3,1]:Refresh())
  REDEFINE SAY ID 105 OF oPages1:aDialogs[ 2 ] COLOR CLR_YELLOW, CLR_BLACK                     
  REDEFINE GET aSmallPrg[4,1] VAR aSmallPrg[4,2] ID 106 OF oPages1:aDialogs[ 2 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 107 NAME "ADD_DAY" OF oPages1:aDialogs[ 2 ]    ACTION (aSmallPrg[4,2] ++, aSmallPrg[4,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 108 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 2 ] ACTION (IIF(aSmallPrg[4,2] - 1 < 0, (aSmallPrg[4,2] := 0, MSGBeep()), aSmallPrg[4,2] --), aSmallPrg[4,1]:Refresh())
                                                                                               
  REDEFINE SAY ID 101 OF oPages1:aDialogs[ 3 ] COLOR CLR_YELLOW, CLR_BLACK                     
  REDEFINE GET aSmallPrg[5,1] VAR aSmallPrg[5,2] ID 102 OF oPages1:aDialogs[ 3 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 103 NAME "ADD_DAY" OF oPages1:aDialogs[ 3 ]    ACTION (aSmallPrg[5,2] ++, aSmallPrg[5,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 104 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 3 ] ACTION (IIF(aSmallPrg[5,2] - 1 < 0, (aSmallPrg[5,2] := 0, MSGBeep()), aSmallPrg[5,2] --), aSmallPrg[5,1]:Refresh())
  REDEFINE SAY ID 105 OF oPages1:aDialogs[ 3 ] COLOR CLR_YELLOW, CLR_BLACK                     
  REDEFINE GET aSmallPrg[6,1] VAR aSmallPrg[6,2] ID 106 OF oPages1:aDialogs[ 3 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 107 NAME "ADD_DAY" OF oPages1:aDialogs[ 3 ]    ACTION (aSmallPrg[6,2] ++, aSmallPrg[6,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 108 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 3 ] ACTION (IIF(aSmallPrg[6,2] - 1 < 0, (aSmallPrg[6,2] := 0, MSGBeep()), aSmallPrg[6,2] --), aSmallPrg[6,1]:Refresh())
                                                                                               
  REDEFINE SAY ID 101 OF oPages1:aDialogs[ 4 ] COLOR CLR_YELLOW, CLR_BLACK                     
  REDEFINE GET aSmallPrg[7,1] VAR aSmallPrg[7,2] ID 102 OF oPages1:aDialogs[ 4 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 103 NAME "ADD_DAY" OF oPages1:aDialogs[ 4 ]    ACTION (aSmallPrg[7,2] ++, aSmallPrg[7,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 104 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 4 ] ACTION (IIF(aSmallPrg[7,2] - 1 < 0, (aSmallPrg[7,2] := 0, MSGBeep()), aSmallPrg[7,2] --), aSmallPrg[7,1]:Refresh())
  REDEFINE SAY ID 105 OF oPages1:aDialogs[ 4 ] COLOR CLR_YELLOW, CLR_BLACK                     
  REDEFINE GET aSmallPrg[8,1] VAR aSmallPrg[8,2] ID 106 OF oPages1:aDialogs[ 4 ] COLOR CLR_YELLOW, CLR_BLACK PICTURE "99"
  REDEFINE BTNBMP ID 107 NAME "ADD_DAY" OF oPages1:aDialogs[ 4 ]    ACTION (aSmallPrg[8,2] ++, aSmallPrg[8,1]:Refresh())                                                               
  REDEFINE BTNBMP ID 108 NAME "REMOVE_DAY" OF oPages1:aDialogs[ 4 ] ACTION (IIF(aSmallPrg[8,2] - 1 < 0, (aSmallPrg[8,2] := 0, MSGBeep()), aSmallPrg[8,2] --), aSmallPrg[8,1]:Refresh())

  REDEFINE BUTTON ID 102 OF oFld1:aDialogs[ 1 ] ACTION oPages1:GoPrev() WHEN (oPages1:nOption() != 1)
  REDEFINE BUTTON ID 103 OF oFld1:aDialogs[ 1 ] ACTION oPages1:GoNext() WHEN (oPages1:nOption() != 4)
RETURN

STATIC PROCEDURE MkPg2()
// smae as MkPg1 but with other dialogs
RETURN


CREATEDLGE(0)
TDIALOG:ACTIVATE(0)
TPAGES:DEFAULT(0)
(b)TPAGES(0)
ASEND(0)
TDIALOG:INITIATE(0)
TDIALOG:HANDLEEVEN(0)
CREATEDLG(0)
TDIALOG:ACTIVATE(0)
TFOLDER:DEFAULT(387)
TFOLDER:INITIATE(319)
ASEND(0)
TDIALOG:INITIATE(0)
TDIALOG:HANDLEEVEN(0)
DIALOGBOX(0)
TDIALOG:ACTIVATE(0)
MAIN(52)



Error FiveWin/3 Cannot create Dialog Box:
Resource: SMALL_PRG1

System
======
CPU type: Pentium
Hardware memory: 1536 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: Clipper (R) 5.2e Intl. (x216) (1995.02.07)
Windows and MsDos versions: 3.95, 5.0

Windows total applications running: 5
1 C:\WINDOWS\SYSTEM32\USER.EXE
2 explorer.exe
3 C:\APP\PNI\MONEY\MONEY1.DLL
4 C:\WINDOWS\SYSTEM32\MMSYSTEM.DLL
5 C:\WINDOWS\SYSTEM32\WOWEXEC.EXE

Variables in use
================
Procedure Type Value
==========================
CREATEDLGE
Param 1: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .F.
Param 5: B { || ... } CodeBlock
Param 6: L .F.
Param 7: B { || ... } CodeBlock
Param 8: U
Param 9: U
Local 1: O Class: TDIALOG
Local 2: N 610
Local 3: U
Local 4: U
TPAGES:DEFAULT
Local 1: O Class: TPAGES
Local 2: N 1
Local 3: O Class: TDIALOG
(b)TPAGES
Param 1: O Class: TPAGES
Param 2: N 604
ASEND
Param 1: A Len: 3
Param 2: C "INITIATE"
Param 3: N 604
TDIALOG:INITIATE
Local 1: U
Local 2: U
Local 3: O Class: TDIALOG
Local 4: L .T.
Local 5: U
TDIALOG:HANDLEEVEN
Param 1: N 272
Param 2: N 610
Param 3: N 0
CREATEDLG
Param 1: N 8087
Param 2: C "PAGE_WIN"
Param 3: N 608
Param 4: O Class: TDIALOG
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .F.
Param 5: B { || ... } CodeBlock
Param 6: L .F.
Param 7: B { || ... } CodeBlock
Param 8: U
Param 9: U
Local 1: O Class: TDIALOG
Local 2: N 608
Local 3: U
Local 4: U
Local 5: U
Local 6: O Class: TDIALOG
TFOLDER:DEFAULT
Local 1: O Class: TFOLDER
Local 2: N 1
Local 3: N 3
Local 4: O Class: TDIALOG
TFOLDER:INITIATE
Param 1: N 642
Local 1: O Class: TFOLDER
Local 2: U
ASEND
Param 1: A Len: 7
Param 2: C "INITIATE"
Param 3: N 642
TDIALOG:INITIATE
Local 1: U
Local 2: U
Local 3: O Class: TDIALOG
Local 4: L .T.
Local 5: U
TDIALOG:HANDLEEVEN
Param 1: N 272
Param 2: N 576
Param 3: N 0
DIALOGBOX
Param 1: N 8087
Param 2: C "MAIN_WIN1"
Param 3: N 0
Param 4: O Class: TDIALOG
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
Local 1: O Class: TDIALOG
Local 2: N 0
Local 3: U
Local 4: U
Local 5: U
Local 6: O Class: TDIALOG
MAIN
Local 1: U
Local 2: U

Linked RDDs
===========
SIXCDX
SXDBF

DataBases in use
================

1: => KLIMAKIA RddName: SIXCDX
==============================
RecNo RecCount BOF EOF
19 18 .F. .T.

Indexes in use TagName

Relations in use

Classes in use:
===============
1 TFONT
2 TWINDOW
3 TDIALOG
4 TBRUSH
5 TCONTROL
6 TSAY
7 TCOMBOBOX
8 TDBCOMBO
9 TGET
10 GET
11 TFOLDER
12 TPAGES
13 TBTNBMP
14 TBUTTON
15 TRECT
16 ERROR
17 TSTRUCT

Memory Analysis
===============
Static memory:
data segment: 64k
Initial size: 30560 bytes (SYMP=32, Stack=9504, Heap=2056)
PRG Stack: 34779 bytes
14 Static variables: 196 bytes

Dynamic memory consume:
Actual Value: 911732 bytes
Highest Value: 997748 bytes

kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby kronos911 » Sun Mar 26, 2006 9:34 pm

I think the problem might be the page object inside a folder object. When I quote out the procedures MkPg1() and MkPg2() the program starts normally. When I un quote ether one of those procedures I get the error message.
I’m going to try a folder in a folder instead of a page in a folder approach.
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby Mdandrea » Tue Mar 28, 2006 5:03 am

Could it be you are using a Borland Control ( like a sunken or raised line or the borland static control ) on one of the pages/folder tabs or dialogs ? if so you will need to also load the BWCC.DLL as wel or change it to a non-borland style control. Workshop loads the BWCC.DLL when you have it running, this could be why it runs ok when workshop is running.
Mdandrea
 
Posts: 21
Joined: Wed Nov 23, 2005 12:24 am

Postby kronos911 » Tue Mar 28, 2006 12:19 pm

No it’s not a Borland bwcc error. But you did give me an idea. I use the fwctrls.dll with workshop (install it from file->Install Control Library) in that lib are predefined FiveWin objects. I tried loading the bwcc.dll but no dice. When I loaded the fwctrls.dll bingo the app works. Now can some tell me if the fwctrls.dll has FW predefine objects why are the fivewin/3 errors coming up?
Below are the RC dumps of the 2 main dialogs and the template for the page dialogs (SMALL_PRG?, BIG_PRG?) I see no Borland controls only pure FW ones.

MAIN_WIN.RC
Code: Select all  Expand view  RUN
MAIN_WIN1 DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 190, 130
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX
CAPTION "Μισθολόγιο Ανάλυση υπερωρι\xFEν"
FONT 18, "Arial Greek"
{
COMBOBOX 102, 74, 10, 33, 51, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX 104, 74, 26, 75, 51, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "TFolder", 105, "TFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 44, 180, 65
PUSHBUTTON "Υπολογισμός \x80", 107, 5, 115, 54, 8
PUSHBUTTON "\xB8ξοδος", 106, 145, 115, 40, 8
LTEXT "Κλιμάκιο", 101, 11, 10, 60, 8
LTEXT "Κρατήσεις", 103, 12, 26, 60, 8
}


PAGE_WIN.RC
Code: Select all  Expand view  RUN
PAGE_WIN DIALOG LOADONCALL MOVEABLE DISCARDABLE 6, 21, 180, 56
STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
FONT 18, "Arial Greek"
{
CONTROL "TPages", 101, "TPages", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 3, 170, 34
PUSHBUTTON "<< Προηγ", 102, 9, 44, 40, 9
PUSHBUTTON "Επομ >>", 103, 56, 44, 40, 9
}


One of the dialogs that was used (ther others are exactly the same but the text strings are different)
Code: Select all  Expand view  RUN
BIG_PRG1 DIALOG LOADONCALL MOVEABLE DISCARDABLE 6, 20, 170, 34
STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
FONT 18, "Arial Greek"
{
EDITTEXT 102, 125, 3, 16, 12
CONTROL "TBtnBmp", 103, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE, 148, 5, 7, 7
CONTROL "TBtnBmp", 104, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE, 156, 5, 7, 7
EDITTEXT 106, 125, 18, 16, 12
CONTROL "TBtnBmp", 107, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE, 148, 20, 7, 7
CONTROL "TBtnBmp", 108, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE, 156, 20, 7, 7
LTEXT "Πρωί", 101, 6, 5, 115, 8
LTEXT "Πρωί πλήρες", 105, 6, 20, 115, 8
}
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece

Postby Mdandrea » Tue Mar 28, 2006 3:10 pm

You couild try uninstalling the fwctrls.dll from resource workshop , and then adding each of the controls as custom controls, you will lose the advantages of using the fwtcrls.dll. but it wouldn't make it a requirement to run the app. I know that it defeats the purpose of using fwtcrls.dll but it might help isolate the issue.
Mdandrea
 
Posts: 21
Joined: Wed Nov 23, 2005 12:24 am

Postby Antonio Linares » Tue Mar 28, 2006 4:55 pm

Try this:

DEFINE DIALOG oMainWin NAME "MAIN_WIN1" FONT oMainFont COLOR CLR_YELLOW, CLR_BLACK

TPages():New():End()

...
regards, saludos

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

Postby dbSoft » Tue Mar 28, 2006 8:05 pm

IF !FILE(".\MONEY1.DLL")
MSGStop("DLL .\money1.dll not found", "Exiting program")
QUIT
ENDIF


φιλε μου Χρόνη γειά
μετά απο υποχρεωτική αποχή αρκετών μηνών ν'αμαστε παλι εδώ
Αρχικά νά σ'ευχαρστήσω για τη βοήθεια στο TSBROWSE...και το χρόνο που αφιέρωσες.
Πιστεύω οτι το πρόβλημα δημιουργείται επειδή δεν βρίσκει το MONEY1.DLL
δοκίμασε το έτσι γιατι αν κατάλαβα καλά το DLL το έχεις ενα path κάτω
SET RESOURCES TO ".\MONEY1.DLL"

Εγώ τά έχω ετσι :

PUBLIC lDLL := lCUR +"\DLL\"
.............

hBorland := LoadLibrary( lDLL + "BWCC.DLL")
hFwctrls := LoadLibrary( lDLL + "FWCTRLS.DLL")
SET RESOURCES TO ( lDLL + "PHASTORE.DLL" )


φιλικά
ΓΙΑΝΝΗΣ
User avatar
dbSoft
 
Posts: 16
Joined: Thu Oct 13, 2005 8:31 pm
Location: Greece

Postby kronos911 » Tue Mar 28, 2006 10:04 pm

Thanks all
Since this is my first app I’ve written since the system format/rebuild it’s also the first one that displayed the error. The other 5 apps I have running there and there are made with workshop and the fwctrls.dll, but I don’t load the dll in any program or have it the client’s pc
So I guess I’ll have to load and unload that dll in the rest of my programs for now on (or which ever ones display that error while in debug – pre release – or bug fix development)

[Message in Greek to dbsoft]
Γιάννη γεια. Τελικά το πρόβλημα είναι ότι το πρόγραμμα δεν έβρισκε το fwctrls.dll που δεν φορτώνω ποτέ. Το χρησιμοποιώ μόνο στο workshop. Στις άλλες εφαρμογές, που είναι αρκετά μεγάλες με πολλά και διάφορα GUI κομμάτια δεν παρουσίασε το πρόβλημα αυτό ποτέ)

Thanks
kronos911
 
Posts: 37
Joined: Sat Oct 22, 2005 2:15 pm
Location: Greece


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 14 guests