本文整理汇总了C++中CCtrlEdit::GetHwnd方法的典型用法代码示例。如果您正苦于以下问题:C++ CCtrlEdit::GetHwnd方法的具体用法?C++ CCtrlEdit::GetHwnd怎么用?C++ CCtrlEdit::GetHwnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCtrlEdit
的用法示例。
在下文中一共展示了CCtrlEdit::GetHwnd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRegisterClick
void OnRegisterClick(CCtrlButton*)
{
if (GetWindowTextLength(m_pw1.GetHwnd()) != 3 || GetWindowTextLength(m_pw2.GetHwnd()) != 3) {
MessageBox(NULL, TranslateT("Please correctly specify your registration code received by SMS"), PRODUCT_NAME, MB_ICONEXCLAMATION);
return;
}
char code[10];
GetWindowTextA(m_pw1.GetHwnd(), code, 4);
GetWindowTextA(m_pw2.GetHwnd(), code + 3, 4);
string password;
ptrA cc(m_cc.GetTextA()), number(m_login.GetTextA());
if (m_proto->Register(REG_STATE_REG_CODE, string(cc), string(number), string(code), password)) {
m_proto->setString(WHATSAPP_KEY_PASS, password.c_str());
MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
}
}
示例2: DlgProc
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_FOCUSTEXTBOX:
SetFocus(m_profileName.GetHwnd());
break;
case WM_INPUTCHANGED: // when input in the edit box changes
NotifyChange();
m_btnOk.Enable(GetWindowTextLength(m_profileName.GetHwnd()) > 0);
break;
case WM_SHOWWINDOW:
if (wParam) {
m_btnOk.SetText(TranslateT("&Create"));
SendMessage(m_hwnd, WM_INPUTCHANGED, 0, 0);
}
break;
}
return CDlgBase::DlgProc(msg, wParam, lParam);
}
示例3: onOk
void onOk(CCtrlButton*)
{
if (!m_proto->icqOnline())
return;
DWORD dwUin;
uid_str szUid;
if (m_proto->getContactUid(m_hContact, &dwUin, &szUid))
return; // Invalid contact
char *szReason = GetWindowTextUtf(m_auth.GetHwnd());
m_proto->icq_sendAuthReqServ(dwUin, szUid, szReason);
SAFE_FREE((void**)&szReason);
// auth bug fix (thx Bio)
if (m_proto->m_bSsiEnabled && dwUin)
m_proto->resetServContactAuthState(m_hContact);
EndDialog(m_hwnd, 0);
}
示例4: OnInitDialog
virtual void OnInitDialog()
{
// what, no plugins?!
if (arDbPlugins.getCount() == 0) {
m_driverList.Enable(false);
m_profileName.Enable(false);
ShowWindow(m_warning.GetHwnd(), TRUE);
}
else {
for (int i = 0; i < arDbPlugins.getCount(); i++) {
DATABASELINK *p = arDbPlugins[i];
m_driverList.AddString(TranslateTS(p->szFullName), (LPARAM)p);
}
}
// default item
m_driverList.SetCurSel(0);
// subclass the profile name box
mir_subclassWindow(m_profileName.GetHwnd(), ProfileNameValidate);
// decide if there is a default profile name given in the INI and if it should be used
if (m_pd->noProfiles || (shouldAutoCreate(m_pd->ptszProfile) && _taccess(m_pd->ptszProfile, 0))) {
TCHAR *profile = _tcsrchr(m_pd->ptszProfile, '\\');
if (profile) ++profile;
else profile = m_pd->ptszProfile;
TCHAR *p = _tcsrchr(profile, '.');
TCHAR c = 0;
if (p) {
c = *p;
*p = 0;
}
m_profileName.SetText(profile);
if (c) *p = c;
}
// focus on the textbox
PostMessage(m_hwnd, WM_FOCUSTEXTBOX, 0, 0);
}