mfc

Is it possible to configure VS2008 to build using older VC++ compilers?

We are using VS2008 team edition and TFS for check-out/check-in, change control, etc, for C# WinForms and ASP.Net projects (plus we have the previous Visual Studio versions back to version 6 availble). We just inherited a VC++ version 6 MFC-based application. Migrating it to a later version of the VC++ compiler (as well as Visual Studi...

how can insert Browser control in MFC windows application?

i want create one simple windows form ,it just contain Editcontrol(textbox),Static Edit(label),Button (Name of Browse)..here i cannot implement browser control(to obtain filepath) in my form...i am using the the below path to create form.. visual studio2008->newproject->visualc++->MFC->MFC Application(under templates)...please help me to...

background image or color for a static box in vc++

anyone knows how we can set an image or color for the background in a static box in vc++ ...

How can I access an activex control in MFC?

I am creating a simple Windows form through Visual Studio->Visual c++->MFC->MFC Application. It only contains one static edit (label), a browse button and one button. Here I put a browse button by right clicking in the dialog box and I selected "Add ActiveX control", "SelectFile class". Now when I run the form it works, but I want the ...

Using CUDA in an existing MFC project

I have an existing MFC application with matrix computation with CPU-optimized BLAS libraries. I'm interested in adding CuBLAS computational functionalities to my project, but I have the two following questions: 1) I'm not sure if I would need to do something on specifying my own CUDA kernel, thread, and block configurations at this poin...

MFC localization not working with MUI install of Windows 7

OK, so we're writing our MFC application to make use of the built-in localization support with satellite DLL's since MFC 7. Everything seem to be working fine, except that my Windows 7 Enterprise Edition install with MUI support and using a Swedish UI instead of an English UI still displays the English UI in our application. The applica...

When i proceed to develop a software, ui design or database design, which should be first ?

I tried to design the ui with some ui mocking software, but i found it's hard for me to settle down all the detail of the design, since the database didn't design yet. But if i first design software, then the same problem occur, I didn't have the UI, how can I create a prominent UI ? ...

CListCtrl get item index

How do I get an item's index number using the caption text? I'm using CListCtrl class of MFC. I have the item's caption text, can I get the index for that item and then update its text. It will be helpful if you could provide an example. ...

Glut: how to know when the window is moving?

Hi, I have a problem with glut, I would like to have a callback to know when the user is moving the window of my application, and I didn't found anything in glut. My goal is to make an application only on windows, is it possible to do this with MFC keeping my glut code? Thanks in advance ...

QueryInterface method for the IID_IPersistStreamInit quit working

I have an application that I've been using to parse data from an HTML document. The application has been working for a few years until this week when the QueryInterface method for the IID_IPersistStreamInit started failing. The call to QueryInterface is returning -2147467262 which fails the SUCCEEDED(hr) test. Any ideas why this quit wor...

How do I set a specific printer for a report?

I want to print a customized report to a specific printer, bypassing the print dialog. The printer is to be selected by the user for each report template. Right now I have the code to print the report showing the print dialog, or directly to the default printer. I need to change it in order to print directly to a printer which is not n...

MFC Open Folder Dialog

In MFC, is there an Open Folder Dialog? That is, rather than choosing a filename, it chooses a folder name? Ideally, I'd like it to be the way Visual Studio does it when navigating for a "Project Location" (when creating a new project), which looks very much like a normal file dialog. But I could make do with one of the vertical tree sor...

Model View Controller inside a Model View Controller

I've just recently completed a personal project and one technique I did use to break down the interface was to have one main Model View Controller that was handling a lot of the main logic of the application. Then for the most part, there were many generic controls lets say a Slider and a Text Field that were bound together to a single f...

Use CArray class from MFC in C++ Builder application

Hello. There is a need to pass CArray instance to an external DLL from my application written in C++ Builder. Is there a way to utilize MFC from C++ Builder? If yes, how? Addendum: this DLL is not mine and I cannot change it. ...

I can't seem to add a column header to a list box in an inherited MFC dialog. What's wrong?

Hi, I have a CStdDlg thats inherits from a CDialog class. In the CStdDlg dialog, I have a list box (m_lcList1), edit box (m_ceEdit1), a radio button(m_rbButton2) and buttons OK, Cancel and Button1. I am trying to create another class named CDerivedDlg that inherits from CStdDlg. I want to use everything in CStdDlg but from the CDeriv...

MFC: How to i convert DWORD and BYTE to LPCTSTR in order to display in MessageBox

I'm using VS2005 with "using Unicode Character Set" option typedef unsigned char BYTE; typedef unsigned long DWORD; BYTE m_bGeraet[0xFF]; DWORD m_dwAdresse[0xFF]; How do i make the code work? MessageBox (m_bGeraet[0], _T("Display Content")); MessageBox (m_dwAdresse[0], _T("Display Content")); ...

How do I un-highlight a previously selected line in an MFC CListCtrl programmatically (VS 6)?

Does anyone know how to un-highlight a previously selected line in an MFC CListCtrl programmatically ? ...

ASSERT fails on CDC SelectObject() call - What can I try?

I'm working on a multi-threaded win32 MFC application. We are rendering a map and displaying it in a pane in the user interface along with custom-rendered objects on top. It's slow to render (~800 ms), which is happening on the User Interface thread. I'm trying to move the rendering onto its own thread so that the menus still remain s...

Enable Windows Cleartype for MFC text controls created at runtime

I have a MFC dialog program in which I create a few CStatic and CEdit controls at runtime. Somehow the text in these controls aren't Cleartype enabled (Cleartype in Windows smoothes texts by sub-pixel positioning and coloring). However, when one manually adds an "Edit Control" or a "Static Text" control at design time from the Visual St...

In C++, how system implement the buffered stream ?

Can someone write some sample code to explain this concept? I know what a buffered stream is used for, but I also would like to know how to implement that. Thanks in advance! ...