91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 564KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-20
  • 語言: C/C++
  • 標簽: c++??toast??win10??

資源簡介

C++的win10發送消息通知的例子,vs程序,必須要2015以上才能運行,toast通知是用xml文件定義的,xml文件可以自己修改

資源截圖

代碼片段和文件信息

#include?“stdafx.h“
#include?“App.h“
#include?“Toast++Dlg.h“



#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif

#pragma?warning(suppress:?26433?26440)
BEGIN_MESSAGE_MAP(CToastPPApp?CWinApp)
END_MESSAGE_MAP()



class?CToastPPCommandLineInfo?:?public?CCommandLineInfo
{
public:
??//Constructors?/?Destructors
??CToastPPCommandLineInfo()?noexcept?:?m_bRegister(FALSE)
???????????????????????????????????????m_bUnRegister(FALSE)
??{
??}

??//Methods
??void?ParseParam(const?TCHAR*?lpszParam?BOOL?bFlag?BOOL?bLast)?override
??{
????if?(bFlag)
????{
??????CString?sParamUpper(lpszParam);
??????sParamUpper.MakeUpper();
??????if?(sParamUpper?==?_T(“REGSERVER“))
??????{
????????m_bRegister?=?TRUE;
????????m_bUnRegister?=?FALSE;
??????}
??????else?if?(sParamUpper?==?_T(“UNREGSERVER“))
??????{
????????m_bUnRegister?=?TRUE;
????????m_bRegister?=?FALSE;
??????}
??????else
????????__super::ParseParam(lpszParam?bFlag?bLast);
????}
????else
??????__super::ParseParam(lpszParam?bFlag?bLast);
??};

??//Member?variables
??BOOL?m_bRegister;
??BOOL?m_bUnRegister;
};



CToastPPApp::CToastPPApp()?noexcept?:?m_nExitCode(ERROR_SUCCESS)
{
}

#pragma?warning(suppress:?26426)
CToastPPApp?theApp;

BOOL?CToastPPApp::InitInstance()
{
??//Initialize?the?Windows?Runtime
??Microsoft::WRL::Wrappers::RoInitializeWrapper?winRTInitializer(RO_INIT_MULTITHREADED);
??{
????HRESULT?hr?=?winRTInitializer;
????if?(FAILED(hr))
????{
??????CString?sMsg;
??????sMsg.Format(_T(“Failed?to?initialize?Windows?Runtime?Error:0x%08X“)?hr);
??????AfxMessageBox(sMsg?MB_OK?|?MB_ICONEXCLAMATION);
??????return?FALSE;
????}

????//Get?the?executable?path
????std::wstring?sModuleName;
????hr?=?ToastPP::CManager::GetExecutablePath(sModuleName);
????if?(FAILED(hr))
????{
??????CString?sMsg;
??????sMsg.Format(_T(“Failed?to?get?executable?path?Error:0x%08X“)?hr);
??????AfxMessageBox(sMsg?MB_OK?|?MB_ICONEXCLAMATION);
??????return?FALSE;
????}

????//Parse?the?command?line
????CToastPPCommandLineInfo?cmdInfo;
????ParseCommandLine(cmdInfo);
????if?(cmdInfo.m_bRegister)
????{
??????m_nExitCode?=?RegisterCOMServer(sModuleName.c_str());
??????return?FALSE;
????}
????else?if?(cmdInfo.m_bUnRegister)
????{
??????m_nExitCode?=?UnRegisterCOMServer();
??????return?FALSE;
????}

????//Register?for?toast?notifications
????hr?=?ToastPP::CManager::RegisterForNotificationSupport(L“Toast++?Demo?App“?sModuleName.c_str()?L“Naughter.ToastPPDemoApp“?__uuidof(CToastNotificationActivationCallback));
????if?(FAILED(hr))
????{
??????CString?sMsg;
??????sMsg.Format(_T(“Failed?to?register?for?Toast?Notifications?Error:0x%08X“)?hr);
??????AfxMessageBox(sMsg?MB_OK?|?MB_ICONEXCLAMATION);
??????return?FALSE;
????}

????//Register?the?class?factories
????m_nExitCode?=?RegisterActivator();
????if?(FAILED(hr))
??????return?FALSE;

????//Bring?up?the?main?dialog
????CToastPPDlg?mainDlg;
????m_pMainWnd?=?&mainDlg;
????m

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????????21??2017-06-02?03:24??stdafx.cpp
?????文件????????1700??2017-11-30?05:46??stdafx.h
?????文件?????????917??2014-10-09?03:09??naughter.css
?????文件????????2089??2018-12-03?00:21??App.h
?????文件?????????729??2017-05-29?05:01??Resource.h
?????文件?????????314??2017-05-31?04:57??targetver.h
?????文件???????80128??2018-12-03?01:34??Toast++.h
?????文件????????1455??2018-12-02?20:37??Toast++Dlg.h
?????文件????????5549??2018-12-03?00:11??app.cpp
?????文件???????26420??2018-12-03?01:34??Toast++Dlg.cpp
?????文件???????45085??2018-12-03?03:06??Toast++.htm
?????文件????????2245??2018-12-02?23:56??Toast++Demo.sln
?????文件????????3909??2017-06-04?02:31??Toast++Demo.rc
?????文件???????18820??2018-12-02?23:56??Toast++Demo.vcxproj
?????文件????????1994??2017-05-31?05:08??Toast++Demo.vcxproj.filters
?????目錄???????????0??2018-12-03?02:14??ReleaseU\
?????文件????????3281??2017-05-28?08:10??ReleaseU\100.jpg
?????文件???????19430??2017-05-28?08:24??ReleaseU\180.jpg
?????文件???????14954??2017-05-28?08:31??ReleaseU\202.jpg
?????文件????????1278??2017-05-28?08:03??ReleaseU\64.jpg
?????文件????????1358??2017-05-28?08:23??ReleaseU\65.jpg
?????文件????????1425??2017-05-28?08:30??ReleaseU\66.jpg
?????文件????????3878??2017-05-01?04:25??ReleaseU\cancel.png
?????文件???????15875??2017-05-01?04:25??ReleaseU\Cloudy.png
?????文件???????71194??2017-05-01?04:25??ReleaseU\Food1.jpg
?????文件???????21975??2017-05-28?08:43??ReleaseU\IC601609.png
?????文件????????3440??2017-05-01?04:25??ReleaseU\message.png
?????文件???????19089??2017-05-01?04:25??ReleaseU\Mostly?Cloudy.png
?????文件????????4612??2017-05-01?04:25??ReleaseU\reminder.png
?????文件???????37484??2017-05-01?04:25??ReleaseU\RestaurantMap.jpg
?????文件????????2920??2017-05-01?04:25??ReleaseU\send.png
............此處省略7個文件信息

評論

共有 條評論