Previously I used to use MFC collection classes such CArray and CMap. After a while I switched to STL containers and have been using them for a while. Although I find STL much better, I am unable to pin point the exact reasons for it. Some of the reasoning such as :
It requires MFC: does not hold because other parts of my program uses ...
I am developing a Application which takes two Files and output will be two files which will have only the contents which differs in both the files.
The application is developed using VC++
My Files are of Html type
Is there any library which will do the diff opereation between two files
...
Hi all,
I want to know if its possible to embed a flash movie inside an MFC app and let the user iteract with it. I know this is easily possible through embedding Flash activeX control. But I want the flash movie to be able to receive input from the MFC app (such as data and state update from the servers) and also should let the MFC app ...
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Why define these tags ?
CSortHeaderCtrl::CSortHeaderCtrl()
: m_iSortColumn( -1 )
, m_bSortAscending( TRUE )
{
}
What is the two functions after colon used for ?
BEGIN_MESSAGE_MAP(CSortHeaderCtrl, CHeaderCtrl)
//{{AFX_MSG_MAP(...
LPTSTR* arrpsz = new LPTSTR[ m_iNumColumns ];
arrpsz[ 0 ] = new TCHAR[ lstrlen( pszText ) + 1 ];
(void)lstrcpy( arrpsz[ 0 ], pszText );
This is a code snippet about String in MFC and there are also _T("HELLO"). Why are there so many String types in MFC? What are they used for?
...
I'm extending an open source project. After including afxcoll.h in a new C++ file in order to use CStringArray, I get this error:
Error: MFC projects cannot define _ATL_NO_EXCEPTIONS
I suspect I'll be able to fix the error by adding #defines or changing or rearranging the inclusion of headers, or, if that's not possible, using somethi...
Hi,
Is it possible to modify the opacity of all opened windows from C#. I googled for minimizing the windows and i came to know that its possible with pInvoke calls. It even worked. Similarly is it possible to change the opacity of all the opened windows from C#?
Also, i am not in to MFC stuffs. Still is there any tools to know the ...
I'm trying to make some static controls transparent on a windows dialog, but I'm having difficulty with one windows message.
Windows happily sends me a WM_CTLCOLORSTATIC message when drawing static controls, but this message is also sent to readonly and disabled edit controls. So - given just a hwnd to the control, how can I tell what k...
hai how to get windows xp button style in my MFC dialog
...
Sometimes our application needs to draw very long strings (e.g. 6,000 chars) using ExtTextOut. Sometimes ExtTextOut fails and returns zero and GetLastError returns zero as well.
To re-create the situation create a simple MFC Single Document application and then set the OnDraw to be:
void CTestExtTextView::OnDraw(CDC* pDC)
{
CTestExtTe...
I have a CDHTMLDialog running in IE that has a fixed size that I chose, and runs in a fixed window to match this size.
My problem is that the user can zoom on it (by ctrl-mousewheel) causing my html to be larger or smaller than the window which looks awkward and adds annoying scrollbars. Also, the user might use ctrl-+ or ctrl-- to cha...
I have a CDHTMLDialog in a BHO that I want to be partially transparent, in the sense that the transparent area changes according to the logic of the dialog. I got it to become transparent visually (using SetLayeredWindowAttributes), but it is critical to make this region truly transparent, because otherwise when I click on the transparen...
I am getting the following warning after I debug the MFC based windows application(visual C++). The problem is that it does not display the window. Why is it so?
Warning: m_pMainWnd is NULL in CWinApp::Run - quitting application.
The program '[2616] new.exe: Native' has exited with code 0 (0x0).
The code is:
#include <afxwin.h>
#inclu...
Hi,
I wonder how to specify CDialogBar default size when it is created in MainFrame of a MFC/MDI project. Here is the code to crate dialog bar.
// add Dialog bar window
if (m_wndDlgBar.Create(this, IDD_ADDLGBAR,
CBRS_RIGHT|CBRS_SIZE_DYNAMIC|CBRS_FLYBY, IDD_ADDLGBAR))
{
TRACE0("Failed to create DlgBar\n");
return -1; // fail...
I have an MFC dialog containing a dozen or so buttons, radio buttons and readonly edit controls.
I'd like to know when the user hits Ctrl+V in that dialog, regardless of which control has the focus.
If this were C#, I could set the KeyPreview proprety and my form would receive all the keystrokes before the individual controls - but how...
I have a Windows mobile 4.0 application, written using EVC++ 4.0 SP4 with MFC, that is exhibiting a random occasional crash in the field. e.g. Exception ox800000002 at 00112584. It does not happen under various emulators and simulators, hence is very difficult to trace using a debugger. The crash throws up and address and exception t...
Hello,
I need to write some mathmatical expressions (like a matrix and mathematical variables...) into my GUI.
The MFC static control is very limited on this issue. Especially for the math. symbols.
is there any control or other way to make this happen?
greetz
Ric
...
I'm using the MapX 5.0 ActiveX plugin in an MFC application.
I've got some temporary layers that I create in the following way:
// Create a new Fields Object
CMapXFields fields;
fields.CreateDispatch(fields.GetClsid());
// Create the field definitions for the new layer.
// Storing 64bit integers here. Is this even possible, btw?
fields...
Hi,
Does anybody know the "magic trick" for printing gray lines in an MFC/VS6 based application, using the PS_SOLID style?
It works when printing to PDF, but I just get black lines when printing to my black/white laser printer. It also works with the PS_INSIDEFRAME style, but it seems strange to me that a normal PS_SOLID can't do gray...
What would be the easiest way of using commands in the code to programatically disable these two features in an application? Thanks in advance.
...