Be more than mobile, reach every Windows screen
Reach millions of players across phone, PC, and Xbox One
The Internet of your things
Calling SetThemeAppProperties with argument which has flag STAP_ALLOW_CONTROLS unset causes
CoCreateInstance for Common Dialogs (or at list File Open Dialog, CLSID_FileOpenDialog) to return error 0x80040111.
Sample code is following:
CComPtr< IFileOpenDialog > pFileOpenInterface1;
CComPtr< IFileOpenDialog > pFileOpenInterface2;
hResult = ::CoCreateInstance( CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS( &pFileOpenInterface1 ) );
::SetThemeAppProperties( 0 );
hResult = ::CoCreateInstance( CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS( &pFileOpenInterface2 ) );
To make it into running code I have created (in Visual Studio 2010 Professional) a simple Win32 GUI application and added that code to menu Help|About handler.
Why is it so and how to work around that issue?
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?