Hi,
In my VC++ MFC applcaiton,i have different views.And in each view,when i maximize it,i changed the size and position to new thing(Normally it fully get maximixed to screen size).But i dont want tht.So in OnSize() i coded like this.
void CChildFrame::OnSize(UINT nType, int cx, int cy)
{
CMDIChildWnd::OnSize(nType, cx, cy);
int XBo...
Is MFC is based on any design pattern,if so which design pattern??
...
I've had loads of problems detecting copy/paste operations in my custom subclass of CRichEditCtrl (WM_PASTE,etc don't get received) but got a working solution which traps paste events and removes formatting on pasted text.
Now I realised that CRichEditCtrl supports drag & drop by default and this bypasses my custom code. Are there easy ...
I have CFileDialog and set filter for it (Text files *.txt). When it opens, I see only TXT files, thats right. But! when I'm typing text into filename, the hint (under filename field) is showing all files (files with any extension).
Can be this behavior changed by some flag? I want force hint to show only TXT files.
...
CFileDialog f(TR...
Time was that I could F1 a symbol in my .cpp or .h file, and I'd be given a reasonable list of possible topics to delve into.
That was long, long ago.
These days, I press F1 and I'm rarely given information that is even vaguely, tangentially or tenuously related to the API or subsystem in question. Instead, I am deluged with Windows M...
Hello
I have an application that outputs large amounts of text data to an MFC tree control. When I call SetItemText() with a long string (larger then 1000+ char) only the first ~250 chars are displayed in the control. But when I call GetItemText() on the item the entire string is returned (1000+ chars)
My questions are;
Is there a...
It seems that disabling a checkbox through the Disabled property also grays out the caption. Does anyone know how to keep the caption enabled but disable input?
EDIT
Based on Paul's idea, I've done the following (now that I figured out that the static label and checkbox has a transparent property).
Added a couple checkboxes.
Set the...
Hi all..I have 2 dialog boxes in which I will display 1 dialogbox at a time..If I click NEXT in the first dialog box,I will hide the first dialog box and display the second dialog and vice versa...Now say If I move the dialog box after clicking NEXT in the first dialog..and when I click BACK(in the second dialog) ...it goes back to its p...
When try to do a memset it gives the following exception
"Unhandled exception at 0x1023af7d (PxSmartInterface.dll) in SendOutDllTestExe.exe: 0xC0000005: Access violation writing location 0x40e3a80e."
My memset statement will look like this
memset(lpStatus, 0, csStatus.GetLength());
...
I use a subclass of CRichEditCtrl to provide a CEdit+ type control. One thing I want is to disable drag-drop functionality, which the base class provided by default.
Disabling dropping is easy: ::RevokeDragDrop(m_hWnd);
But I can't see a simple way to disable the control being a drag-source. Is there an easy way?
...
Hi All,
I have an MFC application that reads and displays event log records using the ::ReadEventLog() API. The problem is with reading the "Description" message string of the event log record. The MFC application is unable to read the complete "Description" message string and displays only some part of it. However the Windows System Ev...
The ListView control of Windows Explorer gives a highlight to whatever item is under the mouse, without affecting the current selection. This helps enormously with relating what item a given tooltip applies to within a listview - especially in report mode.
However, I am currently unable to find any APIs that would give my MFC applicati...
Hi
I have my project developed in MFC which is unmnaged code. Now i need to create a similar application in C#, by reusing most of the MFC classes.
Is it possible to directly export class/struct/enum from MFC dll, so that i can import it in my C# using dllimport and use it.?
...
My question will be hard to form, but to start:
I have an MFC SDI app that I have worked on for an embarrassingly long time, that never seemed to fit the Doc/View architecture. I.e. there isn't anything useful in the Doc. It is multi-threaded and I need to do more with threading, etc.
I dream about also porting it to Linux X Windows, b...
Let's suppose you're an IT student with a basic knowledge of C++ and C#. Let's suppose that you want to design apps that:
need to deliver some performance like archivers, cryptographic algorithms, codecs
make use of some system calls
have a gui
and you want to learn an Api that will enable you to write apps like those described earli...
Looking for a method of dividing, via a splitter control, two controls on a CDockablePane derived class. I found CPaneDivider but it doesn't look appropriate. The two crontrols are CEdit and CListCtrl.
...
In our COM project, we need to choose between best string class implementation so that BSTR (used for COM interfaces) and elegant string class like CString provides many string manipulation APIs.
Are there any better way to handle the strings and string operations so that it can be BSTR complaints as well as we can have naive CString op...
Hi,
I'm trying to write a COM EXE using ATL. I also have a MFC application.
Both these applications would be run in local machines. Therefore, I don't
need to run these two processes (COM EXE and MFC) separately.
Can I create a single application (process) by combining these two applications ?
Is there any possibility that I can embed...
Hi i am developing game level editor.Currently I am using win32 with directX.But with win32 I cant achieve fully object oriented implementation.So I am thinking to develop it in MFC.
Will it be better option than win32?
Which technology(MFC/Win32) is widely used in industry?
Also which technology is most suitable for my project?
...
I am programming in c++ MFC,
I want to get "C:\windows" "c:\program files" folder path.
Sometimes user may setup windows in other folder such as c:\windows0.
Is there any API to get absolute path of the windows and program files path?
Many thanks!
...