2017年3月22日 星期三
[blog] pixnet mail自動發佈設定
2017年3月17日 星期五
[VC]How To DoDataExchange, BEGIN_MESSAGE_MAP
目的:
讓VC物件(如 edit, combo, radio等)可自動偵測變化, 如修改文字,拉捲軸等
透過VC的宣告及DoDataExchange、BEGIN_MESSAGE_MAP方法
1.宣告(.h檔)
protected:
//物件
CEdit m_EDIT_FLASHID0
CLabel m_STATIC_ERRCODE[4]; // calble物件宣告,在DoDataExchange綁定後,可直接存取物件資料,如下"ps1-1, ps1-2"
CButton m_CHECK_AUTO;// calble物件宣告,在DoDataExchange綁定後,可直接存取物件資料,如下"ps1-1, ps1-2"
//自動執行程式
afx_msg void OnRadioToggle1();
afx_msg void OnSelChangeComboCardSize();
afx_msg void OnUpdateEditFLASHID0();
private:
int m_RadioSelectIniMode;//radio單選物件
2.程式執行(.cpp檔)
//DoDataExchange 綁定物件名 DDX_Control()、DDX_Radio()
void CDlgBinGrade::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Radio(pDX, IDC_RADIO_AUTO, m_RadioSelectIniMode); //物件名IDC_RADIO_AUTO
DDX_Control(pDX, IDC_EDIT_FLASHID_0, m_EDIT_FLASHID0); // 物件名IDC_EDIT_FLASHID_0
DDX_Control(pDX, , m_EDIT_FLASHID0);
DDX_Control(pDX, IDC_STATIC_TITLE_PORT2, m_STATIC_TITLE_PORT[1]);
DDX_Control(pDX, IDC_STATIC_BB0, m_STATIC_BB[0]);
DDX_Control(pDX, IDC_STATIC_ERRCODE_PORT1, m_STATIC_ERRCODE[0]);//ps1-1
DDX_Control(pDX, IDC_CHECK_AUTO, m_CHECK_AUTO); //ps1-1,
3.加進BEGIN_MESSAGE_MAP
//-------------------------------------------------------------------------------------------------
BEGIN_MESSAGE_MAP(CdlgSettingPage2, CDialog)
ON_BN_CLICKED(IDC_RADIO_TOGGLE1, OnRadioToggle1) //物件名IDC_RADIO_TOGGLE1
ON_CBN_SELCHANGE(IDC_COMBO_CARDSIZE, OnSelChangeComboCardSize) //物件名IDC_COMBO_CARDSIZE
ON_EN_UPDATE(IDC_EDIT_FLASHID_0, OnUpdateEditFLASHID0) //物件名IDC_EDIT_FLASHID_0
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
4.程式執行
//-------------------------------------------------------------------------------------------------
void CdlgSettingPage2::OnUpdateEditFLASHID0()
{
this->m_EDIT_FLASHID0.GetWindowText(m_SPLIT_FLASH_ID.s_ID0);
//this->m_EDIT_FLASHID0.SetWindowText("0");
}
//-------------------------------------------------------------------------------------------------
void CdlgSettingPage2::OnSelChangeComboCardSize()
{
CComboBox *pComboBox;
int CurSel;
//int nIndex;
CString sTmp, str;
pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_CARDSIZE);
CurSel = pComboBox->GetCurSel();
if (CurSel == CB_ERR) {
return;
}
pComboBox->GetLBText(CurSel, str);
this->m_RDTSetting.Card_Size = atoi(str);
}
//-------------------------------------------------------------------------------------------------
void CdlgSettingPage2::OnRadioToggle1()
{
GetDlgItem(IDC_COMBO_TOGGLE1)->EnableWindow(TRUE);
GetDlgItem(IDC_COMBO_TOGGLE2)->EnableWindow(FALSE);
this->OnSelChangeComboToggle1();
}
//-------------------------------------------------------------------------------------------------
void CDlgBinGrade::ShowErrorCode(IN int ItemIndex, IN int ErrorCode)//ps1-2
{
char Buffer[16];
::sprintf(Buffer, "%.4d", ErrorCode);
this->m_STATIC_ERRCODE[ItemIndex].SetText(Buffer);
}
void CDlgBinGrade::init_BinGradeEnv()//ps1-2
{
this->m_CHECK_AUTO.SetCheck(true);
}
Best regards,
Rex Wu
Tel. (03) 552-6568#1181
Solid State System Co., Ltd.
2017年2月25日 星期六
[MAC]安全模式、重置PRAM、重新啟動
以安全模式啟動
若要以安全模式啟動:
啟動或重新啟動 Mac,然後立即按住 Shift 鍵。顯示器上會出現白色 Apple 標誌。如果沒看到 Apple 標誌,請參閱本文說明。
看到登入視窗時,放開 Shift 鍵。如果啟動磁碟已使用 FileVault 加密,系統可能會要求您登入兩次:一次是將啟動磁碟解鎖,再一次則是登入 Finder。
若要離開安全模式,請重新啟動 Mac,但不要在啟動期間按任何按鍵。
如何清 PRAM?
選擇「蘋果」選單 >「關機」。
在鍵盤上找到下列按鍵:Option、Command(⌘)、P 和 R。您需要在步驟 4 中同時按住這些按鍵。
將 Mac 開機。
立即按住 Option + Command + P + R 鍵。您必須在灰色螢幕出現之前按下此按鍵組合。
繼續按住這些鍵直到 Mac 重新開機,且您第二次聽到開機聲音為止。
放開按鍵。
Control–Command–電源按鈕
強制 Mac 重新啟動。
2017年2月13日 星期一
[VC]How to VC6++ msdev
1. Set env path
2. Dos cmd
l msdev BIN_GRADE.dsp /make "BIN_GRADE - Win32 Debug" /rebuild
l msdev BIN_GRADE.dsp /make "BIN_GRADE - Win32 Release" /rebuild
Set Env:
Cmd
Ref:
https://msdn.microsoft.com/zh-tw/library/aa699274(v=vs.60).aspx
2017年2月10日 星期五
[GIT] google cloude git on windows 7
l gcloud init
l git config credential.helper gcloud.cmd
//copy remote resource to client, folder = default
l git config --system --unset credential.helper
l gcloud source repos clone default
l push
git push google master
l clone
gcloud source repos clone default
l debug
git config credential.helper gcloud.cmd
git push origin
Config setting:
[credential]
helper = gcloud.cmd
[remote "QthToolSrc"]
url = https://source.developers.google.com/p/QthToolSrc/r/vivapro20160112
fetch = +refs/heads/*:refs/remotes/QthToolSrc/*
Code Bowser setting
https://console.cloud.google.com/code/
https://console.cloud.google.com/code/develop/repo?project=ssd-mp-ui-release
source code
https://console.cloud.google.com/code/develop/browse/default/master?project=ssd-mp-ui-release
billing:
https://console.cloud.google.com/billing/
all project preview:
https://console.cloud.google.com/iam-admin/projects?authuser=1
add folder
Delete project ;
資訊主頁->管理專案設定->
Another cmd
l git config --list
l google ssd setting
[remote "project-ssd"]
url = https://source.developers.google.com/p/project-ssd/r/default
fetch = +refs/heads/*:refs/remotes/project_ssd/*
[remote "google"]
url = https://source.developers.google.com/p/project-ssd/
fetch = +refs/heads/*:refs/remotes/google/*
my google project
https://console.cloud.google.com/iam-admin/projects
Ref:
Basic cmd
https://cloud.google.com/source-repositories/docs/adding-repositories-as-remotes
ERR: ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].
SOL: try cmd : credential.helper=gcloud.cmd
https://groups.google.com/forum/#!topic/google-cloud-sdk/8SfiaKEYXTM
Github setting python
[remote "origin"]
url = git@github.com:RealCool1983/python.git
fetch = +refs/heads/master:refs/remotes/origin/master
puttykeyfile = C:\\Users\\Rex_wu\\.ssh\\puttyKey.ppk
2017年1月2日 星期一
[MFC] CRLF, LF, consistent line endings
2016年12月29日 星期四
[GIT] google cloude git on windows 7
l gcloud init
l git config credential.helper gcloud.cmd
//copy remote resource to client, folder = default
l git config --system --unset credential.helper
l gcloud source repos clone default
l push
git push google master
l clone
gcloud source repos clone default
l debug
git config credential.helper gcloud.cmd
git push origin
Another cmd
l git config --list
l google ssd setting
[remote "project-ssd"]
url = https://source.developers.google.com/p/project-ssd/r/default
fetch = +refs/heads/*:refs/remotes/project_ssd/*
[remote "google"]
url = https://source.developers.google.com/p/project-ssd/
fetch = +refs/heads/*:refs/remotes/google/*
my google project
https://console.cloud.google.com/iam-admin/projects
Ref:
Basic cmd
https://cloud.google.com/source-repositories/docs/adding-repositories-as-remotes
ERR: ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].
SOL: try cmd : credential.helper=gcloud.cmd
https://groups.google.com/forum/#!topic/google-cloud-sdk/8SfiaKEYXTM











