Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

Bug in `CopyAcceleratorTable` from `winuser.h` on 64-bit?

I am experiencing a weird bug in the function CopyAcceleratorTable when compiled for 64 bit (CopyAcceleratorTable). I have two accelerator tables (from two dlls) which I want to concatenate into a ...
pisoir's user avatar
  • 226
0 votes
0 answers
39 views

dynamically splitting window in mfc

How to implement dynamic splitting in mfc. Once we created splitting window during frame creation. Is it possible to change dynamically after sometime i.e., Using buttons ca we change 1x2 -> 2x1 ...
Shanmugapriyan M's user avatar
0 votes
0 answers
90 views

Passing any number of parameters as a parameter [duplicate]

I have a problem passing parameters from one function to another. I have a function ifOkay(), it takes any number of parameters. I want to pass all these parameters to the ConvertFmtToCString() ...
Dmitro's user avatar
  • 25
1 vote
0 answers
78 views

CUDA 12.8 causes #error: MFC requires use of Winsock2.h in MFC project, but works fine with CUDA 12.4

I'm working on a Windows MFC GUI application that uses CUDA for high-performance image processing. Previously, I was using CUDA 12.0 on a system with an RTX 3090 (Ampere), and everything compiled and ...
powermew's user avatar
  • 153
0 votes
0 answers
97 views

Determine Languages defined in .rc file in C++ MFC project

I have inherited some really old MFC code and need to add some additional functionality. I have figured out how to manually set the language- and due to items beyond my control- I am defining the ...
Jt5's user avatar
  • 742
0 votes
0 answers
34 views

How to have two different components both using Microsoft Detours to detour the same function?

DarkTaskDialog is an excellent way to support a dark version of the task dialog in a MFC project. Example from the documentation: I have added support for dark mode to about 95% of controls in my MFC ...
Andrew Truckle's user avatar
3 votes
0 answers
63 views

How to Determine OneDrive or SharePoint Directory Using SHGetPropertyStoreFromParsingName

Question: I have been using PowerShell to check the Available Status of a file in OneDrive or SharePoint directories using Shell32.dll. Previously, the GetDetailsOf function returned Available Status ...
Woo-Hyun Song's user avatar
0 votes
0 answers
47 views

Microsoft Resource Compiler assigns different IDs for StringTable resources than what is given in Resource.h and the .rc file?

I'm converting what were formerly separate DLL and EXE modules of an MFC application (that is itself based on combining two disparate codebases) into static library (LIB) projects. I took steps to ...
Dennis's user avatar
  • 2,618
2 votes
1 answer
73 views

How to glue COM server to methods in C++

I have a lot of experience in C++ but am new to COM, MFC and MIDL. I'm trying to create a 32 bit COM server from an IDL file supplied by a third party. The IDL section looks like this: [uuid(3CA6AC95-...
Stephen's user avatar
  • 61
0 votes
0 answers
76 views

Hosting a WPF control in a native MFC Dialog C++ application

I would like to host a WPF control in a MFC Dialog application. I am following the chapter 7.4.1 (Using a mixed-mode extension DLL) instructions mentioned in book (C++/CLI in Action by NISHANT ...
latosvarun's user avatar
-1 votes
1 answer
99 views

Is using ODBC {CALL} to a SQL Server stored-procedure safe from SQL injection?

I am responsible for securing an old Windows C++ project. It uses the MFC ODBC CDatabase class to interface with SQL-Server. All DB query and insert operations are done using parameterized stored-...
xwellg's user avatar
  • 19
1 vote
0 answers
41 views

Can I stop the property grid control from keeping the item selected (when tabbing) or override colour?

I use the SetCustomColors function to set the colours of my CMFCPropertyGridCtrl object when in dark mode. However, when you tab off to another control in dialog, the last row remains selected. This ...
Andrew Truckle's user avatar
1 vote
1 answer
57 views

Setting colour properties of Date / Time Picker in MFC

Create a Dialog project and: add a Date / Time picker to the dialog map it to a control override OnInitDialog In OnInitDialog do the following: SetWindowTheme(m_Date.GetSafeHwnd(), L" ", L&...
Andrew Truckle's user avatar
3 votes
0 answers
49 views

Ensuring one instance of a Doc/View exists

Is there a way in a MDI application to see if an instance of a doc/view already exists? I can create an instance from a menu command, but I want to ensure that only 1 instance ever exists at any time. ...
Patrick Smith's user avatar
1 vote
1 answer
70 views

How to change the colours of a CMFCPropertySheetTabCtrl inside a CMFCPropertySheet

I derived CMFCPropertySheet class from and overrode the OnInitDialog function: BOOL CDarkModeMFCPropertySheet::OnInitDialog() { BOOL bResult = CMFCPropertySheet::OnInitDialog(); if (...
Andrew Truckle's user avatar

15 30 50 per page
1
2 3 4 5
880