CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    21

    Sending message from main class to newly created class MFC VC

    I want to send a number to my OPENGL class from my main dlg. Im using a updated edit control.

    here is my open gl code that will draw what I want

    Code:
    void COpenGLControl::oglDrawScene()
    {
    
    char side[32];
    
    
    
    
    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
    glBegin(GL_LINE_LOOP);
    	for(int i = 0; i < 256; i++) {
    glColor3f(1.0f,0.0f,0.0f);
    	 glVertex3f( 1.0f, 1.0f,  1.0f);
          glVertex3f( 1.0f, 1.0f, -1.0f);
          glVertex3f(-1.0f, 1.0f, -1.0f);
          glVertex3f(-1.0f, 1.0f,  1.0f);
     
    	}
    
    	glEnd();
    //---
    
    
    
    
    }
    I want to update the glVertex3f values when I enter numbers into edit controls on my main dialog

    how can I send messages from my main dialog to the opengl class that I created?

  2. #2
    Join Date
    Nov 2012
    Posts
    21

    Re: Sending message from main class to newly created class MFC VC

    Nevermind. I Solved my own problem by creating a pointer to my main dialog and simply using GETDLGITEMINT
    Last edited by terryeverlast; May 14th, 2014 at 01:39 AM.

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