|
|
|
hello,
This a question from a friend still studying C++, she'd like to know how to read from an excel file into her program.
a link or simple example would be very appreciated.
Thank you.
|
|
|
|
|
|
msdn wasn't much help, so thank you!
|
|
|
|
|
Star08 wrote: she'd like to know how to read from an excel file into her program.
You She should search for Excel Automation.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I'm writing a windows program which at one point needs to get information from the 'net user' command, however I don't want that ugly console window showing up!
Is there some way of getting the entire console buffer in one string, so that I can ofstream it to a file and then ifstream it into my windows program?
What I'm looking for might look something like this:
char *GetConsoleBufferString()<br />
{<br />
char returnval[1000];<br />
return returnval;<br />
}
Summery: I need some way of getting the entire console buffer in a string.
modified on Sunday, May 11, 2008 8:40 PM
|
|
|
|
|
Is your code starting this console window or is it already started?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I have the core algorithm writen in c, and want to build a nice GUI for that algorithm, how can I do it , to embeded into Java, or use MFC, which one is better to get the nice GUI?
|
|
|
|
|
it depends on a lot of factors.
What is your knowledge of C++/MFC vs. Java vs. C# vs. any other UI toolkit ?
|
|
|
|
|
Well, the natural choiche seems MFC .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi to everybody!
I have this strange problem. I'm deveoloping a C++ class for easy access
to windows Clipboard[henceforth WinClip]; a main topic is putting file handles (viz CF_HDROP clipboard format) to WinClip and reading file handles from it.
Up to know I can succesfully perform the following operations:
Put files into winclip (with c++code), then PASTE them with system-CTRL+V command.
Read files from winclip (with c++code) if they were previously COPIED by mean of system-CTRL+C command.
I CAN'T
Read files from winclip (with c++code) if they were prevously put into using my c++code.
This sounds very strange.
I think I should submit you several lines of code. If someone wants to help me and get more involved in the problem, I will post the main code chunks!
http://msdn.microsoft.com/en-us/library/bb776902(VS.85).aspx[^]
|
|
|
|
|
Does anyone know if there is a masked timecode CEdit-based control on codeproject or elesewhere. I haven't managed to find one so far.
It needs to be similar to a time control ("hh:mm:ss") but with the addition of a "frames" field.
hh:mm:ss:ff
It would need to be able to display and accept PAL or NTSC timecode values (25 fps or 30fps, drop and non-drop).
It would also be handy if it had the current Adobe Premiere method of adjusting the timecode, where you left-click anywhere over the control and then drag left or right to decrease or increase the value.
If there isn't an existing timecode control I'll have to write my own from scratch, so any tips on how to handle the left and right drag mechanism would be welcome.
BTW, my project is MFC.
|
|
|
|
|
colinbr wrote: Does anyone know if there is a masked timecode CEdit-based control on codeproject or elesewhere
[Masked Edit Control^]
|
|
|
|
|
If you are using VS 2008+, there's a new CMFCMaskedEdit Class[^]
(in the MFC feature pack).
You could probably implement the drag mechanism fairly easily in a
CMFCMaskedEdit-derived class.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all...
I am comparing dates which are in different format...
I want search the mails which are between the specified date and date..
Example
/////////////////////////////
Start Date = 03/28/2008 (mm/dd/yyyy)
End Date = 04/01/2008 (mm/dd/yyyy)
But the mail dates are in format ..
MailDate = 20080401 5:41:09 (yyyymmdd hhmmss).
//////////////////////////////////////////////
I want compare
if(mailDate <= firstDate && mailDate < secondDate)
{
printf("all the date between start date and end date");
}
else
{
printf("No mails found");
}
///////////////////////////////////////////////////
Sir how to compare this type of dates...
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Do you mean compare by strings, i don't know any API in VC++ to compare data time directly from string. You may need to parse the date in string format to date formats supported by any of the data/time data types in vc++ and compare the data type. for Instance you may use [COleDateTime::ParseDateTime^] to parse the mail date in string to the COleDateTime and compare it with COleDateTime created with start and end date values.
for COleDateTime it supports string format of "04/01/2008 5:41:09" your custom format requires you need to parse the values, search cp for parsing date strings [Parse date time string with spirit^] may be useful.
|
|
|
|
|
If you are using MFC application then.
use
COleDateTime startdat,enddate,maildate.
startdate.ParseDateTime(Start Date,VAR_DATEVALUEONLY);//Start date is start date value
enddate.ParseDateTime(EndDate,VAR_DATEVALUEONLY);
maildate.ParseDateTime(mailDate,VAR_DATEVALUEONLY);
and then use your code
if(mailDate >= firstDate; mailDate <= secondDate)
{
printf("all the date between start date and end date");
}
else
{
printf("No mails found");
}
object will ompares according to it.
abhi
|
|
|
|
|
Your code need a bit reformatting.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I tryied to export function from the executable module.
In the same way as a dll export.
It "works" - I can see it as an export in Dependency walker utility
But:
Whan I use LoadLibrary from different executable to load it
it also work but when i call it, it always crashes inside.
(when i rewrite first exe into dll it works fain)
Is there any special steps which must be done to export function from EXE module?
viliam
|
|
|
|
|
Hi ,
Just try to debug the Exported function through the Exe where your invoking the exported function.
I hope there must be a problem with App ptr.
|
|
|
|
|
I don't know if that's going to work since the exe loaded with
LoadLibrary hasn't run so no initialization is done.
Can you even step into the loaded exe file's code with the debugger?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: I don't know if that's going to work since the exe loaded with
LoadLibrary hasn't run so no initialization is done.
I agree. Probably he can only extract resources.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
CPallini wrote: Probably he can only extract resources.
That was my understanding
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|