3,571 questions with C++-related tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

Application crash even on a try catch block

When i comment out the line GetViewsByZOrder i get the following exception: Exception thrown at 0x00007FF96E36EE19 (rpcrt4.dll) in : 0xC0000005: Access violation reading location 0x00000000094F0122. On the line if (collection->GetViewForHwnd(hwnd,…

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,571 questions
asked 2024-05-30T03:16:00.1533333+00:00
Yanis 20 Reputation points
edited a comment 2024-05-31T18:57:22.8066667+00:00
Yanis 20 Reputation points
1 answer

Porting SetTransform function in DirectX 9 to DirectX 11 or 12

Iam porting an existing project with DirectX 9 to DirectX 11 or 12, I am trying to port the function SetTransform from DirectX 9, there is no reference found in DirectX 11 or 12, please kindly suggest where to find the above function and how to define…

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,455 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,571 questions
asked 2024-05-22T03:54:58.4266667+00:00
Balineni Rohith Sai 0 Reputation points
commented 2024-05-31T06:33:38.1466667+00:00
Xiaopo Yang - MSFT 11,661 Reputation points Microsoft Vendor
2 answers

How to Detect Initial DPI changes in a WPF Application while Scaling according to Per Monitor Aware in Variable Dynamic Screen Resolution?

In daily life we have to deal with a lot of different types of display size it may be mobile or may be a 4k monitor. The screen resolution vary from display to display. Here another important factor is DPI (Display per inch) which is mainly a scaling…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,881 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,691 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,419 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,571 questions
asked 2024-05-27T23:46:16.7233333+00:00
MERUN KUMAR MAITY 531 Reputation points
commented 2024-05-30T16:39:03.64+00:00
MERUN KUMAR MAITY 531 Reputation points
1 answer One of the answers was accepted by the question author.

GDI+ PrivateFontCollection::AddMemoryFont failed to load fonts

GDI+ PrivateFontCollection::AddMemoryFont fails to load fonts and returns a status of InvalidParameter = 2. I made sure that my resources were correct as I also saved them locally, but the ttf fonts are correct. What is the problem please? My code and…

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,455 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,571 questions
asked 2024-05-30T01:03:33.4266667+00:00
RL Chen 210 Reputation points
edited a comment 2024-05-30T09:46:02.8466667+00:00
Jeanine Zhang-MSFT 9,341 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Disable windows shortcuts for high contrast and mouse keys

I need to block keyboard shortcuts "alt + shift + prtscr" and "alt + shift + numlk". How to do it with LL Keyboard hook? Help much appreciated !

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,571 questions
asked 2024-04-07T12:00:16.2666667+00:00
Ash 60 Reputation points
commented 2024-05-30T04:37:28.8066667+00:00
Ash 60 Reputation points
1 answer

Expected behavior of an application launched through SSH in two different scenarios

Hi, I have a C++ application which can also runs as a Service. I am trying to launch my application on a remote machine from a client machine. For this, I am using the 'Open SSH' software. Want to understand what is the expected behaviour from the OS…

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,571 questions
asked 2024-05-28T15:14:06.4566667+00:00
Rohan Pande 355 Reputation points
edited a comment 2024-05-30T01:24:10.3033333+00:00
Rohan Pande 355 Reputation points
1 answer One of the answers was accepted by the question author.

Program output is correct, but VS reports an error during step-by-step debugging

The C++ code snippet is: class A { public: A(const std::string& ss, const std::string& tt) : s(ss), t(tt) {} void func1() const { std::cout << s; } void func2() const { std::cout << t; } using Action = void (A::*)()…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,725 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,571 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
954 questions
asked 2024-05-29T01:58:25.83+00:00
zzzhhh 40 Reputation points
accepted 2024-05-29T07:36:29.5333333+00:00
zzzhhh 40 Reputation points
3 answers

How does Windows' 'Game Controllers' properties connect to a joystick?

The situation: We need to use a new game controller (with a joystick only) hardware on Windows 10 IoT. In the properties of "Game Controllers", moving the joystick is visible in the displayed rectangle with the '+'. Our software using DirectX8…

Windows for IoT
Windows for IoT
A family of Microsoft operating systems designed for use in Internet of Things (IoT) devices.
382 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,571 questions
asked 2024-05-28T14:57:32.6533333+00:00
Robin Holenweger 0 Reputation points
answered 2024-05-28T21:29:35.26+00:00
kwikc 131 Reputation points
0 answers

How to get Code Coverage in Visual Studio 2022 with CMake Cpp Projects with a Windows Compiler

I have a Cpp project that is being built with the MSVC compiler and using CMake. I need a code coverage solution, preferably one that either provides detailed reports or in Visual Studio code highlighting that is possible using CMake. So far I have tried…

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,571 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
332 questions
asked 2024-05-28T09:01:11.2366667+00:00
Hoad, Tom 0 Reputation points
commented 2024-05-28T13:37:45.93+00:00
Tianyu Sun-MSFT 28,066 Reputation points Microsoft Vendor
0 answers

winrt::Windows::Devices::Usb::UsbDevice::FromIdAsync throws exception on get

code sample: #include <guiddef.h> #include <windows.h> #include <ppltasks.h> #include <winrt/Windows.Foundation.Collections.h> #include <winrt/Windows.Foundation.h> #include…

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,571 questions
asked 2024-05-28T08:54:29.7266667+00:00
Tunghohin 0 Reputation points
edited a comment 2024-05-28T11:44:51.5833333+00:00
Minxin Yu 10,441 Reputation points Microsoft Vendor
0 answers

How to access registry items under driver service registry key path of Win11 24H2 in a WDF driver?

I am currently utilizing a Kernel Mode Driver Framework (KMDF) driver, employing the RtlQueryRegistryValues function with parameters (RTL_REGISTRY_ABSOLUTE, L"\Registry\Machine\System\CurrentControlSet\Services...") to access specific registry…

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,571 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,559 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
21 questions
asked 2024-05-22T01:22:02.8666667+00:00
Jingshan Song (Jingshan) 5 Reputation points
edited a comment 2024-05-28T11:36:39.61+00:00
RLWA32 41,456 Reputation points
0 answers

Windows API's CreateFile with CFile gives invalid path error if used drives created with SUBST

A drive is created for a folder using SUBST command. We have a Windows application which reads contents of the and performs some operations. Application does not give any error when read the file path is from actual drive. But when try to read from drive…

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,455 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,571 questions
asked 2024-05-03T12:58:05.9266667+00:00
Dada Khalandhar Gooty 0 Reputation points
commented 2024-05-28T06:54:30.22+00:00
Jeanine Zhang-MSFT 9,341 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to resolve debug assertion error when calling dialog create function in mfc extension dll

I have code like below: m_pPreviewDlg.Create(IDD_DIALOG_PREVIEW); The error below occurs in this code. What is the solution? I am using visual studio 2022

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,571 questions
asked 2024-05-23T06:32:49.1433333+00:00
채문석(jim) 41 Reputation points
commented 2024-05-28T06:40:36.9466667+00:00
채문석(jim) 41 Reputation points
2 answers One of the answers was accepted by the question author.

MFC Debug Assertion Failed (DLL Dialog Create Error)

I am trying to CREATE a dialog as MODALESS in a DLL. When DEBUGING is attempted, DEBUG ASSERTION FAILED LINE24 is output. What should I do? Code Example : extern "C" __declspec(dllexport) int CreateDlg() { CTestDlg *pDlg = new…

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,571 questions
asked 2022-11-08T04:53:27.717+00:00
채문석(jim) 41 Reputation points
accepted 2024-05-28T06:38:54.35+00:00
채문석(jim) 41 Reputation points
1 answer One of the answers was accepted by the question author.

Visual Studio 2022- Couldn't install Microsoft.VisualCpp.Redist.14

I'm trying to install Desktop development with C++ for Visual Studio 2022. Attempting to install this using the Visual Studio Installer returns an error stating: Couldn't install Microsoft.VisualCpp.Redist.14 The log file mentions another log file that…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,725 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,571 questions
asked 2024-05-26T23:35:26.9733333+00:00
OldIslander 20 Reputation points
commented 2024-05-27T20:31:50.2966667+00:00
OldIslander 20 Reputation points
3 answers

Count logical liines in a text control

Hi, ALL, There is a EM_GETLINECOUNT, but it will count the number of text lines. I'm looking for to count the displayed lines (or wrapped lines) in a text control. Either using WinAPI or C++. Thank you.

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,571 questions
asked 2024-03-12T05:03:09.4833333+00:00
Igor Korot 6 Reputation points
edited a comment 2024-05-27T20:18:33.9933333+00:00
RLWA32 41,456 Reputation points
2 answers One of the answers was accepted by the question author.

.net8 windows form design view problem.

I am developing Revit addin in Vidual Studio in c++/cli as class library. Before moving to .net platform everyhing was working fine. But in .net Windows form design views doesnt work. Though when I add form element by code. It compiles and works. The…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,725 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,571 questions
asked 2024-05-04T19:10:34.6166667+00:00
Ahmet Haluk UZUNER 20 Reputation points
answered 2024-05-27T16:10:38.4833333+00:00
Ahmet Haluk UZUNER 20 Reputation points
1 answer One of the answers was accepted by the question author.

How to get list of all programs on system PATH that countain some characters in powershell/batch

So, i want to make a builder file for my C code, i use Clang compiler and wanted to link the Windows SDK's headers and make it multiplatform, so even VS 2015 is supported. I thought the easiest and best way will be to just find the programs that…

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,571 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,185 questions
asked 2024-05-24T07:33:56.0666667+00:00
Freziyt223 20 Reputation points
commented 2024-05-26T23:56:30.48+00:00
MotoX80 32,331 Reputation points
2 answers One of the answers was accepted by the question author.

Mixing net standard and visual c++

Hello Using VS 2017, can one have both net standard 2.0 and visual c++ projects in the same solution with the net standard project referencing the visual c++ project (.vsxproj)? If I create one solution containing two projects of this kind using VS 2017…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,481 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,571 questions
asked 2024-05-21T08:47:24.7566667+00:00
Flade, David 20 Reputation points
commented 2024-05-24T14:49:26.4533333+00:00
Flade, David 20 Reputation points
1 answer

How to Disable/Enable Audio Hardware Acceleration in Windows 11?

Hi there, I would like to Disable/Enable Audio Hardware Acceleration programmatically in Windows 11. Is there any way to implement it? Thanks. Best regards, Hank

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,419 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,571 questions
asked 2024-05-21T07:19:37.4966667+00:00
Hank 0 Reputation points
commented 2024-05-23T13:30:04.0133333+00:00
Castorix31 82,206 Reputation points