|
My bet is that it's a difference MCF'S combobox. I bet MFC v2005 is doing clever things - and the imported project is using mfc42.dll.
Try not using CComboBox as a member variable and DDX_Controlling.
Try using SendDlgItemMessage (CB_ADDSTRING.... etc)
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
that's sounds sensible to me!
I'll give it a go and post if it works.
It does sound like a bug though doesn't it?
Paul
|
|
|
|
|
Hi Iain
I'm afraid I did't make much progress with your suggestion using SendMessage i.e. deadlines etc. However, I would like to thank you again for all your hard work in helping me with this problem.
Paul
|
|
|
|
|
Davros wrote: That is, it simply drops down with all the entries.
If all of the items are there, what's the problem?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
lol - well, because (1) the code isn't doing what it should and (2) you get list box which extends a large area and looks ugly.
(1) is the most important thing you - don't you agree?
|
|
|
|
|
Hi all,
I have a project to be done by this week!! i have a fingerprint censor from which i have to access the finger print data. Hoew do i access that data from that device. Drivers for the device is installed and can anybody help me to find some links and tutorials for accessing Hardware in MFC???
Please help me with some useful stuffs...
Thanks in advance
||SnAkeBed||
|
|
|
|
|
One key piece of information that may help people to help you is - how is the scanner attached to your PC, Serial cable, USB, FireWire, VMEBus, Bluetooth, WLAN 802.11.g &c
Once we've got that figured out I'd almost certainly suggest not writing the device communications stuff directly into your MFC app. Create a separate plain C++ Dll and possibly a stand alone test app to load it up and give it some exercise.
If you end up having to write a driver for your device remember there's a whole Driver Development Kit you can download from Microsoft with sample code and the like. Standards documents are also useful if you're dealing with a device that has to conform to some spec like USB or Ethernet.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
hi,
Thanks for ur reply
Its a USB Device and the driver for the device is already installed.so i think there is no need of writing a seperate driver for that.
Since i'm new to this subject can u please help me in providing some links for accessing a USB device
Thanks in advance
||SnAkeBed||
|
|
|
|
|
The way to work with USB devices is to first get the handle to the driver by calling the CreateFile functions. Once you have the handle, you can start exchanging data with the device by calling ReadFile and WriteFile (passing the handle). You can also exchange specific IO control codes with the driver by calling DeviceIOControl.
That's from a high level overview. You should have received documentation with the driver itself describing how to use it the driver (what are the IO control codes you can exchange with it, which name you need to pass to the CreateFile function in order to retrieve the handle of the driver, ...).
|
|
|
|
|
|
Where does that device come from ? Don't you have any driver supplied with it ? Any documentation that comes with the sensor ?
SnaKeBeD wrote: help me to find some links and tutorials for accessing Hardware in MFC
You almost never access hardware directly, except for things like devices connected to the serial port, but then the protocol is vendor specific and you won't find any generic tutorial.
|
|
|
|
|
hi
Thank you for ur kind reply.
There will be some way like accessing a camera with the default driver installed in the machine. I want something similar to that!!!!
||SnAkeBed||
|
|
|
|
|
drivers for that USB device is alrady installed
||SnAkeBed||
|
|
|
|
|
Then look on the website for the company that makes the scanner. They'll probably have documentation.
It's also possible that it acts just like an A4 scanner, only little and higher resolution.
In which case, maybe the driver comes with a TWAIN interface? I'm no expert on that.
Can you capture images using (eg) Photoshop? Did it come with applications?
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Hi,
I am creating a Winword document from a C++/MFC program and I need to lock the document so that the user can't change it afterwards. I have used the following code but it doesnt work. Anyone have any ideas what I am doing wrong?
TIA
Documents oDocs;
//Optional param
COleVariant vOpt(DISP_E_PARAMNOTFOUND, VT_ERROR);
oDocs = m_wordApp.GetDocuments();
m_document = oDocs.Add(vOpt, vOpt, vOpt, vOpt);
m_document.Activate();
// Then later...
COleVariant pw(pszPassword);
VARIANT v;
VariantClear(&v);
v.vt = VT_BOOL;
v.boolVal = FALSE;
// wdAllowOnlyReading appers to have a value 3 so thats what I use
m_document.Protect(3, &v, pw);
|
|
|
|
|
softwaremonkey wrote: ...change it afterwards.
After what?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thats spooky! It says I wrote "Change it afterwards". I have no idea what happened there.
Incidentally I am calling Protect as the last thing before saving the document.
|
|
|
|
|
I'm still unclear as to what you are asking. Are you wanting to password-protect a Word document?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Sorry,
My application automatically generates a calibration sheet as a Word document which I need to make read only so that users can print it but cannot modify anything afterwards.
The automation API (if you can call it that) exposes the dcoument.Protect() method which works if I create a Word macro, but when I call it from my app, there is no error but it doesnt protect the document.
Hope that this makes more sense.
Thanks
Tony
|
|
|
|
|
I think I have solved this one. Protection is lost when the document is saved usin the SaveAs() method.
The solution was to use SaveAs(), then call Protect(), then call Save(). A little cumbersome but it works.
Thanks anyway.
|
|
|
|
|
Hey all...
I need to hide my standard output(Command prompt) while executing the exe..
I'm making a program which takes one parameter(URL) and start download(If available) in command prompt only..
I want to redirect tht particular output in my richTextBox and while writing to richTextBox i don't want command prompt to come..
Is it possible??
Seeking For Reply..
Thnks in advance..
Rock On \m/
|
|
|
|
|
I've not ever tried it, but can your make your console window a child of a hidden window?
If you are just downloading a URL in the background, what about creating a Win32 application having no window?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thnks for replying..
I'm not downloading URL..I am downloading data in tht URL...
like www.xyz.com/a.exe
So it begin to download the contents necessary for a.exe..By default it shows in console...But i need same data in my richTextBox i.e my richTextBox should work like console...
Ash..
|
|
|
|
|
So you have two separate applications?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hey all..
I'm novice in VC++... Just made a program which just ping to specific URL and print the output to richtextbox using RedirectStandardOutput...
My problem is tht whenever i try to execute my exe(Release version) it rund fine but if i try in some different computer it gives following error..
".NET Framework Initialization Error
To run this application, you must first install one of the following versions of the .Net Framework:
v2.0.50515
Contact your application publisher for instructions about obtaining the appropriate version of the .Net Framework."
Hope to see reply soon..
thnks..
|
|
|
|