mfc

How do I create and use a CFormView in an MFC regular DLL? (visual studio 2008)

I recently asked this question which got me started in the right direction - at least for loading the MFC DLL and trying to show a dlg box. The problem is, the typical dialog box is horrible as a main window for an APP. It is quite simple for me to create a new exe project to do what I want, but the problem is that I have a DLL and t...

Event Handling for MFC Dialog

This is my second question of the day, pardon me. I am writing a wrapper library to communicate with a scanner device. The source code was in C++ MFC. I am converting it to a plain Dll which will be invoked from C#. So, I am using DllImport in C# to call the wrapper library. Now I am provided with MFC code and the library is a ActiveX ...

How do I create a top-level Window in MFC DLL code?

I am using VC 2008. I call into an MFC regular DLL from a console app in C++. I want to show a top-level window (a form I created that is an IDD_FORMVIEW) Right now I have no window showing. I am not sure what is wrong. What do I have to do (starting from scratch) to create a main window in an MFC DLL? This is a regular DLL and ...

How do I display a CFormView in a mainframe?

I created an SDI MFC app without the doc/view support. The MFC template gives me an app with a blank window (And a menu, etc) I want to show my CFormView object on that main window. (Based on a dlg made in the gui editor) How do I do that? CreateWindow and showwindow don't seem to be all that is needed. All the web pages I find see...

MFC basic structure questions

There are few things I'm not sure of : When you create a basic SDI using MFC app wizard (let's call it TestMfc) you get : 4 major classes : CTestMfcApp CTestMfcView CTestMfcDoc CMainFrame What I noticed is that CTestMfcApp has those declaration ON_COMMAND(ID_APP_ABOUT, &CTestMfcApp::OnAppAbout) // Standard file based document c...

In MFC how do I avoid dialog boxes from staying on top of my app window?

I have a dialog box based application (MFC - VS 2008). I have a list control on it. I pop up other dialog boxes, but I also want to be able to get back to the parent app dialog. I can get back to the parent app dilaog box, but the problem is that even if I click on it with the mouse it remains hidden behind the "child" windows. I wan...

Can I use Qt as C++ Library without using its UI framework

Does it make sense to use Qt for increasing the productivity in an MFC app, without actually using the Qt user interface system? I am currently looking or a good productivity library for my MFC based application, with useful container classes, string algorithmus, threading classes, I/O classes and so on. The Qt API is very nice in my o...

How to ensure HTTP upload came from authentic executable

We are in the process of writing a native windows app (MFC) that will be uploading some data to our web app. Windows app will allow user to login and after that it will periodically upload some data to our web app. Upload will be done via simple HTTP POST to our web app. The concern I'm having is how can we ensure that the upload actuall...

How do I create Modal dialog in worker thread(Non-UI thread)?

I have written a sample MFC application in which there are two threads: -Main thread ( UI thread) -Worker thread ( non-UI thread) I have a specific requirement to create a Modal dialog in Non-UI ( worker thread). When I create the CDialog object and call DoModal on the same, it works. The dialog gets created and acts as Modal t...

Implement Overlay Icon ?

I read this article in http://www.codeproject.com/KB/shell/overlayicon.aspx. I have some questions that I cannot answer. Please help me? When I build the project to COM dll. When I use other program to call this dll. Which method could I will call to display overlay icon on the selected file? I think I will call GetOverlayInfo() first...

Monitoring Active Directory events

How can I programatically detect any changes that occur to Microsoft's Active Directory? ...

setup mfc project

Hi everyone - A word or two about project I have to make. I have a list of products (XML formatted), and I have to make a bar code of that list. Here are the requirements: Technology has to be MFC, VS 2005 or VS2008 All functionality must be in one dll Same solution should have a simple tester for the dll I will use pdf417. http:/...

CEdit selects everything when getting focus

When I move to a CEdit control on my dialog using the tab key or the arrow keys all the text in the control is selected. This behaviour is causing me problems and I would prefer it if the control just put the cursor at the start (or end) of the text and didn't select anything. Is there a simple way to do this (e.g. a property of the cont...

CString vs wstring

I have an MFC application in C++ that uses std::string and std::wstring, and frequently casts from one to the other, and a whole lot of other nonsense. I need to standardize everything to a single format, so I was wondering if I should go with CString or std::wstring. In the application, I'll need to generate strings from a string tabl...

MFC: CToolTipCtrl and user click

I would like to do a specific action when the user left-clicks on a tooltip (except on the close button) but I did not find any way to be notified for this kind of events, is this something possible with the CToolTipCtrl control? Thanks. ...

Event Handling for Dynamically Created Activex Control

Hello, The scenario: I have a TabCtrl in which I plan to place 1 ActiveX Control (myActXCtrl) in each Tab. The number of Tabs can increase dynamically. Hence, I have to create a new instance of ActiveX Control (myActXCtrl) each time and place it in the newly created Tab (I have done till this point successfully). The problem: Th...

MFC :: Modify the values in a json file

Hi All, I'm able to parse json files in MFC but is having a hard time modifying the values. Is there an easier way writing new values, other than converting it to native file types, modifying the contents and converting it back to json again? I thought it would be as easy as changing values in an XML file where you just look for the ta...

mfc autosuggest textbox (like in Windows Start->Run dialog)

In Windows XP if you click Start, Run (or Windows-key + R) you get a little dialog for running things directly. If you start typing, a resizable scroll-list pops up underneath the edit-box. I want something similar, so when a user is typing in a name to an edit-box, a list will suddenly appear if suggestions can be made. But I don't kn...

c++ identify current thread in function?

Hi! let's say i have a singleton object with a static function: static int MySingletonObject::getInt() now i would like to return a different int depending on which workingthread (MFC threading) is calling the function. I know that i can pass parameters to the threadingfunction when creating the thread. But Is there a way to identif...

How to get user's OU programmatically with ldap C++

how to get user's ou programmatically with ldap C++ ...