本文整理汇总了C++中CCtrlEdit::Enable方法的典型用法代码示例。如果您正苦于以下问题:C++ CCtrlEdit::Enable方法的具体用法?C++ CCtrlEdit::Enable怎么用?C++ CCtrlEdit::Enable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCtrlEdit
的用法示例。
在下文中一共展示了CCtrlEdit::Enable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAuthClicked
void OnAuthClicked(CCtrlButton*)
{
DWORD flags = CallProtoServiceInt(NULL, m_acs.szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
m_authReq.Enable(false);
else
m_authReq.Enable(m_chkAuth.Enabled());
}
示例2: OnRequestClick
void OnRequestClick(CCtrlButton*)
{
if (IDYES != MessageBox(NULL, TranslateT(szAskSendSms), PRODUCT_NAME, MB_YESNO))
return;
ptrA cc(m_cc.GetTextA()), number(m_login.GetTextA());
string password;
if (m_proto->Register(REG_STATE_REQ_CODE, string(cc), string(number), string(), password)) {
if (!password.empty()) {
MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
m_proto->setString(WHATSAPP_KEY_PASS, password.c_str());
}
else {
m_pw1.Enable(); // unblock sms code entry field
m_pw2.Enable();
}
}
}
示例3: 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);
}
示例4: OnInitDialog
void OnInitDialog()
{
char szUin[10];
Window_SetSkinIcon_IcoLib(m_hwnd, SKINICON_OTHER_ADDCONTACT);
if (m_acs.handleType == HANDLE_EVENT) {
DWORD dwUin;
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = sizeof(DWORD);
dbei.pBlob = (PBYTE)&dwUin;
db_event_get(m_acs.hDbEvent, &dbei);
_ltoa(dwUin, szUin, 10);
m_acs.szProto = dbei.szModule;
}
MCONTACT hContact;
TCHAR *szName = NULL, *tmpStr = NULL;
if (m_acs.handleType == HANDLE_CONTACT)
szName = cli.pfnGetContactDisplayName(hContact = m_acs.hContact, 0);
else {
int isSet = 0;
hContact = 0;
if (m_acs.handleType == HANDLE_EVENT) {
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = db_event_getBlobSize(m_acs.hDbEvent);
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
db_event_get(m_acs.hDbEvent, &dbei);
hContact = *(MCONTACT*)(dbei.pBlob + sizeof(DWORD));
mir_free(dbei.pBlob);
if (hContact != INVALID_CONTACT_ID) {
szName = cli.pfnGetContactDisplayName(hContact, 0);
isSet = 1;
}
}
if (!isSet)
{
if (m_acs.handleType == HANDLE_EVENT)
szName = mir_a2t(szUin);
else
{
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->id);
if (!szName)
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->nick);
}
}
}
if (szName && szName[0])
SetCaption(CMString(FORMAT, TranslateT("Add %s"), szName));
else
SetCaption(TranslateT("Add contact"));
mir_free(tmpStr);
if (m_acs.handleType == HANDLE_CONTACT && m_acs.hContact)
if (m_acs.szProto == NULL || (m_acs.szProto != NULL && *m_acs.szProto == 0))
m_acs.szProto = GetContactProto(m_acs.hContact);
int groupSel = 0;
ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
TCHAR *grpName;
for (int groupId = 1; (grpName = Clist_GroupGetName(groupId, NULL)) != NULL; groupId++) {
int id = m_group.AddString(grpName, groupId);
if (!mir_tstrcmpi(tszGroup, grpName))
groupSel = id;
}
m_group.InsertString(TranslateT("None"), 0);
m_group.SetCurSel(groupSel);
// By default check both checkboxes
m_chkAdded.SetState(true);
m_chkAuth.SetState(true);
// Set last choice
if (db_get_b(NULL, "Miranda", "AuthOpenWindow", 1))
m_chkOpen.SetState(true);
DWORD flags = (m_acs.szProto) ? CallProtoServiceInt(NULL, m_acs.szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
if (flags & PF4_FORCEADDED) // force you were added requests for this protocol
m_chkAdded.Enable(false);
if (flags & PF4_FORCEAUTH) // force auth requests for this protocol
m_chkAuth.Enable(false);
if (flags & PF4_NOCUSTOMAUTH)
m_authReq.Enable(false);
else {
m_authReq.Enable(m_chkAuth.Enabled());
m_authReq.SetText(TranslateT("Please authorize my request and add me to your contact list."));
}
}
示例5: OnInitDialog
virtual void OnInitDialog()
{
m_pw1.SendMsg(EM_LIMITTEXT, 3, 0); m_pw1.Enable(false);
m_pw2.SendMsg(EM_LIMITTEXT, 3, 0); m_pw2.Enable(false);
}