CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: My own graphics

  1. #1
    Join Date
    Sep 2009
    Posts
    7

    My own graphics

    I don't want to use a pre-made Graphics system to do my graphics. How do I start drawing pixels on a screen, without a pre-made graphics program?

    Is it similar to cout and putting data in the stream?

  2. #2
    Join Date
    Nov 2007
    Posts
    613

    Re: My own graphics

    If you're using Windows, normally you perform all the drawings in a window and not directly on the screen.

    If you're using MFC you perform drawing operations in the OnPaint function member of a CWnd derived class.

    If you're not using MFC, you perform the drawings in the WM_PAINT message handler of a window procedure.

    If you want to perform drawing directly to the screen disregarding any window, you'll need a dc for the entire screen. You can get it using GetDCEx .

    Before attempting to draw anthing, I suggest you to search the MSDN for the topic GDI (Graphic Design Interface) and read all of its subtopics.

Tags for this Thread

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