CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    37

    Line Drawing DLL

    Hi,

    I am creating an eLearning project to educate students that lets them draw diagrams. This is mostly completed using an eLearning authoring program*. But, the one feature that this program does not create is ability to draw lines (about 7 line types-solid, dotted, arrow-headed, etc.) on-the-fly between diagram shapes, then save these, re-open and edit if needed. These are straight lines between objects.

    The authoring software (*Opus from Digital Workshop, UK) can include and call functions in external DLL's, if they are written in unmanaged code.

    I wonder if, as a C+ beginner (would use the free Visual Studio Express for Visual C+), if it would be possible for me to create a very simple DLL with a line drawing function, using a few line types? I think that I could overlay this line drawing canvas over the diagram in the final app (make them the same size, use a transparent background for the line canvas).

    I would much appreciate if anyone can get me started, possibly with a basic DLL with one function, one call, almost like a 'hello world' for unmanaged DLL. Then I could see what is involved, what I would need to figure out.

    Regards,

    saratogacoach
    saratogacoach

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Line Drawing DLL

    Sure it's possible to do everything using the Windows Api and the express version. I would recommend reading the latest book by Charles Petzold http://www.charlespetzold.com/pw5/ to get an understanding on the windows environment.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  3. #3
    Join Date
    Feb 2009
    Posts
    37

    Re: Line Drawing DLL

    Hi,

    Thank you for the suggestion.

    I think that I "know" more than I can "do." I've been around the Windows environment, coding in VB, net, a variety of scripting languages (JS, ASP, PHP, etc.) for a while.

    It's C+ and unmanaged DLL's that are the challenge. Would like to see a basic beginner tutorial on creating a DLL in C+, especially a line drawing tutorial, maybe with some source code to get started.

    Regards,

    saratogacoach
    saratogacoach

  4. #4
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Line Drawing DLL

    I repeat, do get yourself a windows C/C++ programming book. VB for instance, is not the same as C++ so some source code would help you in some specific cases but not overall.
    Last edited by S_M_A; May 6th, 2011 at 04:51 PM.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  5. #5
    Join Date
    Feb 2009
    Posts
    37

    Re: Line Drawing DLL

    OK. I understand. Again, thanks for your suggestion.
    saratogacoach

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured