3,548 questions with C++-related tags

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

C++, MFC Version 6, ComboBox - Font

Hello! I need to modify an old application. The ComboBox should get the Courier font. How can I achieve this? The developer at the time used it at runtime to create the combobox. Can anyone give me some tips? Is not easy, I know. I have googled without…

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,548 questions
asked 2024-04-09T14:08:42.1666667+00:00
Noah Aas 160 Reputation points
accepted 2024-04-16T17:44:49.6866667+00:00
Noah Aas 160 Reputation points
1 answer

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,548 questions
asked 2024-04-16T06:13:17.4366667+00:00
Rohan Pande 315 Reputation points
edited a comment 2024-04-16T09:22:20.6033333+00:00
Harshithraj1871 1,496 Reputation points
0 answers

InternetSetOption not work on windows 10 2004

static BOOL SetSystemProxyPacUrl( wchar_t* proxy_full_addr) { INTERNET_PER_CONN_OPTION_LISTW list; BOOL bReturn; DWORD dwBufSize = sizeof(list); // Fill out list struct. list.dwSize = sizeof(list); // Set three options. …

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,730 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,433 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,548 questions
asked 2024-04-15T09:13:03+00:00
myibc 11 Reputation points
commented 2024-04-16T06:35:27.95+00:00
Jeanine Zhang-MSFT 9,181 Reputation points Microsoft Vendor
2 answers

Runtime Dynamic linking a Dll for a class defined in dll

Hi, I am trying to export a class defined in dll. After following msdn example for exporting a "function" in dll, i compiled and used that code but so far i am clueless about how to export a class defined in dll. Kindly tell me how we can…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,730 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,655 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,548 questions
asked 2024-04-15T09:49:59.7233333+00:00
Vivek Soni 21 Reputation points
answered 2024-04-16T01:29:27.5533333+00:00
uncle_Kei 0 Reputation points
2 answers One of the answers was accepted by the question author.

Need help with writing progress bar dialog, with smooth marquee, on one thread

Hi - my Win32, MFC, Visual C++ application frequently has to perform operations which can take a long time. I want the user to be able to see a progress dialog with a marquee and a Cancel button while these are happening. I would like the marquee 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,548 questions
asked 2024-04-12T10:02:57.8+00:00
simonx 126 Reputation points
answered 2024-04-15T14:42:35.3333333+00:00
simonx 126 Reputation points
1 answer One of the answers was accepted by the question author.

Would calling RIOReceive() on a closed socket potentially cause a crash?

Hello, I would like to inquire about a crash that occurred when calling the RIOReceive() function. Please understand that the sentences may be strange because I used a translator. What happens is that thread A performs closesocket(sock) on the previously…

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,433 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,548 questions
asked 2024-04-15T02:06:23.07+00:00
형진 김 20 Reputation points
edited the question 2024-04-15T09:29:55.4266667+00:00
형진 김 20 Reputation points
2 answers

Porting DirectX 9 to latest version

Iam porting an existing project with DirectX 9, Is DirectX 11 or 12 should be considered for this subject Kindly advice.

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,433 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,548 questions
asked 2024-04-15T06:40:01.19+00:00
Balineni Rohith Sai 0 Reputation points
answered 2024-04-15T07:36:00.23+00:00
Xiaopo Yang - MSFT 11,506 Reputation points Microsoft Vendor
1 answer

Return/Enter

I have made a small windows program that saves names to a text file. Everything works with a button, but how can the names be registered if you just want to press Return/Enter after writing the names? The code is: #include <windows.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,548 questions
asked 2024-04-13T14:25:18.2166667+00:00
Benny Hill 20 Reputation points
edited a comment 2024-04-14T12:03:31.8466667+00:00
RLWA32 40,856 Reputation points
3 answers One of the answers was accepted by the question author.

"Unresolved external "int __cdecl invoke_main(void)" after VS2017 15.6.1 update" -- Part 2

I am porting a number of mature Win32 apps developed using VS 2015 under Windows 7 Professional to be built using VS 2019 under Windows 10 . Some edits to the original source and heading files are necessary to accommodate VS 2019 idiosyncrasies. I have…

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,433 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,548 questions
asked 2021-06-25T20:33:27.207+00:00
Robert Hoech 201 Reputation points
commented 2024-04-14T04:37:44.5933333+00:00
Johan 0 Reputation points
1 answer One of the answers was accepted by the question author.

Select MSVC build tools version with Visual Studio's CMake / CMakeSettings.json

Hi, I'm using Visual Studio's C++ CMake functionality, i.e. "File -> Open -> CMakeLists.txt". I'm on the latest VS 2022 17.9.5. I'd like to specify an exact MSVC build tools version to use, for example MSVC 14.29, 14.30 or 14.39…

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,548 questions
asked 2024-04-08T13:16:12.7633333+00:00
Patrik Huber 20 Reputation points
accepted 2024-04-12T16:17:49.3+00:00
Patrik Huber 20 Reputation points
3 answers One of the answers was accepted by the question author.

Why does Microsoft's code examples have errors, and how do I fix these?

The code examples on this page all seem to have errors, some of which I don't have a clue how to fix. How do I fix the following: code: hResult = StringCchLength(pmyitem->psz, STRSAFE_MAX_CCH, pcch); error: argument of type "LPSTR"is…

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,548 questions
asked 2024-04-08T08:44:10.4733333+00:00
CDev-8220 220 Reputation points
commented 2024-04-12T11:44:04.1533333+00:00
RLWA32 40,856 Reputation points
0 answers

C++ RealTimeStylus is dead and doesn't handle any touch messages

After some testing, I found that the RTS touch library on win7sp1 systems has a probability of triggering an error: RealTimeStylus does not trigger, i.e. it does not trigger the touch callback class even if there is a touch point that has been pressed 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,433 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,548 questions
asked 2024-04-03T05:26:56.4233333+00:00
RL Chen 170 Reputation points
edited a comment 2024-04-12T07:14:59.8066667+00:00
Roy Li - MSFT 32,236 Reputation points Microsoft Vendor
0 answers

Why PackageManager.FindPackagesForUser method not fetching all the store app details

I'm attempting to retrieve details of installed Store apps on the machine using the PackageManager class in C++/WinRT. However, I'm encountering an issue where I only receive a partial result. For example, if there are 20 Store apps installed, only 10…

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,807 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,433 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,548 questions
asked 2024-04-05T11:58:43.4033333+00:00
checkingrandom 206 Reputation points
commented 2024-04-12T06:28:46.1833333+00:00
Jeanine Zhang-MSFT 9,181 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

How to cancel the "print preview" option in the printer preferences by coding?

I want to cancel the "print preview" option in the printer preferences by coding, maybe can use c++ windows api or C#. Then how to do it ? Thank you !

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,433 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,325 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,548 questions
asked 2024-04-10T04:00:43.3266667+00:00
szmm 25 Reputation points
commented 2024-04-11T06:41:00.6566667+00:00
Castorix31 81,841 Reputation points
1 answer

C++/CLI dll could not be loaded in WinUI3 app

When I called (i.e. instanciated) my class object (e.g. MyTest) which is declared as a managed class in my C++/CLI dll, I saw the following error: System.IO.FileNotFoundException: 'Could not load file or assembly <MyTest>' I am sure that the…

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
324 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,548 questions
asked 2024-01-10T02:35:05.9466667+00:00
Ueda Kunio(上田 邦男) 20 Reputation points
answered 2024-04-10T23:54:42.0066667+00:00
Ueda Kunio(上田 邦男) 20 Reputation points
1 answer One of the answers was accepted by the question author.

Accessing Resources in the project as a file or binary object

I am writing a C++ application that has a few binary files that it uses as resources. I have added those files to my Project's Resource Files. I need now to be able to open the file as a binary stream and read it. (it's a lbm image file) When I…

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,548 questions
asked 2024-04-09T21:43:30.8433333+00:00
Brian O'Brien 20 Reputation points
accepted 2024-04-10T15:47:38.93+00:00
Brian O'Brien 20 Reputation points
1 answer

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,548 questions
asked 2024-04-07T12:00:16.2666667+00:00
Ash 40 Reputation points
commented 2024-04-10T02:39:23.94+00:00
Minxin Yu 10,271 Reputation points Microsoft Vendor
1 answer

cant run a different main function in c++

Hello, i have a project with 2 cpp files, the c++.cpp file and the ciclos.cpp file, c++.cpp file has a main function and ciclos.cpp file has another main function named main_2, im trying to run main_2 function in the ciclos.cpp file but visual studio…

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,548 questions
asked 2024-04-07T13:29:47.95+00:00
Thomas Timana 0 Reputation points
commented 2024-04-09T11:15:49.07+00:00
RLWA32 40,856 Reputation points
2 answers

How to add function in C++, Visual Studio Community 2022

How to add function in C++, Visual Studio Community 2022. System: Windows 11 Home

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,548 questions
asked 2024-03-17T08:57:13.01+00:00
Renjie Zhang 40 Reputation points
edited the question 2024-04-09T08:31:20.0466667+00:00
Anna Xiu-MSFT 26,311 Reputation points Microsoft Vendor
2 answers

Visual C++ 2012 is out of support, but is required for Exchange 2016 - how can we remove it and still run exchange?

Visual C++ 2012 is out of support, but is required for Exchange 2016 - how can we remove it and still run exchange? We are required to uninstall any software that is no longer in support but still need to use Exchange 2016 which requires C++ 2012 - now…

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,548 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,373 questions
asked 2024-04-04T07:30:41.06+00:00
Mark Ashley 0 Reputation points
commented 2024-04-06T09:49:07.7233333+00:00
RLWA32 40,856 Reputation points