Thanks for the response. I tried using the class CEditView in a small test program and the small test program broke. As I understand it, the class CEditView is part of the Document / View model. The test examples that I have tried with the Document / View model did not seem to work or had issues. I am thinking that to change my code to use CEditView is going to be a major change. Do I have that right?
Do you ever turn the read-only style off? If so, have you considered using a static control instead? What if you disabled the control instead of making it read-only? Have you tried setting the focus to the next control?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Can we append the _RecordsetPtr with another _RecordSetPtr . Suppose my recordset is having data for 2 rows . There are such 3 recordset. Can we create a new recordsetPtr which will be used to traverse through all these recordsets...is it possible..??
Thanks in advance..
I'm working on an MFC application. For reasons I cannot fathom, there seems to be a problem with inconsistent display of the icons of an icon style CListCtrl between versions of Windows (XP and Vista). On Vista, one of the icons (Debtor statement) is omitted. This only occurs sometimes. When it actually occurs varies from build to build of the application, where changes between builds ought to have no bearing on this at all.
Why might this be? How can the problem be fixed? Here is the relevant code:
I seem to have isolated the problem somewhat (It still erratically tends to swing between omitting and not omitting the icon between builds, I guess).
By commenting out:
I can make the problem disappear (although I have a new problem, which is that the icons are displayed as one big column). Commenting out anything else of note doesn't have the effect of suppressing the problem, so I guess that's progress.
That seems like a reasonable explanation. I've found that moving the initialisation of the icons into OnIntialUpdate seems to fix the problem, but I'm not overly confident that it hasn't just temporarily concealed the problem.
Where is imgl declared? Is its lifetime longer than the lifetime of the list control?
It's a good idea to always zero-init structs, like LVITEM, so that you aren't accidentally sending garbage data in the members that you don't explicitly set.
I am working on an application, which calls a WPF page in MFC exe and loads it too, but the backgound for the WPF is coming black.
here is code snippet Declaration
using namespace System;
using namespace System::Windows;
using namespace System::Windows::Controls;
using namespace System::Windows::Media;
ref class Globals
static System::Windows::Interop::HwndSource^ gHwndSource;
static WpfApplication1::Window1^ gwcContainer;
}; i have added in oninitdialog,
I got 1231 error value when using the code below.
1231: The network location cannot be reached. For information about network troubleshooting, see Windows Help.
my lan and internet is working fine.
then where is actually the problem residing.
If you want to use ping from your application, have a look at boost::asio. Boost have a ping example program that you may be able to adopt. Note that your application requires administrative privileges on Vista to create ICMP packets.