Updates for Toast notifications - makefile, DLLs (static), project, source

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@39808 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-05-25 19:01:32 +00:00
parent 5957711edd
commit 937e862730
6 changed files with 21 additions and 10 deletions

View file

@ -38,3 +38,5 @@ after-clean::
(rm -rf ToastNotifications/ToastNotifications/Debug)
(rm -rf ToastNotifications/ToastNotifications/Release)
(rm -rf ToastNotifications/ipch ToastNotifications/*.sdf ToastNotifications/*.suo)
(rm -rf ToastNotifications/ToastNotifications.VC.db)
(rm -rf ToastNotifications/.vs ToastNotifications/obj ToastNotifications/DTAR*)

View file

@ -348,7 +348,15 @@ HRESULT CToastNotificationsApp::CreateToast(_In_ IToastNotificationManagerStatic
_hwnd = hWnd;
ComPtr<IToastNotifier> notifier;
HRESULT hr = toastManager->CreateToastNotifierWithId(StringReferenceWrapper(AppId).Get(), &notifier);
if (SUCCEEDED(hr))
if (FAILED(hr))
{
#if defined(DEBUG)
char str[256];
sprintf_s(str, "error creating toast - status: %d", GetLastError());
OutputDebugStringA(str);
#endif
}
else
{
ComPtr<IToastNotificationFactory> factory;
hr = GetActivationFactory(StringReferenceWrapper(RuntimeClass_Windows_UI_Notifications_ToastNotification).Get(), &factory);
@ -394,7 +402,7 @@ HRESULT CToastNotificationsApp::DisplayToast(HWND hWnd, wchar_t* notificationTit
#if defined(DEBUG)
static wchar_t str[512];
swprintf_s(str, L"%s:%d: note title: %su infoText: %su", TEXT(__FUNCTION__), __LINE__, notificationTitle, notificationTitle, imagePath);
swprintf_s(str, L"%s:%d: note title: %s infoText: %s imagePath: %s", TEXT(__FUNCTION__), __LINE__, notificationTitle, notificationTitle, imagePath);
OutputDebugString(str);
#endif
@ -412,7 +420,7 @@ HRESULT CToastNotificationsApp::DisplayToast(HWND hWnd, wchar_t* notificationTit
#if defined(DEBUG)
char str[256];
sprintf_s(str, "done with toast xml and calling the toast method %d\n");
sprintf_s(str, "done with toast xml and calling the toast method");
OutputDebugStringA(str);
#endif
@ -427,8 +435,7 @@ HRESULT CToastNotificationsApp::DisplayToast(HWND hWnd, wchar_t* notificationTit
extern "C" EXPORT BOOL __cdecl sendNotification(HWND hWnd, HICON icon, SEND_NOTE_INFO_T *noteInfo)
{
//NSLog(@"%s:hWnd: %p icon: %p GUID: %p note: %p", __PRETTY_FUNCTION__, hWnd, icon, note);
AFX_MANAGE_STATE(AfxGetStaticModuleState());
#if defined(DEBUG)
static char str[512];
sprintf_s(str, "%s:%d: note %p", __FUNCTION__, __LINE__, noteInfo);
@ -485,6 +492,7 @@ extern "C" EXPORT BOOL __cdecl sendNotification(HWND hWnd, HICON icon, SEND_NOTE
extern "C" EXPORT BOOL __cdecl removeNotification(HICON icon, REMOVE_NOTE_INFO_T *noteinfo)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
#if 1 //defined(DEBUG)
static char str[512];
sprintf_s(str, "%s:%d: note %p uniqueID: %d", __FUNCTION__, __LINE__, noteinfo, noteinfo->uniqueID);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -14,22 +14,23 @@
<ProjectGuid>{5158BA99-59BA-4F4C-8D1D-8E8886EDF0BA}</ProjectGuid>
<RootNamespace>ToastNotifications</RootNamespace>
<Keyword>MFCDLLProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
<UseOfMfc>Static</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
<UseOfMfc>Static</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">