3,618 questions with C++-related tags

Sort by: Updated
4 answers

Visual Studio 2015 & 2017 doesn't recognize std

Hello, I've written simple piece of code which compiles and works perfectly on any other program which can compile and run C++, but when I try to run it from VS 2015 on my laptop or on VS 2017 from my other laptop, it won't build it - I get an error…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,830 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,618 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,426 questions
asked 2020-08-25T04:58:53.277+00:00
Elinor Ginzburg 106 Reputation points
commented 2024-06-06T15:02:10.12+00:00
Ms. Gerda Hoppe Jr 0 Reputation points
1 answer

[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application."

[Asan] Getting assert on launch of application "The application was unable to start correctly(0xc0000142). Click OK to close the application." Assert Image mentioned below: image_assert.png Resolved Call Stack mentioned in Microsoft Visual…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,830 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,618 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.
963 questions
asked 2024-06-05T06:15:15.6366667+00:00
Ashutosh Kumar Verma 0 Reputation points
answered 2024-06-05T08:53:08.8533333+00:00
Anna Xiu-MSFT 27,641 Reputation points Microsoft Vendor
1 answer

The QueryVirtualMemoryInformation function fails in 32-bit mode because the WIN32_MEMORY_REGION_INFORMATION structure is defined incorrectly.

For the record, I have Windows 11, "Version 10.0.22631 Build 22631". The WIN32_MEMORY_REGION_INFORMATION structure is defined in "memoryapi.h" as the following: typedef struct WIN32_MEMORY_REGION_INFORMATION { PVOID…

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.
5,008 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,502 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,618 questions
asked 2024-06-04T11:29:47.0133333+00:00
RoflCopter4 10 Reputation points
commented 2024-06-05T08:28:25.9233333+00:00
RLWA32 42,551 Reputation points
1 answer

How to detect scale factor in Windows 10 in C++

I am trying to detect the display scale factor in Windows 10 in C++. Below is the code I am using. //Code to detect scale void getDisplayScale(double &h_Scale, double &v_Scale) { //auto activeWindow = GetActiveWindow(); HWND…

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,502 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,618 questions
asked 2022-05-23T06:55:03.21+00:00
Azeem Cv 1 Reputation point
commented 2024-06-05T06:18:53.14+00:00
Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
0 answers

Device Manager does not show 'Bus Reported Device Description'

Hi, i need the device description for my APP, but unfortunately appropriate API calls does not return anything and by investigating the device manager it does not show up either. I am searching the USB enumeration list until the correct vid pid and a…

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,618 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,571 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
47 questions
asked 2024-06-04T06:54:08.5766667+00:00
MO_660 0 Reputation points
edited the question 2024-06-04T09:20:19.4166667+00:00
Minxin Yu 10,791 Reputation points Microsoft Vendor
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,502 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,618 questions
asked 2024-05-03T12:58:05.9266667+00:00
Dada Khalandhar Gooty 0 Reputation points
commented 2024-06-03T11:17:36.65+00:00
Dada Khalandhar Gooty 0 Reputation points
3 answers

How do I display a transparent custom bitmap on a toolbar button in a Win32 C++ app?

I'm trying to add a button with a custom transparent bitmap to a toolbar in my Win32 C++ app. I'm using the following code to create and populate the toolbar. toolBar = CreateWindowEx(0, TOOLBARCLASSNAME, nullptr, WS_CHILD, 0, 0, 0, 0, hwnd,…

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,502 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,618 questions
asked 2022-02-26T01:00:40.19+00:00
DaveF 21 Reputation points
answered 2024-06-03T00:16:13.9233333+00:00
Ruth Haephrati 10 Reputation points
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,618 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,502 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,618 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 12,151 Reputation points Microsoft Vendor
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,502 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,618 questions
asked 2024-05-30T01:03:33.4266667+00:00
RL Chen 230 Reputation points
edited a comment 2024-05-30T09:46:02.8466667+00:00
Jeanine Zhang-MSFT 9,431 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,618 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,618 questions
asked 2024-05-28T15:14:06.4566667+00:00
Rohan Pande 375 Reputation points
edited a comment 2024-05-30T01:24:10.3033333+00:00
Rohan Pande 375 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,830 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,618 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.
963 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
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,618 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.
336 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,951 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,618 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,791 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,618 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,618 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
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,618 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 42,551 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,830 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,618 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,618 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,274 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,566 Reputation points