• 大小: 59KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: 其他
  • 标签: opengl  

资源简介

用VC opengl 绘制的一个房屋轮廓

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “plmy.h“

#include “MainFrm.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
ON_WM_CREATE()
ON_WM_GETMINMAXINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};

/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction

CMainframe::CMainframe()
{
// TODO: add member initialization code here
    fullscreenkey=FALSE;

}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;

// if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | WS_VISIBLE | CBRS_TOP
if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1;      // fail to create
}

// if (!m_wndStatusBar.Create(this) ||
if (!m_wndStatusBar.Create(this WS_CHILD | CBRS_BOTTOM) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1;      // fail to create
}

//定义状态栏
if(m_wndStatusBar){
  m_wndStatusBar.SetPaneInfo(00SBPS_STRETCH50);
  m_wndStatusBar.SetPaneInfo(10050);
      m_wndStatusBar.SetPaneInfo(20SBPS_STRETCH50);
        m_wndStatusBar.SetPaneInfo(30SBPS_STRETCH50);
  };
//全拼显示
          fullscreenkey=TRUE;
              CRect winmeclientme;
              GetWindowRect(&winme);
              RepositionBars(00xffffAFX_IDW_PANE_FIRSTreposQuery&clientme);
              ClientToScreen(&clientme);
              int fullwide=GetSystemMetrics(SM_CXSCREEN);
              int fullhide=GetSystemMetrics(SM_CYSCREEN);

              mefullscreen.left=winme.left-clientme.left;
              mefullscreen.top=winme.top-clientme.top;
              mefullscreen.right=winme.right-clientme.right+fullwide;
              mefullscreen.bottom=winme.bottom-clientme.bottom+fullhide;

              WINDOWPLACEMENT winfull;
              winfull.length=sizeof(WINDOWPLACEMENT);
              winfull.flags=0;
              winfull.showCmd=SW_SHOWNORMAL;
              winfull.rcNormalPosition=mefullscreen;
              SetWindowPlacement(&winfull);

// TODO: Delete these three lines if you don‘t want the toolbar to
//  be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    I.A....      4429  2006-12-27 09:43  房屋\MainFrm.cpp

    I.A....      1593  2006-12-27 09:43  房屋\MainFrm.h

    I.A....     27984  2006-12-27 09:43  房屋\plmy.aps

    I.A....      2208  2006-12-27 09:43  房屋\plmy.clw

    I.A....      4173  2006-12-27 09:43  房屋\plmy.cpp

    I.A....      4457  2006-12-27 09:43  房屋\plmy.dsp

    I.A....       531  2006-12-27 09:43  房屋\plmy.dsw

    I.A....      1334  2006-12-27 09:43  房屋\plmy.h

    I.A....    345088  2006-12-27 09:43  房屋\plmy.ncb

    I.A....     53760  2006-12-27 09:43  房屋\plmy.opt

    I.A....      1084  2006-12-27 09:43  房屋\plmy.plg

    I.A....     11404  2006-12-27 09:43  房屋\plmy.rc

    I.A....      1702  2006-12-27 09:43  房屋\plmyDoc.cpp

    I.A....      1453  2006-12-27 09:43  房屋\plmyDoc.h

    I.A....     11627  2006-12-27 09:43  房屋\plmyView.cpp

    I.A....      2414  2006-12-27 09:43  房屋\plmyView.h

    I.A....      4263  2006-12-27 09:43  房屋\ReadMe.txt

    I.A....      1078  2006-12-27 09:43  房屋\res\plmy.ico

    I.A....       396  2006-12-27 09:43  房屋\res\plmy.rc2

    I.A....      1078  2006-12-27 09:43  房屋\res\plmyDoc.ico

    I.A....       598  2006-12-27 09:43  房屋\res\Toolbar.bmp

    I.A....       685  2006-12-27 09:43  房屋\resource.h

    I.A....       206  2006-12-27 09:43  房屋\StdAfx.cpp

    I.A....      1054  2006-12-27 09:43  房屋\StdAfx.h

    I..D...         0  2009-12-17 08:58  房屋\res

    I..D...         0  2009-12-17 08:58  房屋

----------- ---------  ---------- -----  ----

               484599                    26


评论

共有 条评论