我在视图类中用OpenGL绘制场景,想要在客户区边上实时显示场景信息,要一个组合框和一个编辑框,组合框选择对象,然后编辑框中显示该对象的信息,请问该怎么做呢?

解决方案 »

  1.   

    TO syy64:我用无模式的对话框,该怎么样让编辑框中的数据随着场景变化而实时变化呢?
      

  2.   

    CSolarView* pView; //视图类指针
    pView=(CSolarView*)((CFrameWnd*)AfxGetApp()->m_pMainWnd)->GetActiveView();在对话框里这样获取视图类指针吗?那要在Dlg.cpp中添加#include"SolarView.h"?这样会出错,说:
    e:\opengl\solar\solarview.h(22) : error C2143: syntax error : missing ';' before '*'
    e:\opengl\solar\solarview.h(22) : error C2501: 'CSolarDoc' : missing storage-class or type specifiers
    e:\opengl\solar\solarview.h(22) : error C2501: 'GetDocument' : missing storage-class or type specifiers
    该怎么做呢?