| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 627 人关注过本帖
标题:高手帮忙解决问题
只看楼主 加入收藏
miriamlv
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-4-30
收藏
 问题点数:0 回复次数:1 
高手帮忙解决问题
// ResultView.cpp : implementation file
//

#include "stdafx.h"
#include "query tool.h"
#include "ResultView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CResultView

IMPLEMENT_DYNCREATE(CResultView, CView)

CResultView::CResultView()
{
}

CResultView::~CResultView()
{
}


BEGIN_MESSAGE_MAP(CResultView, CView)
    //{{AFX_MSG_MAP(CResultView)
    ON_WM_CREATE()
    ON_WM_SIZE()
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CResultView drawing

void CResultView::OnDraw(CDC* pDC)
{
    CDocument* pDoc = GetDocument();
    // TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CResultView diagnostics

#ifdef _DEBUG
void CResultView::AssertValid() const
{
    CView::AssertValid();
}

void CResultView::Dump(CDumpContext& dc) const
{
    CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CResultView message handlers

int CResultView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CView::OnCreate(lpCreateStruct) == -1)
        return -1;
    
    // TODO: Add your specialized creation code here
    CRect rect;
    this->GetWindowRect(&rect);
    this->ScreenToClient(rect);
    if(!m_DataGrid.Create(NULL,NULL,WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL,rect,this,[color=Red]ID_DATAGRID[/color]))
        TRACE("Failed to create GridCtrl.\n");
    m_DataGrid.SetBackColor((unsigned long)RGB(255,255,255));
    m_DataGrid.SetBorderStyle((unsigned long)0);
    m_DataGrid.SetAllowRowSizing((long)1);
    m_DataGrid.ShowWindow(SW_SHOW);

    return 0;
}

void CResultView::OnSize(UINT nType, int cx, int cy)
{
    CView::OnSize(nType, cx, cy);
    
    // TODO: Add your message handler code here
    if(m_DataGrid&&m_DataGrid.m_hWnd!=NULL)
        m_DataGrid.MoveWindow(0,0,cx,cy);
}

错误提示:
Compiling...
ResultView.cpp
G:\query tool\ResultView.cpp(71) : error C2065: 'ID_DATAGRID' : undeclared identifier
执行 cl.exe 时出错.

query tool.exe - 1 error(s), 0 warning(s)
搜索更多相关主题的帖子: CResultView quot include MAP 
2008-05-02 19:10
sunkaidong
Rank: 4
来 自:南京师范大学
等 级:贵宾
威 望:12
帖 子:4496
专家分:141
注 册:2006-12-28
收藏
得分:0 
你少头文件了
#include "resource.h"

[[it] 本帖最后由 sunkaidong 于 2008-5-2 19:15 编辑 [/it]]

学习需要安静。。海盗要重新来过。。
2008-05-02 19:12
快速回复:高手帮忙解决问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015533 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved