Closed 1280103995 closed 7 months ago
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow)
{
wchar_t path[MAX_PATH];
if (GetModuleFileName(hInstance, path, ARRAYSIZE(path)))
{
wchar_t* lastSlash = wcsrchr(path, L'\\');
if (lastSlash)
{
*lastSlash = L'\0'; // Truncate the path after the last slash
SetCurrentDirectory(path);
}
}
// ... the rest of your WinMain function ...
}
I added a new file
config.ini
in the DesktopToastSample. The contents are:Then I modified the
DesktopToastsSample.cpp
file,Run the program and send a Toast, exit the App, and then click on the Toast message in the Notification Center to see a blank popup .