Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Windows
 Charting and Real-Time Graphics Tools for Windows
 Titling outside graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

TonyGrayDSI

14 Posts

Posted - 11 Aug 2005 :  17:18:32  Show Profile  Reply with Quote
I'm doing multiple graphs on a single page, and I'd like to draw a title for all above the graphs. The only way I've found to do this so far is to make a 'fake' graph above the others that spans the full width of the page, and call WGTitleGraph on that one.

This works fine, but it uses up one of my 16 allowable graphs on the page so I can no longer get 4 x 4 in a nice grid.

Is there a way to write a text string on the page outside of any of the graphs?

quinncurtis

1164 Posts

Posted - 11 Aug 2005 :  21:32:22  Show Profile  Reply with Quote
Use WGTextNorm.
Go to Top of Page

TonyGrayDSI

14 Posts

Posted - 11 Aug 2005 :  22:46:16  Show Profile  Reply with Quote
Thanks for the reply, but I'm afraid that won't do what I need. WGTextNorm requires a graph handle, and I want to draw outside the graphs, on the page itself.

The idea is that I have a 4x4 grid of graphs and I want to have a bit of space on the page above the first row where I can write a title that will apply to all 16 of the graphs.

Is there a way to write a text string on the page, outside any of the graphs?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 12 Aug 2005 :  08:58:05  Show Profile  Reply with Quote
If you are programming using the basic Windows API, using an extra graph window, as you are doing, is the easiest way to go. Otherwise your only other alternative is to make the page window a frameless child of another Windows window, positioning it to leave the margin that you want at the top. Then you would have to process that windows WM_PAINT messages to draw the text that you want using standard Windows API functions. That involves creating and deleting fonts, measuring, justifying and drawing the text. That's alot of work.

Or if you are using the Graphics Class Libraries for MFC, see the example SDIDemo1 for a simple example of writing text in the QCPageView class.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 12 Aug 2005 :  15:34:22  Show Profile  Reply with Quote
Since I think you are using VB, then again, using the extra window is probably the way to go.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07