3,637 questions with C++-related tags

Sort by: Updated
2 answers

Create and name multiple dialogs

Windows 11, VS 2022, version 17.7.6 The goal is to create a project with multiple dialogs.  I found the process to create some dialogs, but the dialogs cannot be renamed and when the dialogs are closed within the VS windows I cannot reopen it. Here is my…

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,637 questions
asked 2024-07-27T04:03:54.8466667+00:00
Bryan Kelly 321 Reputation points
answered 2024-07-27T12:17:00.63+00:00
RLWA32 43,381 Reputation points
1 answer

DwmExtendFrameIntoClientArea doesn't paint border in Win10

I tested the source example found in https://learn.microsoft.com/en-us/windows/win32/dwm/customframe and it works in Windows 11. However, when testing it in Windows 10, the border disappears when the window is active. On the other hand, when the window…

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,523 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,637 questions
asked 2024-07-26T19:33:39.6933333+00:00
Pedro Gil 30 Reputation points
answered 2024-07-27T05:31:48.35+00:00
Pedro Gil 30 Reputation points
5 answers One of the answers was accepted by the question author.

Which project template

Windows 11, Visual Studio 2022 I am having trouble finding a web page that provides some basic comparisons of the different template types.  The current need is a simple GUI for some number crunching.  There will be no graphics or pictures.  There will…

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,637 questions
asked 2024-07-06T04:33:59.53+00:00
Bryan Kelly 321 Reputation points
accepted 2024-07-27T03:58:18.2033333+00:00
Bryan Kelly 321 Reputation points
3 answers One of the answers was accepted by the question author.

Any sample code in C/C++ to Publish and Subscribe to Azure Web PubSub?

I am looking for sample C/C++ code to Publish and Subscribe to Azure Web PubSub. Specifically, I want to send data from a microcontroller programmed in C/C++ to a server with Azure Web PubSub. Are there any resources available that could help me achieve…

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
72 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,637 questions
asked 2024-05-01T10:49:20.29+00:00
Williams Celis 30 Reputation points
answered 2024-07-27T03:51:37.3366667+00:00
Zitong Yang 5 Reputation points Microsoft Employee
2 answers One of the answers was accepted by the question author.

How much work is involved to support Azure Web PubSub client in C++ Application?

Per the documentation, this service is built around WebSockets, which would, in theory allow applications, regardless of language, to add support via an existing WebSockets library. However, the posted Java/C#/Python examples all rely on Azure-provided…

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,637 questions
asked 2021-07-01T02:55:31.097+00:00
Greg Tinney 121 Reputation points
answered 2024-07-27T03:50:44.5733333+00:00
Zitong Yang 5 Reputation points Microsoft Employee
1 answer

CPP -- error CS5001: Program does not contain a static 'Main' method suitable for an entry point

Hi, Getting this error on a C++ application: error CS5001: Program does not contain a static 'Main' method suitable for an entry point: Tried adding this: (no luck...) public static void Main() { }

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,637 questions
asked 2024-07-25T09:47:57.83+00:00
commented 2024-07-26T09:28:39.64+00:00
0 answers

How to use DeviceIOCommand (IOCTL_STORAGE_PROTOCOL_COMMAND) integrate with ufs device

Hi, Currently i'm working on sending query request upiu to ufs device by using DeviceIOControl(IOCTL_STORAGE_PROTOCOL_COMMAND) but i'm getting ERROR_INVALID_FUNCTION on getLastError(). Can you please provide sample code or documentation on…

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,523 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,637 questions
asked 2024-07-23T07:42:03.5333333+00:00
yh_yong 0 Reputation points
commented 2024-07-26T06:29:20.73+00:00
Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
1 answer

Can't reverse back to shortpath?

Hi, I have this folder path in short-form like this C:\Users\admin\Downloads\NEWFOL~2\NEWFOL~1\...\NEWFOL~1 using GetLongPathName, then I have C:\Users\admin\Downloads\New folder (2) - Copy - Copy test\New folder\...\New folder but now using…

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,523 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,637 questions
asked 2024-07-21T22:47:39.6433333+00:00
DangDKhanh-2637 946 Reputation points
commented 2024-07-26T00:56:29.1733333+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer

When using the Win32 GetAppliedGPOList in C, the GPO list pointer is always NULL even when trying multiple GUIDs and even when the API returns success.

In the code below, pGPOList (the GPO list) is always NULL even when the GetAppliedGPOList returns success. I have tried multiple group policy extension GUIDs, but no luck. What am I doing wrong? This also happens when I try GetAppliedGPOList with user…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 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,523 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,637 questions
asked 2024-07-24T12:56:07.7066667+00:00
Madden, John 5 Reputation points
commented 2024-07-25T17:13:13.44+00:00
Madden, John 5 Reputation points
2 answers

Visual C++ (VS 17.10.4) don't show template errors

After updating to the latest version of the studio, error output stopped appearing when compiling templates. That in a project with several thousand files makes work almost impossible. What do I see…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 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,637 questions
asked 2024-07-20T15:44:40.9566667+00:00
Никольский Данил 0 Reputation points
answered 2024-07-25T09:00:39.6866667+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
1 answer

Visual Studio 2022 not saving changes.

I have been trying to build a simple reverse string function in C++ but visual studio is not letting me save my work. It notifys me of build errors but I know there are none. Im testing with simple print statements. Every time my actions go like this. I…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 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,637 questions
asked 2023-03-02T21:43:48.9666667+00:00
Alex Trial 10 Reputation points
commented 2024-07-24T23:31:24+00:00
Swing, Tyson 0 Reputation points
2 answers One of the answers was accepted by the question author.

win32 When trying to convert string to LPCWSTR, the result is Japanese characters

I want to make what key the user presses added to a string and then displayed in SetWindowText, but the output is Chinese characters case WM_CHAR: { ifpressed; static std::string getwparam; getwparam.push_back( wParam ); SetWindowText(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,523 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,637 questions
asked 2024-07-23T23:57:51.72+00:00
someone 20 Reputation points
accepted 2024-07-24T21:47:57.5966667+00:00
someone 20 Reputation points
4 answers One of the answers was accepted by the question author.

Get deleted item from recyclebin

Task: I need to get deleted item having SHITEMID data. SHITEMID is defined as: typedef struct _ITEMIDLIST { SHITEMID mkid; }ITEMIDLIST; defined in C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\shtypes.h I have the following code to get…

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,637 questions
asked 2024-06-11T13:21:13.9233333+00:00
Flaviu_ 971 Reputation points
commented 2024-07-24T15:50:25.3433333+00:00
RLWA32 43,381 Reputation points
1 answer One of the answers was accepted by the question author.

Thumbnail Preview Title Icon

Is it possible to customize/modify the icon showed in the title bar of a thumbnail? For example, if a window doesn't have an icon in the title bar, its thumbnail does display an icon... the standard application icon (please see attachments). Is there any…

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,523 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,637 questions
asked 2024-07-23T13:44:15.57+00:00
Pedro Gil 30 Reputation points
commented 2024-07-23T20:08:22.2133333+00:00
Pedro Gil 30 Reputation points
1 answer

Can't read input from keyboard/mouse using Nuget GameInput lib on PC

Currently working with the latest version of Microsoft.GameInput version 0.2303.22621.3038. Using the follwing code, I'm able to read the axis values of a Logitech joystick IGameInputReading* reading; if…

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,637 questions
asked 2024-07-18T19:41:51.4866667+00:00
gabriel moreau 0 Reputation points
commented 2024-07-23T18:51:01.34+00:00
Castorix31 83,206 Reputation points
1 answer

How to get the geolocation position based on the WiFi source always instead of the IPAddress

Hi, I would like to know how can I get the geolocation based on the WiFi source instead of the IP address. I was getting the geolocation based on the WiFi in last month in my Windows 11 system, but it started giving the geo location based on the IP…

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,637 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,992 questions
asked 2024-07-19T10:46:29.9333333+00:00
67883078 41 Reputation points
edited the question 2024-07-23T09:22:07.28+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
1 answer

How do I save ID2D1Bitmap as a file?

Bitmap and text were output to DIALOG using Direct2D. I tried to make this rendered screen into a bitmap and save it as a file. But, I get D2DERR_WRONG_RESOURCE_DOMAIN. Is there a way to transform ID2D1Bitmap to IWICBitmap? My goal is to use GDI+…

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,523 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,637 questions
asked 2024-07-08T05:39:14.6833333+00:00
채문석(jim) 41 Reputation points
commented 2024-07-23T01:42:12.7766667+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
2 answers

Getting wrong CPU Processor ID with __cpuid() in Win 11 systems

  Hello Friends,   I am facing an issue in getting CPU Processor ID with C++ code. I used __cpuid() function as below:   #include <iostream> #include <intrin.h>   int main() {                 unsigned __int32  regs[4];                       …

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,637 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,992 questions
asked 2024-07-19T10:06:54.6066667+00:00
Bhanodaya 0 Reputation points
answered 2024-07-22T08:41:43.1766667+00:00
Gary Nebbett 5,856 Reputation points
0 answers

how to fix error C++ command-line error: cannot open metadata file

I'm trying to make a windows form but in the premade C++ file it gives this error "C++ command-line error: cannot open metadata file." I did add a form and it worked perfectly but there was a bug that fixes when you delete it and make a new…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 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,637 questions
asked 2024-07-17T03:09:10.87+00:00
Kevin 0 Reputation points
commented 2024-07-22T02:01:13.28+00:00
Minxin Yu 11,026 Reputation points Microsoft Vendor
2 answers

DLLs that are only in older versions of Microsoft Visual C++

I got a program that apparently works with Microsoft Visual C++ 2013 installed. I came to this conclusion after installing all the versions I found here…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 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,637 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,009 questions
asked 2024-07-14T00:42:44.5266667+00:00
ERIC.DEUCHER 0 Reputation points
edited the question 2024-07-22T01:43:01.9566667+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor