Just set islightdismissenabled property true for control. If popup is enabled and user clicks any where else the popup will be automatically disappeared.
Here the sample code to start XML programming using XML dom parser. // TestXML1.cpp : Defines the entry point for the console application. // #import #include "stdafx.h" #include #include #include //sample xml u can copy paste it in note pad and save it with .xml extension and store in location c:\ int _tmain(int argc, _TCHAR* argv[]) { CoInitialize (NULL); CComPtr< IXMLDOMDocument > pXMlDoc = NULL; HRESULT hr = CoCreateInstance(__uuidof(DOMDocument), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pXMlDoc)); VARIANT_BOOL boolval; CComVariant path ="c:\\cdcat.xml"; hr = pXMlDoc->load(path,&boolval); BSTR val ; pXMlDoc->get_xml(&val); MessageBox(0,val,_T("TEST"),0); pXMlDoc = NULL; CoUninitialize(); return 0; }
The error comes when you include winrt component in your project. To remove the error open project file of both the components and change the value of $(Platform)'== to make common in both project. I came out with error after changing the value from AnyCPU to x86.
NTSTATUS (WINAPI *RtlGetVersion)(LPOSVERSIONINFOEXW); OSVERSIONINFOEXW osInfo; *(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA( "ntdll" ), "RtlGetVersion" ); if (NULL != RtlGetVersion) { osInfo.dwOSVersionInfoSize = sizeof (osInfo); RtlGetVersion(&osInfo); } Use above method on all platform and it will work fine. Where GetOSVersionEx API deprecated by MS and gives wrong result on WIN 8.1. Tested above sample on XP to 8,1 and works for me. There is another alternative of manifest to use GetOSversionEx. Source: CodeProject
Comments