亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tipdlg.cpp

?? 一個俄羅斯方塊的vc源代碼
?? CPP
字號:
#include "stdafx.h"#include "resource.h"// CG: This file added by 'Tip of the Day' component.

#include <winreg.h>
#include <sys\stat.h>
#include <sys\types.h>

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

/////////////////////////////////////////////////////////////////////////////
// CTipDlg dialog

#define MAX_BUFLEN 1000

static const TCHAR szSection[] = _T("Tip");
static const TCHAR szIntFilePos[] = _T("FilePos");
static const TCHAR szTimeStamp[] = _T("TimeStamp");
static const TCHAR szIntStartup[] = _T("StartUp");

CTipDlg::CTipDlg(CWnd* pParent /*=NULL*/)
	: CDialog(IDD_TIP, pParent)
{
	//{{AFX_DATA_INIT(CTipDlg)
	m_bStartup = TRUE;
	//}}AFX_DATA_INIT

	// We need to find out what the startup and file position parameters are
	// If startup does not exist, we assume that the Tips on startup is checked TRUE.
	CWinApp* pApp = AfxGetApp();
	m_bStartup = !pApp->GetProfileInt(szSection, szIntStartup, 0);
	UINT iFilePos = pApp->GetProfileInt(szSection, szIntFilePos, 0);

	// Now try to open the tips file
	m_pStream = fopen("tips.txt", "r");
	if (m_pStream == NULL) 
	{
		m_strTip.LoadString(CG_IDS_FILE_ABSENT);
		return;
	} 

	// If the timestamp in the INI file is different from the timestamp of
	// the tips file, then we know that the tips file has been modified
	// Reset the file position to 0 and write the latest timestamp to the
	// ini file
	struct _stat buf;
	_fstat(_fileno(m_pStream), &buf);
	CString strCurrentTime = ctime(&buf.st_ctime);
	strCurrentTime.TrimRight();
	CString strStoredTime = 
		pApp->GetProfileString(szSection, szTimeStamp, NULL);
	if (strCurrentTime != strStoredTime) 
	{
		iFilePos = 0;
		pApp->WriteProfileString(szSection, szTimeStamp, strCurrentTime);
	}

	if (fseek(m_pStream, iFilePos, SEEK_SET) != 0) 
	{
		AfxMessageBox(CG_IDP_FILE_CORRUPT);
	}
	else 
	{
		GetNextTipString(m_strTip);
	}
}

CTipDlg::~CTipDlg()
{
	// This destructor is executed whether the user had pressed the escape key
	// or clicked on the close button. If the user had pressed the escape key,
	// it is still required to update the filepos in the ini file with the 
	// latest position so that we don't repeat the tips! 
    
	// But make sure the tips file existed in the first place....
	if (m_pStream != NULL) 
	{
		CWinApp* pApp = AfxGetApp();
		pApp->WriteProfileInt(szSection, szIntFilePos, ftell(m_pStream));
		fclose(m_pStream);
	}
}
        
void CTipDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTipDlg)
	DDX_Check(pDX, IDC_STARTUP, m_bStartup);
	DDX_Text(pDX, IDC_TIPSTRING, m_strTip);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CTipDlg, CDialog)
	//{{AFX_MSG_MAP(CTipDlg)
	ON_BN_CLICKED(IDC_NEXTTIP, OnNextTip)
	ON_WM_CTLCOLOR()
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTipDlg message handlers

void CTipDlg::OnNextTip()
{
	GetNextTipString(m_strTip);
	UpdateData(FALSE);
}

void CTipDlg::GetNextTipString(CString& strNext)
{
	LPTSTR lpsz = strNext.GetBuffer(MAX_BUFLEN);

	// This routine identifies the next string that needs to be
	// read from the tips file
	BOOL bStop = FALSE;
	while (!bStop) 
	{
		if (_fgetts(lpsz, MAX_BUFLEN, m_pStream) == NULL) 
		{
			// We have either reached EOF or enocuntered some problem
			// In both cases reset the pointer to the beginning of the file
			// This behavior is same as VC++ Tips file
			if (fseek(m_pStream, 0, SEEK_SET) != 0) 
				AfxMessageBox(CG_IDP_FILE_CORRUPT);
		} 
		else 
		{
			if (*lpsz != ' ' && *lpsz != '\t' && 
				*lpsz != '\n' && *lpsz != ';') 
			{
				// There should be no space at the beginning of the tip
				// This behavior is same as VC++ Tips file
				// Comment lines are ignored and they start with a semicolon
				bStop = TRUE;
			}
		}
	}
	strNext.ReleaseBuffer();
}

HBRUSH CTipDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
	if (pWnd->GetDlgCtrlID() == IDC_TIPSTRING)
		return (HBRUSH)GetStockObject(WHITE_BRUSH);

	return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}

void CTipDlg::OnOK()
{
	CDialog::OnOK();
	
    // Update the startup information stored in the INI file
	CWinApp* pApp = AfxGetApp();
	pApp->WriteProfileInt(szSection, szIntStartup, !m_bStartup);
}

BOOL CTipDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// If Tips file does not exist then disable NextTip
	if (m_pStream == NULL)
		GetDlgItem(IDC_NEXTTIP)->EnableWindow(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
}

void CTipDlg::OnPaint()
{
	CPaintDC dc(this); // device context for painting

	// Get paint area for the big static control
	CWnd* pStatic = GetDlgItem(IDC_BULB);
	CRect rect;
	GetClientRect(&rect);
	rect.left+=10;
	rect.right-=10;
	rect.top+=10;
	rect.bottom-=50;
	//pStatic->GetWindowRect(&rect);
	//ScreenToClient(&rect);

	// Paint the background white.
	CBrush brush;
	brush.CreateStockObject(WHITE_BRUSH);
	dc.FillRect(rect, &brush);

	// Load bitmap and get dimensions of the bitmap
	CBitmap bmp;
	bmp.LoadBitmap(IDB_LIGHTBULB);
	BITMAP bmpInfo;
	bmp.GetBitmap(&bmpInfo);

	// Draw bitmap in top corner and validate only top portion of window
	CDC dcTmp;
	dcTmp.CreateCompatibleDC(&dc);
	dcTmp.SelectObject(&bmp);
	rect.bottom = bmpInfo.bmHeight + rect.top;
	dc.BitBlt(rect.left, rect.top, rect.Width(), rect.Height(), 
		&dcTmp, 0, 0, SRCCOPY);

	// Draw out "Did you know..." message next to the bitmap
	CString strMessage;
	strMessage.LoadString(CG_IDS_DIDYOUKNOW);
	rect.left += bmpInfo.bmWidth;
	dc.DrawText(strMessage, rect, DT_VCENTER | DT_SINGLELINE);

	// Do not call CDialog::OnPaint() for painting messages
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合色综合88| 亚洲一区在线视频观看| 中日韩av电影| 美女高潮久久久| 91丝袜美女网| 欧美tk—视频vk| 亚洲国产一区视频| 成人久久久精品乱码一区二区三区| 欧美日韩1234| 亚洲黄色小说网站| 精品久久人人做人人爱| 亚洲激情在线播放| 国产高清视频一区| 日韩女优视频免费观看| 亚洲一区二区在线视频| 91亚洲精品一区二区乱码| 精品国产人成亚洲区| 天堂精品中文字幕在线| 色综合天天综合狠狠| 欧美激情综合在线| 麻豆精品一区二区综合av| 欧美日韩你懂得| 亚洲综合色视频| 色94色欧美sute亚洲线路一ni | 丁香六月综合激情| 精品av久久707| 久久精品国产一区二区三 | 日韩精品免费专区| 欧美系列一区二区| 亚洲一区二区三区爽爽爽爽爽 | 国产精品影视天天线| 欧美一级二级三级蜜桃| 日韩精品一级中文字幕精品视频免费观看 | 99视频超级精品| 中文字幕欧美激情一区| 国产成人免费视频网站| 久久精品亚洲一区二区三区浴池| 久久99精品久久久久婷婷| 日韩亚洲欧美一区| 久久成人麻豆午夜电影| 精品不卡在线视频| 国产成人亚洲综合色影视| 国产欧美日韩在线| 成人a区在线观看| 亚洲人成网站精品片在线观看| 97精品电影院| 亚洲国产va精品久久久不卡综合| 欧美天天综合网| 日本欧美肥老太交大片| 欧美一区二区播放| 国产一二三精品| 中文字幕在线免费不卡| 欧美性xxxxxx少妇| 免费在线观看一区二区三区| 久久老女人爱爱| 成人av网站大全| 亚洲国产视频在线| 日韩欧美二区三区| 成人性视频免费网站| 亚洲欧美日韩成人高清在线一区| 欧美日韩一级视频| 国产精品伊人色| 亚洲精品日产精品乱码不卡| 这里只有精品视频在线观看| 国精产品一区一区三区mba视频| 国产精品久久久久久一区二区三区 | 奇米四色…亚洲| 久久看人人爽人人| 欧美影院一区二区| 国产一区二区三区av电影| 中文字幕日韩av资源站| 51精品国自产在线| 不卡的av电影在线观看| 日韩激情中文字幕| 日韩理论电影院| 日韩免费视频线观看| 91视频精品在这里| 久久国产麻豆精品| 亚洲一线二线三线久久久| 国产三级一区二区| 欧美日韩综合不卡| 成人av在线网站| 免费一区二区视频| 一个色妞综合视频在线观看| 久久这里都是精品| 91精品国产综合久久婷婷香蕉| 成人精品一区二区三区四区| 欧美96一区二区免费视频| 亚洲人成在线观看一区二区| 精品久久久久久久人人人人传媒 | 欧美三区在线观看| 成人夜色视频网站在线观看| 奇米亚洲午夜久久精品| 亚洲影院在线观看| ...av二区三区久久精品| 亚洲精品在线免费播放| 欧美日韩国产乱码电影| 色欧美日韩亚洲| av中文字幕一区| 成人午夜视频免费看| 国产在线国偷精品产拍免费yy| 午夜婷婷国产麻豆精品| 亚洲一区二区三区激情| 亚洲素人一区二区| 国产精品久久久久久久久免费樱桃 | 婷婷中文字幕综合| 一区二区在线看| 亚洲蜜臀av乱码久久精品| 中国av一区二区三区| 欧美激情一区二区三区全黄| 精品国产乱码久久久久久牛牛| 在线综合亚洲欧美在线视频| 欧美日韩视频在线第一区| 色婷婷国产精品| 色综合久久综合网欧美综合网| 成人激情av网| 不卡的av在线| 97se亚洲国产综合自在线不卡 | 久久综合五月天婷婷伊人| 日韩女优制服丝袜电影| 日韩欧美电影一区| 欧美成人国产一区二区| 欧美成人女星排名| 久久综合九色综合97婷婷女人 | 国产精品毛片大码女人| 亚洲国产成人在线| 亚洲视频综合在线| 亚洲国产精品人人做人人爽| 天天操天天色综合| 久久精品国产久精国产| 国产福利一区在线| 99久久亚洲一区二区三区青草| 色哟哟一区二区三区| 欧美在线色视频| 日韩欧美黄色影院| 久久久久99精品国产片| 成人欧美一区二区三区黑人麻豆| 亚洲乱码国产乱码精品精98午夜 | 欧美性三三影院| 日韩一区二区三区视频| 久久综合色之久久综合| 中文字幕亚洲在| 亚洲超碰97人人做人人爱| 麻豆成人综合网| 丁香婷婷综合五月| 欧美日韩中文字幕一区二区| 欧美va亚洲va在线观看蝴蝶网| 国产欧美一区二区精品性| 亚洲免费资源在线播放| 日韩**一区毛片| 丁香天五香天堂综合| 色婷婷av一区二区三区软件| 日韩一区二区麻豆国产| 国产欧美在线观看一区| 亚洲影视在线播放| 国产老妇另类xxxxx| 91国偷自产一区二区使用方法| 日韩欧美高清dvd碟片| 亚洲乱码国产乱码精品精的特点 | 51久久夜色精品国产麻豆| 欧美极品美女视频| 亚洲国产成人精品视频| 国产成人免费视频精品含羞草妖精| 欧美亚洲国产怡红院影院| 久久亚洲精精品中文字幕早川悠里| 亚洲精品免费在线观看| 国产精品羞羞答答xxdd| 欧美人与性动xxxx| 亚洲少妇中出一区| 国产精品一区专区| 日韩区在线观看| 午夜一区二区三区在线观看| 波多野结衣的一区二区三区| 在线综合+亚洲+欧美中文字幕| 日韩毛片视频在线看| 国产精品一区在线观看你懂的| 欧美精品少妇一区二区三区| 亚洲欧美电影一区二区| 国产传媒欧美日韩成人| 日韩欧美不卡一区| 日本在线不卡一区| 欧美视频在线一区| 一区二区三区免费看视频| 粗大黑人巨茎大战欧美成人| 精品国产凹凸成av人网站| 亚欧色一区w666天堂| 欧美电影免费观看高清完整版在线| 一区二区三区免费| 97国产一区二区| 亚洲欧洲99久久| www.欧美日韩| 中文字幕一区二区三区色视频| 国产精品资源站在线| 精品嫩草影院久久| 精品写真视频在线观看| 精品久久五月天| 国产精品一区二区在线播放| 欧美精品一区二区三区高清aⅴ | 亚洲欧美国产77777| 91美女视频网站|