zoukankan      html  css  js  c++  java
  • resource.h student.cpp student.h

     
    resource.h
    // Student.h: interface for the CStudent class.
    //
    //////////////////////////////////////////////////////////////////////
    
    #if !defined(AFX_STUDENT_H__91A755BB_624D_4216_8D77_681DFC7FBEC3__INCLUDED_)
    #define AFX_STUDENT_H__91A755BB_624D_4216_8D77_681DFC7FBEC3__INCLUDED_
    
    #if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000
    
    class CStudent  
    {
    private:
    	CString name;
    	int score;
    public:
    	CStudent();
    	CStudent(const CString &n,const int s);
    	void display(CDC *,int,int);
    	virtual ~CStudent();
    
    };
    
    
    #endif // !defined(AFX_STUDENT_H__91A755BB_624D_4216_8D77_681DFC7FBEC3__INCLUDED_)
    

    student.h

    //{{NO_DEPENDENCIES}}
    // Microsoft Developer Studio generated include file.
    // Used by My.rc
    //
    #define IDD_ABOUTBOX                    100
    #define IDR_MAINFRAME                   128
    #define IDR_MYTYPE                      129
    #define IDD_DIALOG1                     130
    #define IDC_EDIT1                       1000
    #define IDC_EDIT2                       1002
    #define IDC_EDIT3                       1003
    #define ID_Menuitem32771                32771
    
    // Next default values for new objects
    // 
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_3D_CONTROLS                     1
    #define _APS_NEXT_RESOURCE_VALUE        132
    #define _APS_NEXT_COMMAND_VALUE         32772
    #define _APS_NEXT_CONTROL_VALUE         1004
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
    


     

    // Student.cpp: implementation of the CStudent class.
    //
    //////////////////////////////////////////////////////////////////////
    
    #include "stdafx.h"
    #include "My.h"
    #include "Student.h"
    
    #ifdef _DEBUG
    #undef THIS_FILE
    static char THIS_FILE[]=__FILE__;
    #define new DEBUG_NEW
    #endif
    
    //////////////////////////////////////////////////////////////////////
    // Construction/Destruction
    //////////////////////////////////////////////////////////////////////
    
    CStudent::CStudent()
    {
    
    }
    CStudent::CStudent(const CString &n, int s):name(n),score(s)
    	{
    	}
    
    CStudent::~CStudent()
    {
    
    }
    void CStudent::display(CDC *pDC,int x,int y)
    {
    	CString str;
    	str.Format("姓名:%s  成绩:%d",name,score);
    	pDC->TextOut(x,y,str);
    }
    

  • 相关阅读:
    加载数据量大,页面卡死解决办法
    [存档]开启window7的隐藏功能虚拟wifi
    IIS发布Asp.Net网站注意事项
    [转载]总结几种C#窗体间通讯的处理方法
    调整和删除Win7休眠文件Hiberfil.sys的方法技巧,释放系统空间! ...
    [存档]Div+Css布局中经常使用的小技巧合集
    Android AndroidManifest.xml 结构详解
    Android权限详细说明
    Activity 生命周期详解
    程序员的文采
  • 原文地址:https://www.cnblogs.com/IT-hexiang/p/4084626.html
Copyright © 2011-2022 走看看