|
When I build MFC app containing ComboBoxes using VC7 under WinXP, and then run this app under Win98se, in all ComboBoxes I see only currently selected item.
It happenes no metter how I add the items to Combo, even if I do it like
m_ComboBox.AddString(_T("First"));
m_ComboBox.AddString(_T("Second"));
m_ComboBox.AddString(_T("Third"));
m_ComboBox.SetCurSel(0);
in Win98 I see only "First".
Is some one ever had such a problem?
|
|
|
|
|
The expanded size of the combobox is too small. In the resource editor, click on the down-arrow in the combo, that will let you resize it vertically. (Well, that's how VC 6 works, no idea if VC 7 does it the same way)
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hello, I'm trying to access the parallel port using Visual C 6.0, but every time the program shutdown with : Aplication error The exeption priviliged instruction....
I'am using in378=_inp(0x378);
does someone know some code to acces the parallel port in Win2k. I have seen some programs that give your aplication access to the port for Win2k, does someone know how they do that???
thankx for your time....
by the way Im new programming for Win2k...
Gpe. Ruiz
Equipment Engineer
guadalupe_e_ruiz@hotmail.com
|
|
|
|
|
Under Windows NT, 2000, and XP, the I/O instructions are privileged. That means that applications are not allowed to use them, period. Only device drivers are allowed to do I/O 'directly', and at that they don't use the I/O instructions; they end up calling functions in the 'hardware abstraction layer', and the HAL actually does the I/O.
That said, there are a number of packages out there that will let you do I/O via library calls. These packages include a device driver that the library uses to do the I/O. An example can be found here[^].
Software Zen: delete this;
|
|
|
|
|
Thanx. I will try to write a device driver to useit on my programs, but firts i will use the one on the link that you send me, thanx.
Gpe. Ruiz
Equipment Engineer
guadalupe_e_ruiz@hotmail.com
|
|
|
|
|
You will need the DDK. It's part of the MSDN subscription.
-Sean
----
Shag a Lizard
|
|
|
|
|
Ok, I'am subscribed to MSDN and have access to all DDK's, I will try to write a device driver to access the ports, Thankx for your time...
Gpe. Ruiz
Equipment Engineer
guadalupe_e_ruiz@hotmail.com
|
|
|
|
|
I am trying to write a program that will block any incoming traffic on a given port. I can handle all the threading aspect required. However, I am not sure how to write the actual code to block the port.
|
|
|
|
|
Is there a way I can use perl modules in my C++ program
|
|
|
|
|
can you advise me please how do I have to save information into a file? I have to store registration information of many users, so how can declare this.
|
|
|
|
|
You need to write a serializalble class containing your registration information. Here is a class that I wrote.
// SaveIP.h
//
#pragma once
// CSaveIP command target
class CSaveIP : public CObject
{
DECLARE_SERIAL (CSaveIP)
protected:
DWORD mID;
public:
CSaveIP(){}
CSaveIP( DWORD address, DWORD ID ){ mAddress = address; mID = ID; }
CSaveIP( const CSaveIP& src ){ mAddress = src.mAddress; mID = src.mID; }
DWORD mAddress;
CSaveIP& operator= (const CSaveIP& src);
void Serialize (CArchive& ar);
DWORD getAddress(void) { return mAddress; }
};
// SaveIP.cpp : implementation file
//
#include "stdafx.h"
#include "NSender.h"
#include "SaveIP.h"
IMPLEMENT_SERIAL (CSaveIP, CObject, 1)
// CSaveIP member functions
CSaveIP& CSaveIP::operator= (const CSaveIP& src)
{
if(this != &src)
{
mAddress = src.mAddress;
mID = src.mID;
}
return *this;
}
void CSaveIP::Serialize (CArchive& ar)
{
CObject::Serialize(ar);
if ( ar.IsStoring ())
ar << mAddress << mID;
else
ar >> mAddress >> mID;
}
|
|
|
|
|
Hi,
I am trying to read a binary file that has an array of n numbers from the hard disk.
I want to store these numbers in an array then display in a Edit box.
Any suggestions?
kash
|
|
|
|
|
Do you know the structure of the file? Is it a serialized CArray, or some other class?
I usually just use an ifstream, and the >> operator. But then again, I know ahead of time what I'm looking for in the file...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
It's a 1 * n matrix (i.e. a column of number, size n) of varying precision generated by an external program to my MFC project. I guess I could find the size of the array by counting the elements.
kash
|
|
|
|
|
if you have access to the output algorithm, that would certainly help. I know it would be a nightmare if I gave someone one of my binary files and said "here, read this", without knowing how I built it.
I guess the key question is if they are serializing the object as a whole, or simply exporting the data within the array. If it is the latter, you could use a std::vector and just pump the values back in.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I'm trying to allocate an array of list iterators based on the size of the list so I can later delete them. But the compiler won't let me create an array without a constant expression.
list<Vertex>::iterator itr1 = vertexList2D.begin();<br />
list<Vertex>::iterator itr2 = vertexList2D.begin();<br />
list<Vertex>::iterator erase[vertexList2D.size()];
while (i < size);<br />
for (i = 0; i < count; i++)<br />
vertexList2D.erase(erase[i]);<br />
}
How should I go about doing this?
|
|
|
|
|
create a vector of list::iterator items.
vector< list < Vertex >::iterator > iterVector;
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
Hello, I'm developing an interface in visual C++ 6.0...I have some boxes to input data. The program should be able to identify what data was inputted..that is I have three boxes and I just want to change the contents of the third one, if I type twice the tab-key, the contents will be no changed, but if I type something, how can the program know that the contect is being changed, or the contents remaind the same?.
I have tried with the OnkillfocusFUNCTION so to detect that i'm moving from one to another. inside the the function I'm using UpdateData() to retreive the data, but how can i implement the identification of the contents-update without having to ask for a previous value. in code this seems like:
if (field_code != old_value)
//do something
else
//continue
Is there anyother eaier way to do this?
Thanks,
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
The way I'd do this is to use EM_GETMODIFY/EM_SETMODIFY.
If you're using MFC, the easiest way may be to modify the DoDataExchange function so that after setting the text for the edit controls (if they're bound to member variables) you then use EM_SETMODIFY to say the controls aren't modified.
In the case where you're reading them, then use EM_GETMODIFY to find out if the user made a change. This means you don't have to cache the values.
Steve S
[This signature space available for rent]
|
|
|
|
|
Simply use EN_CHANGE event of Edit control
|
|
|
|
|
I want to draw a line inside my view window.When i will left click in the view window the line should expand according to my mouse move and when i will right click the line should be drawn from the left click point to the right click point(before that no line should be drawn)
how can i do that ?
manoj Kumar Dalei,
IIT Delhi
|
|
|
|
|
Handle the WM_LBUTTONDOWN and WM_RBUTTONDOWN messages, saving the points at which these occur, then in your WM_PAINT handler (or OnDraw if MFC) just use GDI calls (or CDC members) to do the line drawing. Check out the SCRIBBLE tutorial if you're using MFC.
Steve S
[This signature space available for rent]
|
|
|
|
|
Hiya how do you completely REMOVE a function or variable in .NET from the project...
grahamoj
|
|
|
|
|
.net has no class wizard like 6.0, if you wanna remove a function or variable you will need to remove it from the .h file of the class, and from the .cpp in case of a function
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
I usually use delete button, but you probably could also use backspace as well.
|
|
|
|