本文整理汇总了C++中CMsnProto::GetMyNetID方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsnProto::GetMyNetID方法的具体用法?C++ CMsnProto::GetMyNetID怎么用?C++ CMsnProto::GetMyNetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsnProto
的用法示例。
在下文中一共展示了CMsnProto::GetMyNetID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckDlgButton
//.........这里部分代码省略.........
tSelectLen += mir_strlen(szFile);
OPENFILENAMEA ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwndDlg;
ofn.nMaxFile = _countof(szFile);
ofn.lpstrFile = szFile;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
if (GetOpenFileNameA(&ofn) != TRUE)
break;
if (strchr(szFile, ' ') != NULL) {
char tmpBuf[MAX_PATH + 2];
mir_snprintf(tmpBuf, _countof(tmpBuf), "\"%s\"", szFile);
mir_strcpy(szFile, tmpBuf);
}
SendMessage(tEditField, EM_SETSEL, 0, tSelectLen);
SendMessageA(tEditField, EM_REPLACESEL, TRUE, LPARAM(szFile));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
}
break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) {
bool reconnectRequired = false;
TCHAR screenStr[MAX_PATH];
char password[100], szEmail[MSN_MAX_EMAIL_LEN];
DBVARIANT dbv;
CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, _countof(szEmail));
if (mir_strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
reconnectRequired = true;
mir_strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
proto->setDword("netId", (proto->MyOptions.netId = proto->GetMyNetID()));
}
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, _countof(password));
if (!proto->getString("Password", &dbv)) {
if (mir_strcmp(password, dbv.pszVal)) {
reconnectRequired = true;
proto->setString("Password", password);
}
db_free(&dbv);
}
else {
reconnectRequired = true;
proto->setString("Password", password);
}
#ifdef OBSOLETE
GetDlgItemText(hwndDlg, IDC_HANDLE2, screenStr, _countof(screenStr));
if (!proto->getTString("Nick", &dbv)) {
if (mir_tstrcmp(dbv.ptszVal, screenStr))
proto->MSN_SendNickname(screenStr);
db_free(&dbv);
}
else proto->MSN_SendNickname(screenStr);
BYTE mblsnd = IsDlgButtonChecked(hwndDlg, IDC_MOBILESEND) == BST_CHECKED;
if (mblsnd != proto->getByte("MobileAllowed", 0)) {
proto->msnNsThread->sendPacket("PRP", "MOB %c", mblsnd ? 'Y' : 'N');
proto->MSN_SetServerStatus(proto->m_iStatus);
}
unsigned tValue = IsDlgButtonChecked(hwndDlg, IDC_DISABLE_ANOTHER_CONTACTS);
if (tValue != proto->msnOtherContactsBlocked && proto->msnLoggedIn) {
proto->msnOtherContactsBlocked = tValue;
proto->msnNsThread->sendPacket("BLP", tValue ? "BL" : "AL");
proto->MSN_ABUpdateAttr(NULL, "MSN.IM.BLP", tValue ? "0" : "1");
break;
}
#endif
proto->setByte("SendFontInfo", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDFONTINFO));
proto->setByte("RunMailerOnHotmail", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_RUN_APP_ON_HOTMAIL));
proto->setByte("ManageServer", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MANAGEGROUPS));
GetDlgItemText(hwndDlg, IDC_MAILER_APP, screenStr, _countof(screenStr));
proto->setTString("MailerPath", screenStr);
if (reconnectRequired && proto->msnLoggedIn)
MessageBox(hwndDlg,
TranslateT("The changes you have made require you to reconnect to the MSN Messenger network before they take effect"),
TranslateT("MSN Options"), MB_OK);
proto->LoadOptions();
return TRUE;
}
break;
}
return FALSE;
}
示例2: DlgProcAccMgrUI
static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
CMsnProto* proto = (CMsnProto*)lParam;
SetDlgItemTextA(hwndDlg, IDC_HANDLE, proto->MyOptions.szEmail);
char tBuffer[MAX_PATH];
if (!db_get_static(NULL, proto->m_szModuleName, "Password", tBuffer, sizeof(tBuffer))) {
tBuffer[16] = 0;
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
}
SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETLIMITTEXT, 16, 0);
DBVARIANT dbv;
if (!proto->getTString("Place", &dbv)) {
SetDlgItemText(hwndDlg, IDC_PLACE, dbv.ptszVal);
db_free(&dbv);
}
}
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDC_NEWMSNACCOUNTLINK) {
Utils_OpenUrl("https://signup.live.com");
return TRUE;
}
if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
switch (LOWORD(wParam)) {
case IDC_HANDLE:
case IDC_PASSWORD:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) {
char password[100], szEmail[MSN_MAX_EMAIL_LEN];
DBVARIANT dbv;
CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, _countof(szEmail));
if (mir_strcmp(szEmail, proto->MyOptions.szEmail)) {
mir_strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
proto->setDword("netId", (proto->MyOptions.netId = proto->GetMyNetID()));
}
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, _countof(password));
if (!proto->getString("Password", &dbv)) {
if (mir_strcmp(password, dbv.pszVal))
proto->setString("Password", password);
db_free(&dbv);
}
else proto->setString("Password", password);
TCHAR szPlace[64];
GetDlgItemText(hwndDlg, IDC_PLACE, szPlace, _countof(szPlace));
if (szPlace[0])
proto->setTString("Place", szPlace);
else
proto->delSetting("Place");
return TRUE;
}
break;
}
return FALSE;
}