本文整理汇总了C++中CMsnProto::MSN_HContactFromEmail方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsnProto::MSN_HContactFromEmail方法的具体用法?C++ CMsnProto::MSN_HContactFromEmail怎么用?C++ CMsnProto::MSN_HContactFromEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsnProto
的用法示例。
在下文中一共展示了CMsnProto::MSN_HContactFromEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DlgProcHotmailPopupOpts
static INT_PTR CALLBACK DlgProcHotmailPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bEnabled;
CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
bEnabled = false;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
proto = (CMsnProto*)lParam;
CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILPOPUP, proto->getByte("DisableHotmail", 0) ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILTRAY, proto->getByte("DisableHotmailTray", 1) ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton(hwndDlg, IDC_DISABLEHOTMAILCL, proto->getByte("DisableHotmailCL", 0) ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton(hwndDlg, IDC_DISABLEHOTJUNK, proto->getByte("DisableHotmailJunk", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_NOTIFY_ENDSESSION, proto->getByte("EnableSessionPopup", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_NOTIFY_FIRSTMSG, proto->getByte("EnableDeliveryPopup", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ERRORS_USING_POPUPS, proto->getByte("ShowErrorsAsPopups", 0) ? BST_CHECKED : BST_UNCHECKED);
bEnabled = true;
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_DISABLEHOTMAILPOPUP:
case IDC_DISABLEHOTMAILTRAY:
case IDC_DISABLEHOTMAILCL:
case IDC_DISABLEHOTJUNK:
case IDC_NOTIFY_ENDSESSION:
case IDC_NOTIFY_FIRSTMSG:
case IDC_ERRORS_USING_POPUPS:
if (bEnabled)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
break;
case WM_NOTIFY: //Here we have pressed either the OK or the APPLY button.
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_RESET:
proto->LoadOptions();
return TRUE;
case PSN_APPLY:
proto->MyOptions.ShowErrorsAsPopups = IsDlgButtonChecked(hwndDlg, IDC_ERRORS_USING_POPUPS) != 0;
proto->setByte("ShowErrorsAsPopups", proto->MyOptions.ShowErrorsAsPopups);
proto->setByte("DisableHotmail", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILPOPUP) ? FALSE : TRUE);
proto->setByte("DisableHotmailCL", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILCL) ? FALSE : TRUE);
proto->setByte("DisableHotmailTray", IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTMAILTRAY) ? FALSE : TRUE);
proto->setByte("DisableHotmailJunk", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DISABLEHOTJUNK));
proto->setByte("EnableDeliveryPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_FIRSTMSG));
proto->setByte("EnableSessionPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_ENDSESSION));
MCONTACT hContact = proto->MSN_HContactFromEmail(proto->MyOptions.szEmail);
if (hContact)
proto->displayEmailCount(hContact);
return TRUE;
}
break;
}
break;
}
return FALSE;
}