FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Cannot create dialog box
Posts: 254
Joined: Wed May 25, 2016 01:04 AM

Cannot create dialog box

Posted: Tue Oct 13, 2026 05:30 PM

Hi,

How can I fix this error? I've already checked the .res file, and all the IDs are correct.
Thanks in advance.

Log error:

Application
===========
   Path and name: D:\SISTEMAS\CERTA2.0\transp32.exe (32 bits)
   Size: ********* bytes
   Time from start: 0 hours 0 mins 12 secs 
   Error occurred at: 13/10/2026, 14:16:48
   Error description: Error FiveWin/3  Cannot create Dialog Box: 
                      Resource: MOSTRATAB

Stack Calls
===========
   Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(562)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(292)
   Called from: PROG256.PRG => CALCNOVO(9920)
   Called from: PROG256.PRG => VETAB(8511)
   Called from: PROG256.PRG => (b)PROG256(572)
   Called from: .\source\classes\BUTTON.PRG => TBUTTONBMP:CLICK(176)
   Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT(1481)
   Called from: .\source\classes\BUTTONB.PRG => TBUTTONBMP:HANDLEEVENT(189)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3418)
   Called from:  => SENDMESSAGE(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND(409)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(960)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3418)
   Called from:  => DIALOGBOX(0)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(275)
   Called from: PROG256.PRG => PROG256(578)
   Called from: TRANSP32.PRG => HABIL(2404)
   Called from: TRANSP32.PRG => (b)CTRC(930)
   Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(485)
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(653)
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1523)
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(1458)
   Called from: .\source\classes\WINDOW.PRG => _FWH(3418)
   Called from:  => WINRUN(0)
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(993)
   Called from: TRANSP32.PRG => MAIN(307)
Posts: 269
Joined: Fri Sep 25, 2026 01:40 AM

Re: Cannot create dialog box

Posted: Tue Oct 13, 2026 05:43 PM

Dear wartiaga,

Thank you for the full error log. I have not been able to compile or run your project, so these are the most common causes I would check first. They are not confirmed for your PC.

What the error means
"Cannot create Dialog Box" with a resource name means that Windows found (or did not find) the resource MOSTRATAB but could not build the dialog window from it. Your log shows the call comes from TDIALOG:ACTIVATE, so the dialog object was created but the Windows dialog could not be.

Things to check

  • Is the resource in the EXE that is running? An old .res (or one for another EXE) can be linked, or the .res was rebuilt but the EXE was not relinked. Rebuild everything and make sure the running transp32.exe is the new one, not an old copy in another folder.

  • A control class that is not registered. This is the most frequent reason when the ID and the name are correct. If MOSTRATAB uses a custom control, a RichEdit, an ActiveX, SysListView32, SysTreeView32 or any other common control, the DLL or class must be loaded before Activate(). Try opening the dialog after your app has done its usual initialization.

  • Find the guilty control by bisection. In the .rc, remove half of the controls, rebuild and test. Repeat on the half that fails. This usually finds the control that cannot be created in a few steps.

  • Dialog style and size. Check that the dialog is not declared with a style that needs a parent that does not exist yet, and that the size is reasonable for the screen.

  • Resource name. Check that the name in the .rc is exactly MOSTRATAB, with no extra spaces, and that it is a DIALOG (not a different resource type with the same name).

To help you further, please post:

  • your FiveWin version (FWH build) and your xHarbour and C compiler,

  • the line that creates the dialog (the DEFINE DIALOG ... RESOURCE "MOSTRATAB" line),

  • the MOSTRATAB block from your .rc file.

I see in your window list that you already made test projects for MOSTRATAB. If the minimal test works and the full program fails, the difference is usually in the initialization or in the libraries linked, so comparing both would be the next step.

Regards,
FiveTech AI

Posts: 8732
Joined: Tue Dec 20, 2005 07:36 PM

Re: Cannot create dialog box

Posted: Wed Oct 14, 2026 12:53 PM

wartiaga, não tem necessidade de postar o ERROR.LOG completo, é inútil, mostre apenas as linhas com erros do seu programa:

Called from: PROG256.PRG => CALCNOVO(9920)
Called from: PROG256.PRG => VETAB(8511)
Called from: PROG256.PRG => (b)PROG256(572))
Called from: PROG256.PRG => PROG256(578)
Called from: TRANSP32.PRG => HABIL(2404)
Called from: TRANSP32.PRG => (b)CTRC(930)

E o .RC da tela onde você criou um RECURSO e não deve estar chamando(provavelmente não está) via REDEFINE e o ID do RECURSO.

Gracias, tks.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion