Page 1 of 1

TBitMap from resources causes Error FiveWin/3

PostPosted: Tue Mar 14, 2006 9:44 pm
by reinaldocrespo
Hi.

Have a dialog with a single control in it.
Code: Select all  Expand view
CONTROL "", 1000, "TBITMAP", WS_CHILD | WS_VISIBLE, 7, 24, 123, 355


When excuted, I get a fivewin/3 can not create dialog.

Path and name: F:\mp\triage.exe (32 bits)
Size: 2,203,648 bytes
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 03/14/2006, 16:40:09
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: XRAYORDERS

Stack Calls

If I remove the control, then no error. Can't figure out what's wrong.
I'm using dialogs with bitmaps in other apps with no problems. But for some reason I get this error only with this particular app. Can someone help?

Thank you,


Reinaldo.

Re: TBitMap from resources causes Error FiveWin/3

PostPosted: Tue Mar 14, 2006 10:00 pm
by Enrico Maria Giordano
Try with another id (ie. 101) or with "TBitmap" (note the case). Check also that you correctly REDEFINEd the control.

Only a stub in the dark.

EMG

PostPosted: Tue Mar 14, 2006 10:13 pm
by reinaldocrespo
Enrico;

Always appreciate your answers.

I'm reducing the code to the bare minimum. This all happens from within the method of a class.
Code: Select all  Expand view
local oSelf := Self

   DEFINE DIALOG ::odlg NAME "XRAYORDERS" OF ::oWnd TITLE "Xray Orders"

   ACTIVATE DIALOG oSelf:oDlg CENTERED


The dialog code from resource after the changes you suggeted:
Code: Select all  Expand view
XrayOrders DIALOG 6, 15, 431, 417
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "xRay Orders"
FONT 8, "MS Sans Serif"
{
CONTROL "", 101, "TBitmap", WS_CHILD | WS_VISIBLE, 7, 24, 123, 355
}


Same error. But if I remove the TBitmap control from the dialog, no errors.

Reinaldo.

PostPosted: Tue Mar 14, 2006 10:31 pm
by Enrico Maria Giordano
As I said, you missed REDEFINE BITMAP...

EMG