mfc

Update of application Icon in Windows-7 Taskbar

I have a normal MFC Application with an embedded icon. If I start the application, the icon is shown inside the windows-7 taskbar. But when I change the icon inside the resources, rebuild the application and start it, the taskbar doesn't show the current icon, but the icon from the first run. There is no special code inside the applic...

Tool tips for custom made control using CToolTipCtrl ? (MFC)

I made a custom control derived from CWnd (a line chart) and I'm wondering if I can use CToolTipCtrl for displaying tool tips for points on the graph. If yes, how could I do that? Btw, when I move my mouse over the point, the rectangle containg string with information about values of the point, should pop up. ...

RePaint area (region) in sdi view MFC

I want to ask you one question about SDI MFC application. How can I repaint some area (region) on the view in SDI MFC application but without repaint complete view? ...

Output problem in mysql query in MFC program

I'm currently working on a small MFC program that outputs data from a mysql database. I can get output when i'm using an sql statement that does not contain any variable eg. select album from Artists; but when i try to use a variable the program compiles but i get no output eg. mysql_perform_query(conn,select album from Artists w...

Inter Process communication: MFC server, .NET C# client

Hi guys, I have two MFC C++ desktop applications exchanging string commands using named pipes. All good and reliable. Now, I have to add clients that are written in .NET C# using SilverLight controls. I know how to do named pipes in C#. But my first attempt to mix those failed: cannot connect clients to running servers. Is there an...

mfc, can any one help with an algorithm for airbrush, i just can't understand how to do it....

Hi all, Is there any way to fill an ellipse or a rect by point to point like in an airbrush tool in mspaint? I could not find a way to create an empty rect or an ellipse and then fill them up pixel by pixel or setting random pixels on screen in a circle way.... Can i tell setPixel to fill inside a dcellipse or anything like that? 10x...

How can I make a proccess in an OnLButtonDown() event happen again and again untill I live the button?

What happen until now is this: Any line happens once, and if I use awhile(1) or while (nFlags == MK_LBUTTON) its working as it should but I get a crash. The other problem, or maybe the same one is the delay if I will be able to do it, maybe using while() with Timer()? I was thinking about Timer() to recall the function with delay but ...

How to use a CTabCtrl in a MFC dialog based application ?

I need to do something which i expected to be was simple - create a tab control which has 2 tabs, implying 2 modes of operation for my app. When user clicks on Tab1, he'll be presented with some buttons and textboxes, and when he clicks Tab2, some other input method. I noticed that there was a CTabCtrl class thats used in MFC to add tabs...

CPropertySheet and CPropertyPages are appear in white color

I have created a simple propertySheet(CPropertySheet) and a couple of CPropertyPage derived classes. While running the application, the ProperySheet, Page and tabs are appeared in white color. I was expecting them to be like normal widow dialog color. Any clue to make the property sheet, pages background to be like other normal MFC di...

MFC Dll with COM Interface

Hi All, I am pretty new to managed/unmanaged interoperability and COM concepts. I received a suggestion of using COM Interop, for using my existing MFC code in C#. But the problem for me is, i have a MFC Dll which is not a valid COM component. How to make this MFC DLLs to have COM-accessible interfaces ready for use in .NET. I tried t...

How to create a drop down menu in MFC for WINCE

I have the following code in a win32 app that shows a drop down menu on clicking a button. However, this does not work in WinCE as MENUINFO is not defined. Is there any way I can get around this? I need to view a drop down menu on clicking a button, and the name appearing on the button changes depending on the option on the menu. void C...

Crash Reporting Utility for Windows 7, MFC Application

hi, I'm having a MFC application (VS 2008) which is going to be deployed on Windows 7 machine. I need to distribute my application with debugging information, so that a debugable core will be generated in case of application crash event. Can somebody please let me know how can I achieve this purpose ? I have read about minidump utility...

Creating multiple MFC dialogs through COM, strange behaviour

Updated: please see this other thread instead, all this COM stuff is not part of the problem. One of our apps has a COM interface which will launch a dialog, e.g: STDMETHODIMP CSomeClass::LaunchDialog(BSTR TextToDisplay) { CDialog *pDlg = new CSomeDialog(TextToDisplay); pDlg->BringWindowToTop(); } For some reason when the COM m...

[MFC] Creating multiple dialogs in an MFC app with no main Window, they become children of each other

(title updated) Following on from this question, now I have a clearer picture what's going on... I have a MFC application with no main window, which exposes an API to create dialogs. When I call some of these methods repeatedly, the dialogs created are parented to each other instead of all being parented to the desktop... I have no idea...

Problem in suspending 2 threads at the same time in MFC!

I am learning about threading and multithreading..so i just created a small application in which i will update the progressbar and a static text using threading.I vl get two inputs from the user, start and end values for how long the loop should rotate.I have 2threads in my application. Thread1- to update the progressbar(according to th...

'Generating code' and stop in building release mode (Visual Studio 2005 )

Hi! I have a problem about release build I'm using Visual Studio 2005. The project is worked on MFC When I build the project what I working in debug mode, It builds done successfully. but in release mode, Output window shows next 1>Compiling resources... 1>Linking... 1>Generating code and then.. it doesn't pass. It seems like be stop...

server/ client server connection

I have a server side program that creates a listening server side socket. The problem occurring is that it seems as if the client side sends a connect request it gets rejected if the server side socket is listening but connects if the server side program is not running. I can see the server side program getting the client request when de...

C++ LPTSTR to int (but memory overwrite problem using atoi)

I have the following code, m_edit is a MFC CEdit (I know I would never use MFC but project demanded it). It's a simple loop, that gets the text from a text edit, converts it to integer after getting the first line, then stores it in m_y vector. LPTSTR szTemp; vector<int> m_y; for(int i = 0; i < m_edit->GetLineCount(); i++){ szTemp ...

How to use DirectShow (dshow) to play files on WinCE device

I need to write a GUI application that will play media files on my WinCE device. I've checked the catalog files for the OS design I'm working with and found a dshow folder under src. This has a number of projects I can use, particularly filtertest which implements all the commands I would need. However, I don't understand how to interf...

How to read large number of files using multiple threads,help me please!

Hello all,in my application there is a small part of function,in which it will read files to get some information,the number of filecount would be utleast 50,So I thought of implementing threading.Say if the user is giving 50 files,I wanted to separate it as 5 *10, 5 thread should be created,so that each thread can handle 10 files which ...