mfc

How can you detect if your MFC application is not responding?

How can you detect if your MFC application is not responding? ...

Convert MathML to MathType in MS Word

Hi, I am writing a converter from XML&MathML to MS Word document. I'm using MFC and Word automation, so there's no problem in writing text like this: _Application app; COleVariant vtOpt(DISP_E_PARAMNOTFOUND, VT_ERROR), vtTrue((short)TRUE), vtFalse((short)FALSE); app.CreateDispatch("Word.Application",NULL); Documents docs = app...

Shrink the bitmap to required dimension

Hi, I have a bitmap of large dimension (2000 x 2000) i need to shrink that bitmap to a small dimension (150 x 150). i have written a code for it, but its not working. Can anybody help in finding the problem? The problem is the destination bitmap is just blank. I am selecting wrong DC's? I have made sure that both the source and destinat...

create a control programmatically using MFC

Hello guyz, I just wonder how to do it. I write : CEdit m_wndEdit; and in the button event handler (dialog app), I write : m_wndEdit.Create(//with params); but I still don't see the control appear in the UI. help. I actually wrote this in the button handler : CWnd* pWnd = GetDlgItem(IDC_LIST1); CRect rect; pWnd->GetClientRect(&...

How do you disable closing an application when it is not responding?

How do you disable closing an application when it is not responding and just wait till it recovers back? ...

Windows Mobile/Pocket PC: How do I change the border color of focused/unfocused CEdit, CListCntl, CButton in MFC or Win32

How do I change the border color of focused/unfocused CEdit, CListCntl, CButton in WinCE/Windows Mobile 5/6 with MFC or Win32 API? ...

Application crashes says : Access violation reading location

My application crashes after running for around 18 hours. I am not able to debug the point in the code where it actually crashes. I checked the call stack- it does not provide any information as such. The last few calls in the call stack are greyed out-meaning I cannot see the code of that part-they all belong to MFC libraries. However...

CArray and const template parameter

Is it possible to use const parameter to CArray I am currently using CArray like this but it won't compile: typedef CArray<const CString, const CString&> data_container; And I always get this compile error : error C2664: 'ATL::Checked::memcpy_s' : cannot convert parameter 1 from 'const CString *' to 'void *' ...

Ever done a total rewrite of a large C++ application in C#?

I know Joel says to never do it, and I agree with this in most cases. I do think there are cases where it is justified. We have a large C++ application (around 250,000 total lines of code) that uses a MFC front end and a Windows service as the core components. We are thinking about moving the project to C#. The reasons we are thinking ...

How to redirect MFC messages to another object?

In an instance of a class derived from CWnd, is it possible to forward (redirect) all MFC messages to another object, without writing separate handlers and message mappings for each possible message? Specifically, I'd like to forward all unhandled WM_ messages to another object. If this isn't possible, then is it possible for objects ...

MFC separate groups of radio controls

I have added 8 radio buttons in my dialog layout in the resource manager, but I am having trouble separating them into 2 groups of 4 buttons. I have attempted to add a control variable, but I don't see the option of CButton available in the drop-down menu in the wizard. What would be the easiest method to accomplish this goal? ...

Close or discard MFC dialog after a given period of time

how to close or discard a MFC dialog box Automatically after 10 seconds. ...

Best way to close and wait for a child frame window using Win32/MFC

There are a few options here, probably, but what would you suggest to be the safest way to accomplish the following: I've got a child CFrameWnd with a parent = NULL (so that it can live a separate life from the main application, while the app is running, at least). I've got all those windows stored in a list. When the main app is closin...

How to traverse a windows explorer like tree structure

Hello All. I am working on designing a FTP client and need some help with designing a feature which its sole purpose is to be able to traverse a tree like structure and upload the folders and files which have been selected by the user. So essentially the user can select multiple folders and files at one time from the local file and fol...

MFC programming in c++

Hi there, I am new to this MFC stuff, I am working on a project, where i need to use class CFileFind which is in MFC. how can I link to my regular VC++ program to use that class. I am completely new to MFC, n apologize if there is a mistake. thanks in advance. ...

Language to write a Windows application that doesn't take up a lot of space

I need to write a Windows XP/Vista application, main requirements: Just one .exe file, without extra runtime, like Air, .Net; posstibly a couple of dlls. Very small file size. The application is for network centric usage, similar to ICQ or Gtalk clients. ...

Using CList in a multithreaded environment

I am using a CList in a multithreaded environment and I keep having problem with the GetHead method. I have one thread that add data to the list, and an other thread who read and remove data from the list. Here is the reading part : value_type get_next() { T t; if(!queue.IsEmpty()) { t = queue...

Convert MFC CString to integer

How to convert a CString to integer in MFC (VC++ 6.0) ...

C++ Builder vs Delphi vs MFC

I am learning MFC and find it not that easy to use. I've heard a lot about Delphi . researching on Delphi lead me to C++ Builder. does C++ Builder offer a serious and good alternative to C++/MFC ? is C++ Builder better than MFC ? is C++ Builder better than Delphi ? (I've heard many goood things about Delphi) can any one give me a comp...

cpp datatype

Hello i am developing an MFC application in vc++ 6.0.I created one int variable(m_iEdit1) to the EditBox1 and one CString variable(m_strEdit2) to the EditBox2. I wanted to give the condition that two editbox must not be empty. if(m_iEdit1==" ") return; if(m_strEdit2==" ") return; But the first condition will not work here i wil...