I'm writing a C++ MFC program on VS2008 and I'm getting this "Debug Assertion Error" when I first run the program sometimes. When I try to debug it, it takes me to this winhand.cpp file which is not part of the program I wrote so I'm not sure how to debug this.
It takes the error to this place in winhand.cpp
CObject* pTemp = LookupTem...
When I set the column text for CListView more than 271 characters, the rest of my buffer is not present.
I set it through LV_COLUMN structure.
Is this a known issue for MFC 4.21?
...
I'm developing a Windows Mobile application, and I faced a problem with CCommandBar, which combines toolbar and menubar. Well, I mean the following:
m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME);
m_wndCommandBar.LoadToolBar(IDR_MAINFRAME);
I have only one root menu option in my command bar and some buttons in toolbar.
It works perfectl...
I have two machines one running Win 2000 and one running Win XP both with VSC++ 6. I created an application using MFC on the Win XP machine (local) and successfully used the Win2000 machine (remote) as the target for debugging. The code was in a shared drive on the Win2000 machine. This setup worked well, just like in the movies!
How...
I am having CPropertySheet in top of ActiveX control. Property sheet is fixed to ActiveXControl size. I have added 5 Property pages in PropertySheet. Each Property page is having different height. I want to have common buttons for property sheet.that should be shown in end of (bottom) of each property page. (Not in same location for each...
I'm writing a GUI program and decided to go native on all platforms.
But for all the stuff i need to draw myself i would like to use the same drawing routines because font and unicode handling is so difficult and complex.
Do you see any negative points in useing Pango/Cairo. Well on MacOSX i havent succeded installing Pango/Cairo yet....
I'm starting using Qt in my application. My application is MFC based. I want to draw some QGraphicsItems in my currect MFC view, is it possible?
You may say that it could be done by hosting QGraphicsView with QWinWidget in the MFC view, that don't work, however. Because my Canvas (MFC view) supports zooming and rotating while the QGraph...
I developed (ATL)ActiveX control which used to launched by 3rd party applications. My control has CProperySheet as a child, and which has few property pages. Once control created, i creating instance of CProperySheet, adding property pages to sheet and setting sheet window size to fit control size. In the propery sheet i have three butt...
I have an MFC CToolBar (dockable to a CFrameWnd) containing a checkbox and a button.
This works fine now, but I need to remove the button, and then the CToolBar does not show properly any more. As it seems because it gets "zero" height. The checkbox style is "turned into" a TBBS_SEPARATOR using a call to CToolBar::SetButtonInfo before ...
I have a function where I will compress a bunch of files into a single compressed file..it is taking a long time(to compress),so I tried implementing threading in my application..Say if I have 20 files for compression,I separated that as 5*4=20,inorder to do that I have separate variables(which are used for compression) for all 4 threads...
Hi,
I asked this question earlier as well:
http://stackoverflow.com/questions/2773168/lnk2005-delete-already-defined-error-in-vc
The answer I got was that I should be using dynamic version of DLLs. I did that and it compiled fine.
Now, but when I gave the exe to one of my colleagues to run, they told me - they can't run it as it requi...
#define __T(x) L ## x
Found in code from one of the MFC source header file. It is mostly used for converting strings to ........ (I don't know what). If I am correct it converts strings to LPCTSTR...don't know what that type is either...
I can't seem to convert char* into LPCTSTR. While MFC file handling, the following code will ...
In a MFC SDI application containing a single CView, I pass the output device context pDC->m_hDC to a mapping library to render the map within the CMyView::OnDraw() method.
I would like the rendered image to appear in the centre of the cview surrounded by a black background, i.e. the image size would be smaller than the CView client rect...
I have the following weird problem on customer's computer (I cannot look in there and debug):
OS: WinXP
Application: MFC app on Visual C++ 6
There is a simple CDialog-based dialog that always worked OK. But on one of customer's computers the dialog hangs as soon as it is called. I managed to gather dump on it, and this is what I see in C...
I added a context menu to a MFC CRichEditCtrl, it includes a delete option which does:
ReplaceSel("",TRUE);
It appears to work but when I look at the undo log, it's not the same... we end up with characters being lost at the end of the sequence.
Any ideas how I can make my code be the same as what happens when you press DELETE? Or even...
Suppose i have pointer to a thread like this
CWinThread *m_pThread = AfxBeginThread(StartThread, this, THREAD_PRIORITY_NORMAL, 0, 0);
Now in my StartThread function assume i did all operations and the function returned like this
UINT CClassThread::StartThread(LPVOID pVoid)
{
return true;
}
Will my m_pThread be invalid when the...
I did a little digging and found stuff like this. However the advice to switch to LBS_OWNERDRAWFIXED style wouldn't work if the Listbox items don't all have the same height, would it?
Is there any fix to this?
...
I have a simple MFC program which displays the progressbar..I used the below code to display the progress bar..
HWND dialogHandle = CreateWindowEx(0,WC_DIALOG,L"Proccessing...",WS_OVERLAPPEDWINDOW|WS_VISIBLE,
600,300,280,120,NULL,NULL,NULL,NULL);
HWND progressBarHandle = CreateWindowEx(NULL,PROGRESS_CLASS,NULL,WS_CH...
I'm interested in seeing what considerations experienced developers make when developing high performance multithreaded GUI's for a windows platform. I ask this question in the context of developing trading applications where GUI's are very dynamic and application latency is an issue.
What architectures have you seen or would you recom...
VS2008, 32 Bit Win XP
In a class derived from CFrameWnd, I have an object of CDialogBar
that needs to have certain controls on it. Among these controls would
be 2 sliders, whose event handling is to be done in CFrameWnd derived
class. How shall I go about this?
class CFrameWndCustom : public CFrameWnd
{
CDialogBar m_wndDial...