3,540 questions with C++-related tags

Sort by: Updated
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,773 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,427 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,540 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,427 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,288 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,540 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,826 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.
323 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,540 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,540 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,540 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,031 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,540 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,661 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,540 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 25,801 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,540 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,359 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,661 Reputation points
4 answers

cannot open include file 'new.h': no such file or directory

Hi All, I am trying to run a simple mfc demo application in visual studio 2015, but i am not able to build that one successfully. getting a error message "cannot open include file: 'new.h' : no such file or directory. can any one please…

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,540 questions
asked 2021-07-19T12:24:20.733+00:00
Asha Diggi 96 Reputation points
answered 2024-04-05T13:04:23.7+00:00
Sahib Khan 0 Reputation points
1 answer

How to implement "Spin Control" continuued

   Hi, I like to press spin arrows to get “item No” show up on hStatic panel, and I get no response Obviously, I am missing a key step in my dode. I tried so many combinations of parameters with no success. I included     #include <commctrl.h>   …

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,540 questions
asked 2024-03-22T02:48:42.8+00:00
Chang Chi 21 Reputation points
answered 2024-04-04T23:25:54.56+00:00
Chang Chi 21 Reputation points
2 answers One of the answers was accepted by the question author.

VISUAL STUDIO 2005 future support in future Windows 11 versions

Hello This is more a question rather than an issue on Visual Studio 2005, and I don't actually know where to ask the question. We have some applications developped with Visual Studio 2005 in 32bits and we would like to know how long will they still be…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,627 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,540 questions
asked 2023-11-10T10:13:47.14+00:00
CASSIGNOL Christophe 20 Reputation points
commented 2024-04-04T13:07:53.94+00:00
Stephen Wolstenholme 0 Reputation points
1 answer One of the answers was accepted by the question author.

How do I fix the following errors?

I'm using the example code here, but getting errors in this area. for (i = 0; i < CPENS; i++) { phbmp[i] = CreateCompatibleBitmap( hdcMain, wLineX, wLineY); if (i == 0) { hbmpOld = SelectObject(hdcLines,…

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,540 questions
asked 2024-04-02T16:31:23.0266667+00:00
CDev-8220 220 Reputation points
commented 2024-04-04T10:54:13.86+00:00
CDev-8220 220 Reputation points
1 answer

Disable hotkey "ctrl + alt + tab"

I tried to disable the hotkey "ctrl + alt + tab" with a LL keyboard hook,but looks like this key combination cannot be intercepted by LL keyboard hook. Is there any way I can disable it with 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,540 questions
asked 2024-02-21T04:46:40.5066667+00:00
Ash13 0 Reputation points
commented 2024-04-04T07:06:53.14+00:00
Ash 40 Reputation points
0 answers

Bad OpenGL performance under Windows 10 but not on 8.1 or 11.

With my C++ video player (mrv2), some users have reported bad performance with some NVidia graphic cards and latest drivers under Windows 10, albeit Windows 8.1 and Windows 11 do not show the issue (one user upgraded to 11 and then all worked fine under…

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,540 questions
asked 2024-04-03T07:14:31.81+00:00
Gonzalo Garramuno 0 Reputation points
edited a comment 2024-04-03T10:03:04.61+00:00
Minxin Yu 10,031 Reputation points Microsoft Vendor
1 answer

Control guard keys set in loadconfig but not in heaer

Hi, I am trying to enable CFG for a set of dll files. I added the /GUARD:CF to my linker. The output dll has the below in load config: Guard CF address of check-function pointer Guard CF address of dispatch-function pointer Guard CF function…

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,540 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,760 questions
asked 2024-04-03T09:46:52.64+00:00
Nivethitha Pugazhendhi 0 Reputation points
answered 2024-04-03T09:57:03.3266667+00:00
RLWA32 40,661 Reputation points
1 answer One of the answers was accepted by the question author.

Forwarding declaration issue

I have: // a.h #pragma once class B; class A { public: void SomeMethod() const; B m_b; // on stack }; // a.cpp #include "a.h" #include "b.h" void A::SomeMethod() const { // } // b.h #pragma once #include "a.h" class…

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,540 questions
asked 2024-04-03T07:26:01.5233333+00:00
Flaviu_ 911 Reputation points
accepted 2024-04-03T09:31:17.8533333+00:00
Flaviu_ 911 Reputation points
0 answers

TYPE MISMATCH(0x8002802A) error with CoCreateInstance()

Hi, When we call CoCreateInstance() , it fails with TYPE MISMATCH error in Visual Studio 2017\2019 and the below is the sample code for CoCreateInstance. CComPtr<IServer> m_pSServer; HRESULT hr = m_pSServer.CoCreateInstance(__uuidof(CServer), NULL,…

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,540 questions
asked 2024-03-29T12:20:13.6166667+00:00
Pal 0 Reputation points
commented 2024-04-03T08:18:52.9933333+00:00
Hui Liu-MSFT 40,271 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

The contents of the C# MsPpt package report errors in registration-free COM.

I learned to use registration-free COM in https://learn.microsoft.com/en-us/answers/questions/1377090/calling-c-class-libraries-via-com-in-c-requires-re, but I'm found a new problem. the contents of the C# MsPpt package reported an error in…

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,288 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,540 questions
asked 2023-11-20T03:56:09.3566667+00:00
RL Chen 170 Reputation points
accepted 2024-04-03T05:29:56.3533333+00:00
RL Chen 170 Reputation points
2 answers One of the answers was accepted by the question author.

How do I remove the warning "conversion from 'int' to 'HMENU' of greater size"?

I followed the guide on Creating, Enumerating, and Sizing Child Windows, but I'm getting a warning on this line of code: (HMENU) (int) (ID_FIRSTCHILD + i), warning C4312: 'type cast': conversion from 'int' to 'HMENU' of greater size How do I fix…

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,540 questions
asked 2023-11-29T19:52:25.3933333+00:00
CDev-8220 220 Reputation points
accepted 2024-04-02T15:53:22.3466667+00:00
CDev-8220 220 Reputation points
0 answers

How do I manually add files to the External Dependencies folder in a VS Solution?

I can't seem to merge two Visual Studio projects, since using 'Add Existing Projects' does not include the project's solution, so I want to manually import the project. The only problem I can see myself having with this, is that I don't know how I 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,540 questions
asked 2023-12-17T01:02:13.15+00:00
CDev-8220 220 Reputation points
commented 2024-04-02T15:44:19.7933333+00:00
CDev-8220 220 Reputation points