I'm writing a .NET wrapper around an old MFC-based library we have. It's based around a class that sends notifications using window messages; it has a function that lets the user pass in a handle to a window, and that window will receive the messages.
I could just require the users of my wrapper to subclass Control and pass their contr...
I want all the controls (edit,list control, etc) in my application to be having the same font which is not the system default. How do i do this? Is there any Win32 API that sets the application default font?
...
How to check a popup menu item?
...
What are the good layout managers for MFC apps ?
...
Is there any function that I can call to in a 32-bit app that would convert the paths that it thinks it's using to and from the paths that it's actually using? (For instance, call it to convert the path for a folder in Program Files to a path in Program Files (x86) or vice versa when running on a 64-bit system.) I need to do this so that...
When I print the CDC for a report control that I've created it appears tiny (less than 1 square inch on paper). How can I get the report to be printed to occupy the entire page ?
Or in other words, how can I make the entire report to appear in one printed page.
CPrintDialog printDialog(FALSE);
printDialog.DoModal();
CDC dc...
how do I create Splitters in an MFC dialog application ?
i don't intend to use Doc/View architecture.
...
// CMyDialog inherits from CDialog
void CMyFrame::OnBnClickedCreate()
{
CMyDialog* dlg = new CMyDialog();
dlg->Create( IDD_MYDIALOG, m_thisFrame );
dlg->ShowWindow( SW_SHOW );
}
I'm pretty sure this leaks. What I'm really asking is: is there any "magic" in MFC that does dialog cleanup when the dialog is destroyed. How wo...
I develop in C++/MFC and have placed all the resources in a separate DLL.
I have seen cases where the resource DLL is modified and the product is sold illegally with different name, graphics etc.
How do I prevent the resource DLL from being modified/hacked?
...
I have an C++ MFC applications that runs on most flavours of Windows CE / Mobile / PocketPC and Win32. When using CPropertySheet based tabbed dialogs the application under Win32, I get Ok,Cancel, Apply & Help buttons on the bottom of the dialog. On Windows CE, I get ?, OK and X buttons on the top of the dialog which do pretty much the ...
I'd like to add a command line interface to my MFC application so that I could provide command line parameters. These parameters would configure how the application started.
However, I can't figure out how to interface these two. How could I go about doing this, if it's even possible?
...
Hello,
I'm trying to remove the ribbon bar, but let stay the quick access tool bar and the icon orb, can anyone tell me if this is possible? and if yes how i can do this?
I try to hide it by calling the RemoveAllCategories function and then minimizing the ribbon, the problem is that the bar that holds the categories tabs stays visible ...
When building a project with Visual Studio, I noticed a nasty little post linker error, with windows Rebase
REBASE: *** RelocateImage failed (dll name) Image may be currupted
I was unable to get a usable build. I tried erasing all the object files and rebuilding, with the same problem. This happened only under certain compiling config...
Are there any tools for parsing a Visual c++ generated resource script? Is this resource script's format documented any where? I am looking for something in MFC or .net that could parse some data out of the files for reporting.
...
I want to parse a PDF file from my C# app and create an audio file off it.
How would I do that ?
I'm particularly looking for a good pdf to text library or a way to strip a pdf file off its text.
...
This is my first MFC application away from VC6, and I feel a little bit stupid:
How do I add the OnInitDialog handler?
(I know how to add it manually, but that's a pain in the long run).
double-clicking the dialog - nothing.
right click the dialog - "add event handler" is disabled.
Properties - Messages has "normal" messages, but not W...
There is a problem compiling Ogre with MFC in debug mode, you get an error because of the MFC macro:
#ifdef _DEBUG
#define new DEBUG_NEW
Which basically clobbers Ogre's debug new -
#define OGRE_NEW new (__FILE__, __LINE__, __FUNCTION__)
I'm trying to get MFC+Ogre to run merrily together in DEBUG mode, and I got it to compile with...
For example, in an MFC program, I have my main application and a 'class'. What should I do if I want to update a control (say, a listbox) that is situated on my main application from that 'class'?
...
I have a C++/CLI project that uses CWinFormsControl and CWinFormsView to create .NET controls in my MFC views. To do this I need to #include "afxwinforms.h".
When I run Code Analysis on the project, I always get warnings about some of the MFC classes I've included. Examples:
3>Running Code Analysis...
3>c:\program files\microsoft visua...
Hi All,
In our current codebase we are using MFC db classes to connect to DB2. This is all old code that has been passed onto us by another development team, so we know some of the history but not all.
Most of the Code abstracts away the creation of SQL queries through functions such as Update() and Insert() that prepend something like...