-
Notifications
You must be signed in to change notification settings - Fork 125
/
RichTop10.cpp
executable file
·64 lines (53 loc) · 1.64 KB
/
RichTop10.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// RichTop10.cpp : implementation file
//
#include "stdafx.h"
#include "duallistdemo.h"
#include "RichTop10.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRichTop10 dialog
CRichTop10::CRichTop10(CWnd* pParent /*=NULL*/)
: CDialog(CRichTop10::IDD, pParent)
{
//{{AFX_DATA_INIT(CRichTop10)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CRichTop10::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRichTop10)
// NOTE: the ClassWizard will add DDX and DDV calls here
DDX_Text(pDX, IDC_MY_NAME, m_strName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CRichTop10, CDialog)
//{{AFX_MSG_MAP(CRichTop10)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRichTop10 message handlers
BOOL CRichTop10::OnInitDialog()
{
CDialog::OnInitDialog();
CString str[5]={
"北京市优秀赚钱员",
"北京十大杰出小青年",
"京城最酷倒卖手",
"京都捞钱大师",
"北京第一金手指"};
// TODO: Add extra initialization here
m_strMsg.Format("您的财富%ld人民币已经进入北京富人前%d名。",m_Score, m_Order);
GetDlgItem(IDC_RICH_MSG)->SetWindowText(m_strMsg);
CString fm=str[rand()%5];
m_strMsg="您还被授予“";
m_strMsg+=fm;
m_strMsg+="”。";
GetDlgItem(IDC_FAME_GET)->SetWindowText(m_strMsg);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}