Example #1
0
BOOL CSkinWin::DrawFrame(CDC *pDC, int x, int y, int w, int h, int state, int title )
{
    //if ( title )
    DrawTitle( pDC, x + m_BorderLeftWidth , y, 
               w - m_BorderRightWidth - m_BorderLeftWidth + 1, state );
    DrawLeft( pDC, x, y, h, state );
	//SKIN_SHANG 右边框
    DrawRight( pDC, x + w - m_BorderRightWidth , y, h, state );
    DrawBottom( pDC, x + m_BorderLeftWidth, 
        y + h - m_BorderBottomHeight, w - m_BorderRightWidth - m_BorderLeftWidth, state );
    return TRUE;

}
void LunarModule::Display()
{
    glPushAttrib(GL_ALL_ATTRIB_BITS);
    glPushMatrix();
    glMaterialfv(GL_FRONT, GL_AMBIENT, matAmbient);
    glMaterialfv(GL_FRONT, GL_DIFFUSE, matDiffuse);
    glMaterialfv(GL_FRONT, GL_SPECULAR, matSpecular);
    glMateriali(GL_FRONT, GL_SHININESS, matShininess);
    glTranslatef(300, distance, -100);
    
    glRotatef(270, 0, 1, 0);
    glPushMatrix();
    DrawBottom();
    glPopMatrix();
    
    glPushMatrix();
    DrawTop();
    glPopMatrix();
    
    
    glPopMatrix();
    glPopAttrib();
    
}