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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tidedlg.cpp

?? 上海石洞口潮汐預測程序的MFC實現
?? CPP
字號:
// TideDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Tide.h"
#include "TideDlg.h"
#include "Calender.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTideDlg dialog

CTideDlg::CTideDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CTideDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CTideDlg)
	m_time = -1;
	m_year = 0;
	m_month = 0;
	m_day = 0;
	m_height1 = _T("");
	m_time1 = _T("");
	m_time2 = _T("");
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CTideDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTideDlg)
	DDX_Control(pDX,IDC_FORECAST_BTN,m_forecastBtn);
	DDX_Control(pDX,IDC_EXIT_BTN,m_exitBtn);
	DDX_DateTimeCtrl(pDX, IDC_DATETIMEPICKER1, m_time);
	DDX_Text(pDX, IDC_EDIT1, m_year);
	DDX_Text(pDX, IDC_EDIT2, m_month);
	DDX_Text(pDX, IDC_EDIT3, m_day);
	DDX_Text(pDX, IDC_HEIGHT1_EDIT, m_height1);
	DDX_Text(pDX, IDC_TIME1_EDIT, m_time1);
	DDX_Text(pDX, IDC_TIME2_EDIT, m_time2);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CTideDlg, CDialog)
	//{{AFX_MSG_MAP(CTideDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_EXIT_BTN, OnExitBtn)
	ON_BN_CLICKED(IDC_FORECAST_BTN, OnForecastBtn)
	ON_WM_CTLCOLOR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTideDlg message handlers

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

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	m_forecastBtn.OffsetColor(CButtonST::BTNST_COLOR_BK_IN, 30);
	m_forecastBtn.SetBkColor(RGB(252,189,252));
	m_forecastBtn.SetRounded(TRUE);
	m_forecastBtn.SetTooltipText(_T("預報"));

	m_exitBtn.OffsetColor(CButtonST::BTNST_COLOR_BK_IN, 30);
	m_exitBtn.SetBkColor(RGB(252,189,252));
	m_exitBtn.SetRounded(TRUE);
	m_exitBtn.SetTooltipText(_T("預報"));
	

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

void CTideDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CTideDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CTideDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CTideDlg::OnExitBtn() 
{
	// TODO: Add your control notification handler code here
	OnOK();
}

void CTideDlg::OnForecastBtn() 
{
	// TODO: Add your control notification handler code here
	UpdateData();

	struct myDATE m_date,m_lunarDate;//定義兩個myDATE類型的對象,一個存儲陽歷日期,一個存儲陰日期

	m_date.year=m_time.GetYear();
	m_date.month=m_time.GetMonth();
	m_date.day=m_time.GetDay();//將當前日期存儲到m_date中
	m_lunarDate=m_calender.Lunar(m_date);//將當前日期的陰歷日期存儲到m_lunarDate中

	//顯示農歷日期
	m_year=m_lunarDate.year;//農歷的年
	m_month=m_lunarDate.month;//農歷的月
	m_day=m_lunarDate.day;//農歷的天

	//x是初一的第一次漲潮時間,要得到不同地區的預報,只需修改此處的值就可以
	//y是初一的第二次漲潮時間,要得到不同地區的預報,只需修改此處的值就可以
	float x=4.5;//小數點后面為60進制;因為1小時是60分,0.15為9分鐘
	float y=17;
	float time;//用于存儲預測后的時間
	int hour1,hour2,minute;//x用于存儲小時,z用于存儲分鐘
	CString str1,str2,str,str_t1,str_t2;//
	if(m_day==1)
	{
		//將第一次漲潮的時間計算后,轉換成字符串的形式,存儲在str_t1中
		time=x;//計算漲潮時間,在此處直接得到,后面須計算
		hour1=(int)time;//得到漲潮時間的小時部分
		str1.Format("%d",hour1);//存儲漲潮時間的小時部分
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);//用于存儲漲潮時間的分鐘部分
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//將第二次漲潮的時間計算后,轉換成字符串的形式,存儲在str_t2中
		time=y;
		hour2=(int)time;
		str1.Format("%d",hour2);//用于存儲漲潮時間的小時部分
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day>1&&m_day<11)
	{
		time=(m_day*0.6-1.2)+x;//計算漲潮時間
		hour1=(int)time;//得到漲潮時間的小時部分
		str1.Format("%d",hour1);//存儲漲潮時間的小時部分
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=(m_day*0.8-1.6)+y;
		hour2=(int)time;
		str1.Format("%d",hour2);//用于存儲漲潮時間的小時部分
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day>10&&m_day<16)
	{
		time=(m_day*0.8-1.2)+x;
		hour1=(int)time;
		if(hour1>24)
			hour1-=24;
		str1.Format("%d",hour1);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=(m_day*0.8-0.8)+y;
		hour2=(int)time;
		if(hour2>24)
			hour2-=24;
		str1.Format("%d",hour2);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day==16)
	{
		time=x;
		hour1=(int)time;
		str1.Format("%d",hour1);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=y;
		hour2=(int)time;
		str1.Format("%d",hour2);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day>16&&m_day<22)
	{
		time=(m_day*0.8-1.8)+x;
		hour1=(int)time;
		if(hour1>24)
			hour1-=24;
		str1.Format("%d",hour1);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=(m_day*0.8-1.8)+y;
		hour2=(int)time;
		if(hour2>24)
			hour2-=24;
		str1.Format("%d",hour2);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day>21&&m_day<26)
	{
		time=(m_day*0.8-2.2)+x;
		hour1=(int)time;
		if(hour1>24)
			hour1=hour1-24;
		str1.Format("%d",hour1);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=(m_day*0.8-2.2)+y;
		hour2=(int)time;
		if(hour2>24)
			hour2=hour2-24;
		str1.Format("%d",hour2);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	else if(m_day>25&&m_day<31)
	{
		time=m_day*0.8+x;
		hour1=(int)time;
		if(hour1>24)
			hour1-=24;
		str1.Format("%d",hour1);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t1.Format("%s:%s",str1,str2);

		//the second tide
		time=m_day*0.8+y;
		hour2=(int)time;
		if(hour2>24)
			hour2-=24;
		str1.Format("%d",hour2);
		time=time*100;
		minute=int((int)(time)%100*0.6);
		if(minute<10)
		{
			str2.Format("0%d",minute);
		}
		else
			str2.Format("%d",minute);
		str_t2.Format("%s:%s",str1,str2);

		if(hour1<hour2)
		{
			m_time1=str_t1;
			m_time2=str_t2;
		}
		else
		{
			m_time1=str_t2;
			m_time2=str_t1;
		}
	}
	
	UpdateData(false);
}

HBRUSH CTideDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	
	// TODO: Change any attributes of the DC here
	/*if(nCtlColor==CTLCOLOR_LISTBOX)
	{
		pDC->SetTextColor(RGB(233,233,220));
		//pDC->SetBkColor(RGB(233,233,220));
		HBRUSH h=CreateSolidBrush(RGB(233,233,220));
		return h;
	}
	else if(nCtlColor==CTLCOLOR_STATIC)
	{
	}
	else if(nCtlColor==CTLCOLOR_DLG)
	{
		pDC->SetTextColor(RGB(0,0,0));
		pDC->SetBkColor(RGB(160,180,220));
		HBRUSH h=CreateSolidBrush(RGB(160,180,220));
		return h;
	}
*/

	// TODO: Return a different brush if the default is not desired
	return hbr;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线免费播放| 香蕉久久夜色精品国产使用方法 | 美国十次综合导航| 日韩欧美一二三四区| 久久精品国产一区二区三| 久久久av毛片精品| 99精品欧美一区二区蜜桃免费| 亚洲激情自拍偷拍| 欧美精品粉嫩高潮一区二区| 美女精品一区二区| 久久久久久久久免费| 99在线精品视频| 亚洲国产视频直播| 日韩欧美亚洲国产另类| 国产ts人妖一区二区| 亚洲欧美日韩电影| 欧美精品在线一区二区三区| 韩国av一区二区| 亚洲欧洲成人自拍| 欧美精品自拍偷拍| 国产成人精品影院| 一区二区激情视频| 日韩欧美成人激情| 99精品在线免费| 男人的天堂亚洲一区| 欧美国产一区二区| 精品1区2区3区| 国产一区在线精品| 亚洲天堂中文字幕| 亚洲天堂中文字幕| 欧美视频中文字幕| 美国十次综合导航| 中文字幕字幕中文在线中不卡视频| 欧美日韩dvd在线观看| 国产一区二区伦理片| 亚洲精品大片www| 精品欧美黑人一区二区三区| 91色|porny| 免费成人在线播放| 亚洲欧美一区二区三区久本道91| 日韩一级大片在线| 一本一道久久a久久精品| 毛片一区二区三区| 亚洲欧美在线另类| 欧美www视频| 日本韩国欧美三级| 国产在线国偷精品产拍免费yy| 一区二区三区中文字幕电影 | 91久久精品一区二区三| 另类中文字幕网| 亚洲人成网站精品片在线观看| 日韩一区二区精品| 91在线视频免费91| 国产尤物一区二区| 午夜精品一区在线观看| 国产精品国产三级国产| 91精品在线观看入口| 91视频免费观看| 亚洲五码中文字幕| 国产精品久久毛片a| 日韩一区二区三区四区| 色婷婷综合久久久久中文| 国产成人综合在线观看| 日韩影院免费视频| 亚洲欧美日韩中文字幕一区二区三区 | 欧美高清www午色夜在线视频| 成人免费视频app| 国内欧美视频一区二区| 亚洲成人手机在线| 亚洲欧美一区二区不卡| 日本一区二区成人在线| 日韩一区二区三区免费观看| 欧美视频在线播放| 99久久国产综合精品女不卡| 国产精品一区在线观看乱码| 免费观看91视频大全| 亚洲午夜久久久久久久久久久| 国产亚洲婷婷免费| 精品乱人伦小说| 日韩一区二区三区免费看 | 奇米精品一区二区三区四区| 一区二区在线观看不卡| 国产精品每日更新| 久久精品在线免费观看| 精品乱码亚洲一区二区不卡| 91 com成人网| 欧美日韩国产一二三| 91欧美一区二区| 不卡一区二区在线| 国产成人在线视频网站| 激情欧美一区二区| 老司机免费视频一区二区三区| 午夜久久久久久| 亚洲自拍偷拍网站| 亚洲理论在线观看| 亚洲人成精品久久久久| 亚洲色图欧美偷拍| 综合电影一区二区三区| 国产精品每日更新| 国产精品无遮挡| 国产精品日产欧美久久久久| 国产日韩欧美一区二区三区乱码 | 国产ts人妖一区二区| 国产九色sp调教91| 狠狠狠色丁香婷婷综合激情| 精品一区二区久久久| 精品一区二区三区欧美| 国产在线视视频有精品| 国产在线不卡一区| 国产福利电影一区二区三区| 国产乱码字幕精品高清av| 国产伦精品一区二区三区免费迷 | 亚洲妇女屁股眼交7| 亚洲国产精品久久一线不卡| 亚洲一区二区在线免费看| 亚洲一级片在线观看| 亚洲午夜久久久久久久久久久| 亚洲午夜羞羞片| 视频精品一区二区| 日本va欧美va精品发布| 久久99精品国产.久久久久| 久草中文综合在线| 国产精品一品二品| 国产91精品入口| 99国产精品视频免费观看| 一本大道久久a久久综合| 在线观看av不卡| 欧美精品在线视频| 日韩理论片在线| 亚洲免费av网站| 丝袜美腿亚洲色图| 九九**精品视频免费播放| 国产一区二区在线免费观看| 成人在线一区二区三区| 91在线精品秘密一区二区| 欧美亚洲自拍偷拍| 91精品免费观看| 久久久国产一区二区三区四区小说 | 国产视频一区二区三区在线观看| 国产欧美1区2区3区| 亚洲欧美偷拍卡通变态| 午夜精品国产更新| 精品一区二区三区欧美| 成人激情午夜影院| 欧美网站一区二区| 日韩精品中文字幕一区| 国产精品久久网站| 亚洲18影院在线观看| 国产在线播精品第三| 91一区二区三区在线播放| 欧美二区乱c少妇| 久久精品视频在线看| 亚洲三级久久久| 日韩 欧美一区二区三区| 国产一区二区女| 91福利精品视频| 日韩欧美一区二区久久婷婷| 国产精品久久毛片av大全日韩| 亚洲国产精品一区二区尤物区| 国模一区二区三区白浆| 91在线视频免费91| 欧美一二三四区在线| 国产精品久久久久久久久图文区| 亚州成人在线电影| 国产成人无遮挡在线视频| 欧美色综合天天久久综合精品| 精品剧情在线观看| 亚洲黄色录像片| 男人操女人的视频在线观看欧美| av综合在线播放| 日韩一级在线观看| 亚洲特级片在线| 九色|91porny| 欧美性受xxxx黑人xyx性爽| 久久免费视频色| 午夜视频久久久久久| 国产不卡视频一区二区三区| 欧美日韩精品久久久| 国产女同互慰高潮91漫画| 日韩精品福利网| 97精品超碰一区二区三区| 欧美大度的电影原声| 亚洲免费观看高清完整版在线观看| 精品在线免费视频| 欧美亚洲一区二区在线| 国产欧美日韩中文久久| 丝袜国产日韩另类美女| 91在线视频在线| 久久久久久久久一| 日本美女一区二区三区视频| 91在线免费看| 国产日产欧美一区二区三区| 日本欧洲一区二区| 一本久久综合亚洲鲁鲁五月天 | 日本亚洲最大的色成网站www| 成人av动漫在线| 久久久蜜桃精品| 久久精品国产一区二区| 欧美日韩国产三级| 亚洲精品成人天堂一二三|