Hi all,
I am trying to create a custom control that displays a bitmap with per-pixel alphablend (as some of you already know for other questions).
Right now I am using a custom control in the resource editor and I attach it to a class derived from CWnd. When I register my custom class I set the hbrBackground of the WNDCLASS structe to ...
I am using CODBCRecordset (a class found on CodeProject) to find a single record in a table with 39 columns. If no record is found then the call to CRecordset::Open is fine. If a record matches the conditions then I get an Out of Memory exception when CRecordset::Open is called. I am selecting all the columns in the query (if I change th...
Is there in Windows API or in MFC any analog to atoh() function?
atoh() converts a string containing a hexadecimal number into an unsigned number like
unsigned x = atoh("A");
and x = 10 after the operation.
In Windows I have a CString, containing "A". How can I convert it to int?
...
How can I destroy a pointer to CFindReplaceDialog object properly?
For example I have class:
class CjumpView : public CRichEditView
{
CFindReplceDialog *m_pFRDlg;
// ...
};
CjumpView::CjumpView()
: m_pFRDlg(NULL)
{
}
CjumpView::~CjumpView()
{
if(m_pFRDlg != NULL)
{
m_pFRDlg->DestroyWindow();
delete(m_pFRD...
I have a MFC dialog with 32 CComboBoxes on it that all have the same data in the listbox. Its taking a while to come up, and it looks like part of the delay is the time I need to spend using InsertString() to add all the data to the 32 controls. How can I subclass CComboBox so that the 32 instances share the same data?
...
I need a combobox in an Windows MFC application that has a search feature. It should work so that if you start typing something that matches one or more items in the list, the combobox should drop-down and display those items. Kinda like popular ajax-based search boxes on the web
Do you
- know of any control that provides this functiona...
Is it possible to derive custom-built dialog from CFindEditDialog? I want to build a dialog template in Viasual Studio Resource Builder (to draw it), then to hide the default Find dialog window and to use my instead.
MSDN says:
To customize the dialog box, derive a
class from CFindReplaceDialog, provide
a custom dialog template,...
Hey all.
I have CLI/MFC application and I would like to begin to learn how to unit test with it. I have VS2008 Pro. If possible, I would like to use the built in unit testing. Thanks for your input!
...
c++
mfc
if CHttpConnection::OpenRequest returns a null what can I use to get the internet error.
The mfc artical doesn't say what a bad responce looks like. I just said it returns a handle to a CHttpFile.
...
Hi All,
Need your help for the following issue:
I have defined a new dialog and its controls in an already existing resource file. I have also created a new file which will handle the events being generated from this dialog. But i am not sure how to connect these two.
Is the statement
*enum { IDD=IDD_NEW_DIALOG };*
all that is requ...
I noticed that I can start a program with it's associated handler by writing start filename. However, for some files, all I get is a console, and I don't know why. I'm trying to populate a list control in MFC, and I want to have the program and it's associated handler to run when I double click the selection. Is there a better way, or an...
Is there an equivalent to the Java File method isDirectory() in MFC? I tried using this :
static bool isDirectory(CString
}
but it doesn't seem to work.
...
We have a legacy app that uses MFC's CArchive. I am researching saving the data in XML vs. binary. I have looked several libraries such as:
Boost
http://www.codeproject.com/KB/XML/xmlize.aspx
http://www.ucancode.net/faq/Visual-C-MFC-XML-Example.htm
http://www.codeguru.com/cpp/data/data-misc/xml/article.php/c4567
They are nice, and of...
I'm trying to set an invalid value to -1.. But I don't like magic numbers.. Anyone know where to find a set of common constants. I'm working in VS6 (ish).
I'm trying to read a file from across a network, and I need a bad value for the total file size,so I know if I got valid info on it.. 0 is a valid size so I can't use that.
Harper ...
When the page displayed in our CDHtmlDialog does an Asp.Net AJAX UpdatePanel we get a navigate event, but everything after that seems to be lost. We don't have a document anymore or get any mouse events on the page.
...
I am getting an error while porting my application from VC6 to Visual Studio 2005.
Does anyone have any idea what this means?
mfcs80.lib(dllmodul.obj) : error
LNK2005: _DllMain@12 already defined
in MSVCRT.lib(dllmain.obj)
...
Hi,
I get the following error while trying to use hres = CoInitializeEx(0, COINIT_MULTITHREADED);
error C2065: 'CoInitializeEx' : undeclared identifier
I have already included:
#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <comdef.h>
#include <Wbemidl.h>
in my cpp file.
Kindly help.
Thanks,
Neha
...
How can I draw a line chart in VC++ 6.0?
...
Is there reverse function to MFC AfxParseURL (which creates URL from service type, port and so on)?
...
Hi,
I want to create custom tooltips where I can put any kind of controls. I have derived from CDialog and used the WS_POPUP | WS_BORDER styles. I also add the CS_DROPSHADOW style in the OnInitDialog to get the tooltip shadow.
Then I manage myself the WM_MOUSEHOVER and WM_MOUSELEAVE events to show/hide the tooltips.
I display the tool...