How can I use the ID2D1DeviceContext interface in an MFC Direct2D application?
I am using Direct2D in a Visual C++ (Visual Studio 2022) MFC application that uses many of the Direct2D MFC classes. I need to use the ID2D1DeviceContext interface for various purposes. The MFC classes force you to use either ID2D1HwndRenderTarget or…
Disabling autocompletion from anything else than Tab in VS 2022
Although I set "Default IntelliSense completion mode" to Tab-only in Text Editor/Advanced, Visual Studio keeps replacing text as I type with its first suggestion when I press e.g. space or dot. I do not want the editor to ever autocomplete…
Issues with GetAppLicenseAsync in MFC C++ Application.
In the application, there is an MFC project and a Windows Runtime Component (Universal Windows) project, see my previous question…
Visual Studio 2019 Unable to start program, the system cannot find the file specified
I am having a similar issue as this post. However, on build I have 0 errors, 0 warning, and 0 messages. I took a look at Project -> Properties but I do not seem to have a linker option (which appears to be a typical fix that others have used to…
Win32 Console Input: How to differentiate between 0xE0 as a Start-Of-Sequence and 0xE0 as the 1st byte of a UTF-8 sequence/as a codepage character?
I use _getch() for reading input character by character, but there seems to be no way to tell whether the next character still belongs to the last read character or not. It seems that there is no way to tell if a 0xE0 is the 1st of two bytes in a…
When this call AddPackageByUriAsync could fail?
Hi, I am trying to create an application in the mode of 'package with external location'. Now if we go via this mode, we need to fetch the package identity during runtime, right? So, the API that has been provided is AddPackageByUriAsync . I am…
How to get policy value after set?
Hi, Is there a way to check if the state has been assigned? I tried this but the return value of v=11 DWMNCRENDERINGPOLICY v; auto k = DwmGetWindowAttribute(hwnd, DWMWA_NCRENDERING_POLICY, &v, 4); <- v return 11. BOOL v; auto k =…
'SysListView32' Bug with multiple items selection: still not fixed in Windows 11 23H2
When I use our own 32 bit application, the mouse cursor still jumps to a corner when I do the lasso selection in a listview (click and drag a rectangle to select multiple listview items). From what I've found in the internet, the program might use a…
How to make XAudio2 throw a Device Lost flag/error?
Hi, I was wondering how I can produce a Device Lost message for XAudio2. I tried using the dxcaps -forcetdr command in the Developer Command Prompt window for Visual Studio, but it did not work. I am using C++ and programming for Windows 10. Derek
Issues with RequestPurchaseAsync in MFC C++ Application
An app has been published in the Partner Center, and an addon submission has been created. This is the addon subscription overview. In the application, there is an MFC project and a Windows Runtime Component (Universal Windows) project, as depicted…
Understanding the MFC File Explorer project generated by the Visual Studio application wizard
I recently asked Visual Studio 2019 to create a new project using the File Explorer template. After some support from this group, I was able to get to the point that I was able to navigate through the files system and see the content in the list…
System.AccessViolationException when adding a new item in Visual Studio using IVsProject.AddItem
I'm encountering a System.AccessViolationException while working in Visual Studio 2022. The error occurs specifically when I try to add a new UI or CLR item to a project using the IVsProject.AddItem() method. Below is the full exception log: Aplicación:…
Why is the code #import "a.exe" causing a compiler error C1084?
I have inherited some old code and I am trying to compile it in VS 2019. I am getting a compiler error that complains about this line: #import "C:\usr\tyx\com\PublishersIO.exe" no_namespace The error is: 2>c:\users\jew\onedrive -…
Decryption failure error with crypt32.dll, CertGetSubjectCertificateFromStore API
We have an application which transfer EDI documents using AS2 protocol where when our business partner and send data to us, we can’t decrypt it. We are reading the certificate from windows certificate store using CertGetSubjectCertificateFromStore api…
Registry returns wrong value by UWP full trust process
In my UWP app I have a full trust WinForm process that provides system tray icon and full trust functionality such as working with Registry and File System. I noticed that the full trust process gets wrong Registry HKCU values - not the values I see in…
Use otf/ tff for font in WinUI
Is it possible to use these files for fonts in C++. I've tried the c# examples but it doesn't seem to work?! https://stackoverflow.com/questions/70371593/how-do-i-change-the-default-font-of-my-winui-application
how to read txt file which has char or unicode ?
I can not use std::fstream right? If I set locale I can not read normal char If I do not set it I can not read unicode bytes.
the bitmap was blank which create from duplication?
I create bitmap from desktop duplication but it is blank of black. hr = dxgiOutputDuplication->AcquireNextFrame(500, &frame_info1, &resource); ID3D11Texture2D* texture1 = NULL; hr = resource->QueryInterface(__uuidof(ID3D11Texture2D),…
CreateProcess on notepad.exe fails due to a crash in ApiSetHost.AppExecutionAlias.dll
Hi guys, First time I do a question here so hope it is in the right format. We have encountered a problem in which when calling CreateProcess() on notepad.exe fails due to a crash in ApiSetHost.AppExecutionAlias.dll. While have a couple of settings in…
Visual Studio: 'Value cannot be null. Parameter name: obj' when opening or building a .vcproj project
I'm trying to build a legacy project (dbgen) from the TPC-H tools suite using Visual Studio 2022 from my assignmentInstallation guide from my assignment, but I keep running into an error: "Value cannot be null. Parameter name: obj". error…