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.
How to plug/unplug USB serial port problematically?
I am facing some strange issue with my USB serial port.
I want to unplug and plug the USB Serial port Programitically, as i need to refresh the connection between system and hardware connected.Kindly help.......
I want to unplug and plug the USB Serial port Programitically, as i need to refresh the connection between system and hardware connected.
You cannot do that from user mode. You must ask the driver for that functionality if it supports it at all, which I doubt when it comes to serial port drivers for USB.
I am facing some strange issue with my USB serial port.
Perhaps you can elaborate on what the "strange issue" is all about.
It's quite possible that there is another solution than resetting the port/device.
What have you done so far and what problems are you facing that you want to solve by resetting the port?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
I'm not looking for a physics engine, what I'm looking for is simple car shape that can move forward and backward along with left/right turn functionality and as well as ramp climbing option.
It is highly appreciated if the above mentioned motions formulas can be explained.
I want to write a class that creates its own device context (dc) and provide function to draw line between two points. This class should provide function CopyDC(srcDC, destDC); This class should be an independent class (should not be derived from any other class) so that i could use this class in any other project later.
i have no idea how to do this in MFC dialogs. Please help me....
Im going to develop a new application.
Till now im using VC6.0 for my previous application. But now i want to create the application looking very glossy Office 2007 window style and more glossy colors in windows.
Actually my doubt is Can i do this in VC6.0 or is it easy to do in VC2008.
I have this 2 option.Im confused to choose one.
Because im well experiened in vc6.0 and i have whether i get this styles in vc6.
So please help me.What platform shoud i go for?
And also i want one more thing.For my applicaiton,it should be like:
Only toolbars will invoke while starting the applicaiton,it will go on to the top of our desktop,from the menu in toolbar i will switch to diferent window.this window has close and minimize buttons.
I know im little bit boring,but i need this help from u all experienced people.
There are libraries now for doing Office 2007-style toolbars, such as the recently-released MFC feature pack, but it's highly unlikely that they'll work in VC 6. I love VC 6 as much as anyone, but even I don't (or rather, can't) use it for new development anymore because newer libraries and SDKs will only work with the last 1 or 2 revs of VC.