3,755 questions with C++-related tags

Sort by: Updated
0 answers

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…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,176 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-11-02T11:31:51.59+00:00
simonx 126 Reputation points
edited a comment 2024-11-03T01:28:05.1233333+00:00
Darran Rowe 1,026 Reputation points
3 answers One of the answers was accepted by the question author.

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…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,176 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-06-18T09:34:12.84+00:00
Coco_l_asticot 20 Reputation points
commented 2024-11-01T20:35:33.68+00:00
Nemat Soleimani 0 Reputation points
0 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
344 questions
asked 2024-10-31T21:24:39.75+00:00
Ming Yu 20 Reputation points
commented 2024-11-01T15:59:20.42+00:00
Ming Yu 20 Reputation points
3 answers One of the answers was accepted by the question author.

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2021-07-18T04:08:16.47+00:00
Isaac Tait 21 Reputation points
commented 2024-11-01T07:53:36.5966667+00:00
Morteza Baghlane 0 Reputation points
1 answer

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-28T21:25:39.0133333+00:00
RobinLe 0 Reputation points
answered 2024-10-31T15:23:56.9033333+00:00
Darran Rowe 1,026 Reputation points
2 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-04-16T06:13:17.4366667+00:00
Rohan Pande 445 Reputation points
answered 2024-10-30T18:28:42.3233333+00:00
Ryan Knuth (MSFT) 0 Reputation points Microsoft Employee
1 answer

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 =…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-24T08:01:21.67+00:00
D.D.K-2637 966 Reputation points
commented 2024-10-30T12:06:48.6933333+00:00
D.D.K-2637 966 Reputation points
0 answers

'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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,847 questions
asked 2024-10-16T14:45:32.1733333+00:00
HenningD 0 Reputation points
commented 2024-10-29T06:50:44.8966667+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
1 answer

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

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-01T02:15:50.39+00:00
Derek Todd 0 Reputation points
commented 2024-10-29T06:47:38.32+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
344 questions
asked 2024-10-17T17:29:05.5766667+00:00
Ming Yu 20 Reputation points
accepted 2024-10-29T04:33:35.9+00:00
Ming Yu 20 Reputation points
0 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-28T19:46:49.2133333+00:00
semicode 20 Reputation points
commented 2024-10-29T03:03:54.4333333+00:00
semicode 20 Reputation points
2 answers One of the answers was accepted by the question author.

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:…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,176 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
337 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,166 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,847 questions
asked 2024-10-16T21:32:58.7566667+00:00
Julius 20 Reputation points
accepted 2024-10-28T18:06:14.2033333+00:00
Julius 20 Reputation points
1 answer

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 -…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-17T16:25:28.3566667+00:00
Michael Jew 0 Reputation points
commented 2024-10-28T09:40:19.64+00:00
RLWA32 45,691 Reputation points
0 answers

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…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-25T09:51:58.47+00:00
Mehul Donga 0 Reputation points
commented 2024-10-28T03:03:43.4533333+00:00
Jeanine Zhang-MSFT 9,766 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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…

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-17T22:10:58.84+00:00
60856927 66 Reputation points
edited the question 2024-10-28T02:07:20.0233333+00:00
Jack J Jun 24,516 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

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

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
791 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2022-06-17T19:29:57.743+00:00
youki 1,021 Reputation points
commented 2024-10-27T07:55:01.6766667+00:00
Everett Lee 21 Reputation points
0 answers

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.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-25T14:11:12.06+00:00
mc 4,576 Reputation points
commented 2024-10-26T10:51:23.86+00:00
RLWA32 45,691 Reputation points
1 answer One of the answers was accepted by the question author.

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),…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-24T11:20:12.8666667+00:00
mc 4,576 Reputation points
commented 2024-10-26T01:50:11.1166667+00:00
mc 4,576 Reputation points
0 answers

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…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,688 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,847 questions
asked 2024-10-22T10:03:03.6033333+00:00
Bram Nijenkamp 0 Reputation points
commented 2024-10-25T16:21:31.17+00:00
Frank 0 Reputation points
0 answers

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…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,755 questions
asked 2024-10-24T14:30:03.1766667+00:00
Aaron Chen 0 Reputation points
edited a comment 2024-10-25T05:44:17.67+00:00
Minxin Yu 11,996 Reputation points Microsoft Vendor