Board index » delphi » Disfunction #2

Disfunction #2

I'm a beginner in BP 7.0 for Windows programming and I experience a
strange problem :

Someone tried in this Newsgroup to help me but my problem is still
present. Thanks to him.

I've created an Windows 3.11 application using BP 7.0. Using Menu items,
the user can open some modal dialog boxes. They are drawn in 3D using
Ctl3d.

The strange behaviour of my app. :
- When I compile and run the code using BP 7.0 (or when Winsight is
iconized for example), my dialog boxes appear very well.
- When I run my app. using the App.exe file created by the compilation
(ie when no Borland application is running too), some dialog boxes
appear very well but some send an em_InvalidWindow error code.

Here are some datas which can be useful to solve my problem :

- Dialog boxes were created using Resource Workshop. Some are simple
boxes (only 2 radio buttons and an Ok button), some are more complex one
(Bitmap drawn, several buttons, edit controls). The former seem to
appear well while the latter seem to cause the troubles.

- Boxes are displayed using : Application^.Execdialog(New(PDialog,
Init(@self, id_dialog))). So, they are created on the heap.

- Ctl3d is not responsible for the troubles while creating my app.
without using it also causes the error code to be send.

I think of a memory problem with the heap but I'm not sure of that.
Incresing the size of the Heap or Stack in the data segment doesn't
solve the problem. It's seems to me that the error code is send due to a
lack of memory but I have 8 Mb on my computer and the only app. running
(while BP is running when no troubles appear).

I also think of a wrong configuration of my resource (missing parameters
for example).

Finally, and the most frightening one, I think of a bug in BP 7.0.

Can someone help me ?

 

Re:Disfunction #2


Quote
David Tetard <Marc.Bou...@gci-sa.fr> wrote:

> I'm a beginner in BP 7.0 for Windows programming and I experience a
> strange problem :

> I've created an Windows 3.11 application using BP 7.0. Using Menu items,
> the user can open some modal dialog boxes. They are drawn in 3D using
> Ctl3d.

> The strange behaviour of my app. :
> - When I compile and run the code using BP 7.0 (or when Winsight is
> iconized for example), my dialog boxes appear very well.
> - When I run my app. using the App.exe file created by the compilation
> (ie when no Borland application is running too), some dialog boxes
> appear very well but some send an em_InvalidWindow error code.

> - Dialog boxes were created using Resource Workshop. Some are simple
> boxes (only 2 radio buttons and an Ok button), some are more complex one
> (Bitmap drawn, several buttons, edit controls). The former seem to
> appear well while the latter seem to cause the troubles.

You might try adding 'BWCC' to your 'USES' line of your main
application.  

                       Mike

Other Threads