当前位置: 首页>>代码示例>>C++>>正文


C++ CMsnProto::displayEmailCount方法代码示例

本文整理汇总了C++中CMsnProto::displayEmailCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsnProto::displayEmailCount方法的具体用法?C++ CMsnProto::displayEmailCount怎么用?C++ CMsnProto::displayEmailCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMsnProto的用法示例。


在下文中一共展示了CMsnProto::displayEmailCount方法的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;
}
开发者ID:,项目名称:,代码行数:69,代码来源:


注:本文中的CMsnProto::displayEmailCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。