Click here to Skip to main content
15,892,746 members
Articles / Desktop Programming / MFC

OAG Library (OpenGL) Part 2.1 - Drawing Objects 2D using the Mouse and Programatically

Rate me:
Please Sign up or sign in to vote.
4.42/5 (11 votes)
13 Aug 2011CPOL3 min read 64.5K   450   45  
This tutorial shows Library Code for Geometries 2D how to draw them programatically and how draw to objects using the mouse in an application MFC.
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by OAGMFC.rc
//
#define IDD_ABOUTBOX                    100
#define IDP_OLE_INIT_FAILED             100
#define IDR_POPUP_EDIT                  119
#define ID_STATUSBAR_PANE1              120
#define ID_STATUSBAR_PANE2              121
#define IDS_STATUS_PANE1                122
#define IDS_STATUS_PANE2                123
#define IDS_TOOLBAR_STANDARD            124
#define IDS_TOOLBAR_CUSTOMIZE           125
#define ID_VIEW_CUSTOMIZE               126
#define IDR_MAINFRAME                   128
#define IDR_MAINFRAME_256               129
#define IDS_TEXTURE_FILTER              129
#define IDR_RenderGraphicMFTYPE         130
#define IDS_OAGXML                      130
#define IDS_FONT_FILTER                 131
#define IDS_EDIT_MENU                   306
#define ID_DRAW_LINE                    32771
#define ID_DRAW_POLYLINE                32772
#define ID_DRAW_RECTANGLE               32773
#define ID_DRAW_TRIANGLE                32774
#define ID_INSERT_RASTERIMAGERECTANGLE  32775
#define ID_DRAW_2DTEXT                  32776
#define ID_FILE_IMPORT                  32778
#define ID_IMPORT_XYZFILE               32779
#define ID_INSERT_RASTERIMAGETRIANGLE   32780
#define ID_INSERT_TEXTURE               32781
#define ID_INSERT_FONT                  32782
#define ID_TEXTUREMAPPING_RASTERIMAGERECTANGLEMULTITEXTURE 32783
#define ID_TEXTUREMAPPING_RASTERIMAGETRIANGLEMULTITEXTURE 32784
#define ID_TEXTUREMAPPING_RASTERIMAGERECTANGLEREPEATING 32785
#define ID_TEXTUREMAPPING_RASTERIMAGERECTANGLECLAMPING 32786
#define ID_TEXTUREMAPPING_RASTERIMAGETRIANGLEREPEATING 32787
#define ID_TEXTUREMAPPING_RASTERIMAGETRIANGLECLAMPING 32788

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        311
#define _APS_NEXT_COMMAND_VALUE         32789
#define _APS_NEXT_CONTROL_VALUE         1002
#define _APS_NEXT_SYMED_VALUE           310
#endif
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Brazil Brazil
I live in Matão, a small city in Brazil. I studied as Programmer in a College for Software Development in Database.
After finishing the College I have been working with java, c# and Computer Graphics with searches for OpenGL.

Comments and Discussions