FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error FiveWin/3 Cannot create Dialog Box:
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Error FiveWin/3 Cannot create Dialog Box:
Posted: Fri Mar 22, 2019 06:14 PM
Hi,

This error comes randomly. I dont use RESOURCE.

How Can I solve this?

Code (fw): Select all Collapse
Application
===========
   Path and name: C:\OBJEKT\IcraW\icraw.exe (32 bits)
   Size: 3,494,400 bytes
   Compiler version: Harbour 3.2.0dev (r1801051438)
   FiveWin  version: FWH 18.11
   C compiler version: Microsoft Visual C++ 19.12.25835 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 3 hours 52 mins 29 secs 
   Error occurred at: 20/03/2019, 13:11:02
   Error description: Error FiveWin/3  Cannot create Dialog Box: 
                      Title: Dialog 5

Stack Calls
===========
   Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR( 717 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 321 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:DEFAULT( 849 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:INITIATE( 1047 )
   Called from:  => __OBJSENDMSG( 0 )
   Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
   Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 805 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 330 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:DEFAULT( 849 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:INITIATE( 1047 )
   Called from:  => __OBJSENDMSG( 0 )
   Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
   Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 805 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1120 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: .\TOb_Browse1.prg => TYK_DETAY:ACTIVATE( 1708 )
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Fri Mar 22, 2019 06:56 PM
Hakan,

it seems the error belongs to TFolderEx

can You show a detail how the folder is called from inside the dialog :-)

regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Fri Mar 22, 2019 07:19 PM
Hi Uwe,

ukoenig wrote:Hakan,

it seems the error belongs to TFolderEx

can You show a detail how the folder is called from inside the dialog :-)

regards
Uwe :-)


Code (fw): Select all Collapse
  @ 2, 3 FOLDERex oFld OF oDlg PIXEL ; 
      PROMPTS "&Genel", "Takibin K&onusu";
      ROUND 10 ON CHANGE FOLDER_CHANGE(nOption, nOldOption, Self, oSelf)
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Fri Mar 22, 2019 08:05 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"

FUNCTION Main()

   local oDlg, oFld, oGet, cTest := "Hello world", cAnother := "Another GET"
   local oFont, oFnt

   DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
   DEFINE FONT oFnt  NAME "Ms Sans Serif" SIZE 00, -12 BOLD

   DEFINE DIALOG oDlg SIZE 400, 300

   oDlg:lHelpIcon := .F.

   @ 3, 5 FOLDEREX oFld PIXEL                          ;
          PROMPTS "&Genel", "Takibin K&onusu", "Other" ;
          TAB HEIGHT 25 ROUND 5                        ;
          FONT oFnt COLOR CLR_HCYAN TOP SIZE 190, 120

   oFld:SetOption( 1 )
   oFld:aEnable = { .T., .T., .F. }
   oFld:Show()
      
   @ 1, 1 GET oGet VAR cTest OF oFld:aDialogs[ 1 ] SIZE 50,12
   
   @ 2, 1 GET cAnother OF oFld:aDialogs[ 1 ] SIZE 50, 12
   
   @ 7.2, 14 BUTTON "&Exit" ACTION( oDlg:End() ) CANCEL
          
   ACTIVATE DIALOG oDlg CENTERED ;
            ON INIT ( oGet:SetFocus(), .F. )

   oFnt:End()
   oFont:End()

RETURN( NIL )



Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 08:28 AM

Hi,

My code is works normally. But sometimes gives an error.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 08:44 AM
Please modify dialog.prg this way:

Code (fw): Select all Collapse
      if ::nResult == 65535
         MsgInfo( GetLastError() )
         CreateDlgError( Self )
      endif


Lets check the generated specific error

We are going to enhance FWH to automatically show GetLastError() on those circunstances
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 09:31 AM
This solution seems a better one to know what is the system error:

Already included in next FWH 19.02

Inside dialog.prg
Code (fw): Select all Collapse
static function CreateDlgError( Self, nGetLastError )

   local cRes := If( ValType( ::cResName ) == "N", Str( ::cResName ), ::cResName )
   local cPad := Replicate( Chr( 32 ), 22 )

   #define CANNOTCREATE_DIALOG 3
   Eval( ErrorBlock(), ;
        _FwGenError( CANNOTCREATE_DIALOG, CRLF + cPad + ;
                     If( ! Empty( cRes ), "Resource: " + cRes,;
                     "Title: " + If( Empty( ::cCaption ), "", ::cCaption ) + ", System Error: " + GetErrMsg( nGetlastError ) ) ) )
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 09:57 AM
function GetErrMsg() in source\winapi\creatwnd.c has to be modified also this way:

These enhancements are already included in next FWH 19.02

Code (fw): Select all Collapse
HB_FUNC( GETERRMSG ) // --> cSystemError
{
   LPVOID lpMsgBuf;
   DWORD dwLastError = GetLastError();

   if( hb_pcount() > 0 )
      dwLastError = hb_parnl( 1 );

   FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                  NULL,
                  dwLastError,
                  MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), // Default language
                  ( LPTSTR ) &lpMsgBuf,
                  0,
                  NULL );

   hb_retc( ( char * ) lpMsgBuf );
   LocalFree( lpMsgBuf );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 06:54 PM

Thank you Antonio,

I will try but, can you please mail me revised libs if it is possible?

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sat Mar 23, 2019 09:05 PM

Hakan,

What C compiler version ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sun Mar 24, 2019 08:39 AM
Antonio Linares wrote:Hakan,

What C compiler version ?


Code (fw): Select all Collapse
Compiler version: Harbour 3.2.0dev (r1801051438)
   FiveWin  version: FWH 18.12
   C compiler version: Microsoft Visual C++ 19.12.25835 (32-bit)
   Windows version: 6.2, Build 9200
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sun Mar 24, 2019 01:33 PM

Already sent

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sun Mar 24, 2019 04:45 PM
Antonio Linares wrote:Already sent


Thank you Antonio,

Can you please accept my access request?
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sun Mar 24, 2019 06:04 PM

done

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Sun Mar 24, 2019 06:51 PM
Hi Antonio,

I do full compile, it gives a runtime error when I run my application.

Should I wait for full fwh update?

Code (fw): Select all Collapse
   Time from start: 0 hours 0 mins 1 secs 
   Error occurred at: 24/03/2019, 21:23:20
   Error description: Error BASE/1005  Message not found: TMENUITEM:_BBLOCK
   Args:
     [   1] = O   TMENUITEM

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TMENUITEM:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TMENUITEM:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TMENUITEM:_BBLOCK( 0 )
   Called from: .\source\classes\PDMENU.PRG => MENUEND( 414 )
   Called from: .\Master.prg => DEFINE_RIBBON( 1554 )
   Called from: .\Master.prg => (b)MAIN( 280 )
   Called from: .\TApplication.prg => TAPPLICATION:ACTIVATE( 999 )
   Called from: .\Master.prg => MAIN( 319 )
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06