Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Drawing Rectangle

loadpoint
Beginner
964 Views
Hi
Im having a couple of problems learning to draw a rectangle onto a dialog window. I have modified an old existing program just to try and learn to draw shapes but Im getting a few errors. The problems are in the FXDraw subroutine at the end of Showfont.f90. Most of the code is taken from the Angle example program. I don't think hwnd is set and the Rectangle call gets an error too. Attached is the f90 file. Can anyone help with this simple problem.
Thanks
Dave
0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
964 Views
No can do. There's no sense doing BeginPaint/EndPaint outside of WM_PAINT message block, and you can't reach it using DFLOGM.

Instead, you can use my versions of XFLOGM 1.0 or, better still, XFLOGM 2.0, which enable you to draw on owner-drawn static controls on the dialog (with 2.0, you can even draw on the dialog background itself).

HTH
Jugoslav
0 Kudos
loadpoint
Beginner
964 Views
Ah right. Didn't know that. It would be nice to have a group box on a dialog and just draw inside that.
I think I will try to use the XFT library but may need some help. I have downloaded the library and installed it. On the important notes it says to 'rebuild the XFT library after installation'. When Irebuild XFT.dsp I get 104 errors. Is there something wrong there?
0 Kudos
loadpoint
Beginner
964 Views
Ah right. Didn't know that. It would be nice to have a group box on a dialog and just draw inside that.
I think I will try to use the XFT library but may need some help. I have downloaded the library and installed it. On the important notes it says to 'rebuild the XFT library after installation'. When Irebuild XFT.dsp I get 104 errors. Is there something wrong there? I am using Compaq Visual Fortran Professional Edition 6.1.0

Message Edited by loadpoint on 08-26-2005 09:14 AM

0 Kudos
Jugoslav_Dujic
Valued Contributor II
964 Views
Uh-oh. I try to maintain compatibility with CVF 6.0/6.1 but it's difficult because I work in dark -- I don't have 6.x installed so I can only hope it will swallow the code. And I'll probably have to give up on it completely in a near future.

Would you be so kind to send me the list of error messages (best, in a private e-mail)? I assume most of them are consequence of only a few errors in a low-level module.

In the meantime, I recommend that you stick with XFLOGM 1.0 -- it is (well, used to be) compatible even with DVF 5.0D. If I manage to fix the errors for 6.1 (or if you upgrade your compiler :-) ) you can just change the linker/include settings and build it with XFT full.

Jugoslav
0 Kudos
Reply