No announcement yet.

Drawing Graphics and Text together

  • Filter
  • Time
  • Show
Clear All
new posts

  • Drawing Graphics and Text together

    I need to draw Geometric figures and Lines - plus add Text (among these figures) in a dialog. The trick is, also, that I must be able to alter the figures and text on-the-fly. Can anyone please suggest a possible method of doing so?

    Many TIA.

    William Fletcher

    [This message has been edited by William Fletcher (edited January 07, 2000).]

  • #2
    William --

    Windows API function such as LineTo and DrawText can be used to do everything that you've described. Those functions (and many others) are covered in the Microsoft Win32.HLP file that is available for download from this web site. Depending on what you want to do, it's not terribly difficult, as long as you're willing to do the "low-level" programming that is required. As others will probably confirm, if you are new to Windows API programming and/or Windows graphics, it can be a real brain-bender, especially at first. If I'm not mistaken, there are several examples of basic drawing functions in the Source Code forum.

    If you prefer a higher-level approach, you might consider my company's Graphics Tools package. It was specifically designed to add drawing and text functions to PB/DLL, and it provides easy-to-use wrappers for virtually all of the standard Windows API drawing functions. As (I hope) others will confirm, it greatly simplifies things. For more info, click on the link below.

    -- Eric

    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    "Not my circus, not my monkeys."


    • #3
      Be sure to check out the COOL32 example from our web site:

      PowerBASIC Support
      ( mailto:[email protected][email protected]</A> )
      mailto:[email protected]


      • #4
        I use Perfect Sync's Grafix Tools for this. It's wonderful! Think it cost about $50, but well worth it. More powerful and flexible than I expected. I do a lot of graph drawing in my programs and this works well. You use one #include line in the beginning, then 1 line anytime you want to create a graphics window. The graphics window can be inside of a dialog box with normal controls and text surrounding it. Plus, it can be specified to work at the window's background color so it's invisible. Also, it's really easy to add different types, sizes, and color fonts in different sizes and angles. Worth the expense if like me, you aren't a whiz at Windows programming yet!

        Todd Wasson
        PowerBasic Racing Simulator (October 2007 clip - 15.1MB wmv file) http: