|
Any Links to know more
Regards,
FarPointer
|
|
|
|
|
Yup i got your idea i will let you know .
Regards,
FarPointer
|
|
|
|
|
FarPointer wrote: 1. I want to store similar set of data together .
Are you talking about a struct , or an array?
FarPointer wrote: 3. Wen we are storing the data we dont know how many such set will come.
Ok, so just allocate memory dynamicaly. Some classes handle this automatically.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanx for the reply .
it was basically an implementaion of map of vector as told by kuphyer.
It was storing an object of type
CMyDevice{ CString szName ; CString szDevice;....};
on the basis of same name in CMyDevice.
Regards,
FarPointer
|
|
|
|
|
I have 2 apps: A and B.
A is a java application - similar to DOS - so let's say A is a Console.
A can work independently.
now B uses CreateProcess() and CreatePipe() to establish communications between B and A.
when B exits, A must work itself as running independently.
problem is that I have to recover A's in, out and error handles to independent states - as A is running itself.
do you know how to recover these stream handles?
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
includeh10 wrote:
do you know how to recover these stream handles?
Use CloseHandle() on the handles returned by CreatePipe() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
im using VC++6 MFC, i want to create and save some data out to a file such as a csv file or even better a excel file.
I know of CFileDialog to bring up a save dialog but how do i pump out data in a csv or excel format
thanks
|
|
|
|
|
have your data as comma seperated values each row seperated by newline adn then jsut give the file .csv extension. That's how I used to do it.
|
|
|
|
|
how did you write the data out thou, i see there is CArchive but doesnt appear to do much!!
|
|
|
|
|
|
viperlogic wrote: im using VC++6 MFC, i want to create and save some data out to a file such as a csv file or even better a excel file.
To communicate with Excel, you can use its ODBC driver, or Excel automation.
viperlogic wrote: I know of CFileDialog to bring up a save dialog...
CFileDialog has nothing to do with how the data is saved. It is for filename selection only.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
im wanna go down the csv route.
i am using the CArchive as follows
CFile f;
char strFilter[] = { "csv Files (*.csv)|*.csv|All Files (*.*)|*.*||" };
CFileDialog FileDlg(FALSE, ".csv", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite);
CArchive ar(&f, CArchive::store);
ar<< m_Make << m_Model << m_Year << m_Mileage << m_Owner;
ar.Close();
}
else
return;
f.Close();
the above is coming out in one cell with a rectangular box after each string
how do i get ride of those retangular boxes and have a string in a seperate cell
thanks
|
|
|
|
|
viperlogic wrote: the above is coming out in one cell
But what does it look like when viewed with Notepad?
Try:
CStdioFile f;
...
ar << m_Make << ',' << m_Model << ',' << m_Year << ',' << m_Mileage << ',' << m_Owner << endl;
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
still get the boxes as seen below
a,b,c,d,e
|
|
|
|
|
Which implies that m_Make , m_Model , m_Year , m_Mileage , and m_Owner have an odd character in them. Yes?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
CString m_Make="a";
CString m_Model ="b";
CString m_Year ="c";
CString m_Mileage ="d";
CString m_Owner="e";
for testing purposes i have them as above, so where is this box coming from!!!
|
|
|
|
|
viperlogic wrote: so where is this box coming from!!!
Unicodedness of your program without writing the unicode-header?
A decent file editor (as opposed to a CEdit-gone-application like notepad) like Ultraedit would show it.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I have asked in c# forum,but nobody answer me.
Does anyone here can give me a tips?
Thank you.
|
|
|
|
|
|
In my application, I get excel' HINSTANCE,I want to get it's ProcessID,So I can right control that excel instance that I created.
|
|
|
|
|
Hi,
I am developping my own bluetooth application. I will comunicate through serial port profile with another device (no mobile phone, no PC) but specific bluetooth device. My application is written in Visual C++. On MSI support they written to me that I should use Widcomm bluetooth driver, but I can't find how to use this driver from my application.
Can help me somebody with this problem?
Marek
|
|
|
|
|
Hi all,
I'd like to get the selected extension, when I close file save dilaog. If I select any file, No problem. But If I enter a name, I need to have current exetension. How to get this?
Thanks in advance,
Sarvan AL
|
|
|
|
|
Does either of OPENFILENAME.nFileExtension or OPENFILENAME.lpstrDefExt help?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|