Error FiveWin/3 Cannot create Dialog Box:

Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Fri Mar 22, 2019 6:14 pm

Hi,

This error comes randomly. I dont use RESOURCE.

How Can I solve this?

Code: Select all  Expand view  RUN
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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby ukoenig » Fri Mar 22, 2019 6: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Fri Mar 22, 2019 7: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: Select all  Expand view  RUN
 @ 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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby karinha » Fri Mar 22, 2019 8:05 pm

Code: Select all  Expand view  RUN

#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
User avatar
karinha
 
Posts: 7835
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Sat Mar 23, 2019 8:28 am

Hi,

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sat Mar 23, 2019 8:44 am

Please modify dialog.prg this way:

Code: Select all  Expand view  RUN
     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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sat Mar 23, 2019 9: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: Select all  Expand view  RUN
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sat Mar 23, 2019 9: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: Select all  Expand view  RUN
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Sat Mar 23, 2019 6: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sat Mar 23, 2019 9:05 pm

Hakan,

What C compiler version ?
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

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Sun Mar 24, 2019 8:39 am

Antonio Linares wrote:Hakan,

What C compiler version ?


Code: Select all  Expand view  RUN
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
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sun Mar 24, 2019 1:33 pm

Already sent
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

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Sun Mar 24, 2019 4: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Antonio Linares » Sun Mar 24, 2019 6:04 pm

done
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

Re: Error FiveWin/3 Cannot create Dialog Box:

Postby Horizon » Sun Mar 24, 2019 6: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: Select all  Expand view  RUN
  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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 35 guests