|
hi!
i really !! need to save my files in excel file format .
so plz help me
ron.
|
|
|
|
|
Saving .xls files programmatically is doable, but not what I'd call trivial - excel has a COM interface, or you could figure out the .xls format (yucch)
Just thought I'd mention that if you save your data as a comma delimited file (just crlf delimitted rows of quoted stings and text numbers separated by commas) you can drag and drop the whole file into excel. Works great.
|
|
|
|
|
Oops - I think I made a mistake there - the format I used was tab delimitted - I saved the file as text (both numbers and text) separated by tabs. So, tab delimitted, not comma delimitted.
However, if you change the file extention of the comma delimitted file to .csv it will work as I described it.
|
|
|
|
|
How you approach this is really going to depend on exactly what you want to achieve.
The Excel file format is very rich and flexible, and as someone who has coded an importer for a rather large portion of the BIFF7 format, I can tell you that you probably don't want to be screwing with writing to the binary format unless you have good reason. It's complicated, it's touchy, and although it is a pleasurable intellectual challenge, it is very, very time consuming.
So, Excel will import dozens of standard file formats as simple as DOS text, that might be an option.
As Tim (father Tim as he was known to us ) has stated you can do a great deal by using Excel through COM automation.
If you simply need to place text and values (not formulas or formatting) into an Excel file, then there is an Excel file driver for ODBC that will do the trick. I'm almost positive the driver is freely redistributable, but you'll have to do your own research on that.
HTH,
D
|
|
|
|
|
thx everyone!
|
|
|
|
|
i need help in my project .
i need to get the computer name/user name
of the person who login the window.
if any one can help plz replay.
pascal.
|
|
|
|
|
Eric Funkenbusch (did I spell that correctly?) answered this one a while ago.
The answer is
GetUserName()
which you would have found in MSDN.
Stephen Kellett
|
|
|
|
|
Hello Everybody,
In the quest to produce a multi tracked studio and mix wave sounds and finally be saved to a mixed single wave file to disk, which of the following is the best approach and please direct me to technical articles on this issue as well excluding MSDN as I already gone through with no positive result!
1) DirectX (DirectSound, DirectMusic)
2) Low lever waveXXXX Sound API
3) MMIO API
4) MCI API
Each of the above have their own problem that one would face at the end for mixing the sound buffers. The examples with the DirectX SDK are all just for mixing and have no final wave saving functionality. Any help, Link or A General Hint on this issue ( saving the sound buffers into a single wave file ) will be really appreciated.
Thank you.
|
|
|
|
|
From memory, DirectX *does* have a wave saving facility, although at the point the book I have was written ( the Microsoft Direct X book ), it was just a thin wrapper on the GDI wave saving stuff. DX is definitely the way to go, IMHO.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
how can I obtain handle to a window if I have handle to his process ?
pls help
Ivaylo guberov
|
|
|
|
|
Its tricky to get the main window of a process. One thing you can try is to call ::GetTopWindow(NULL) and ::GetNextWindow(...) until you have all the top level windows, then find the processes associated with them with GetWindowThreadProcessId(...) .
You may find there is more than one top level window for the process. I've seen programs where arrays of comboboxes show as top level wnds! So, you need to do a few more heuistics to pare it down - maybe discarding certain window class texts, or windows with "" for their WindowText, or ferreting some resonable set of children for each, but I don't think there's a GetMainWindowForProcess function.
|
|
|
|
|
Any one know how can I write the code that can moving an image(bmp) across the screen?
Now I am currently working on my project. I must write the simulation program on VC++ about Train Station System but I don't know how to write the code that can display the train(bmp) moving on the rail (background). So, please suggest me which function I must use or other..
Thank you
|
|
|
|
|
you should be looking at the directx stuff
ie, directdraw, etc
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
"every year we invent better idiot proof systems and every year they invent better idiots"
Does this mean we are improving at inventing idiots ?
or does it really mean that the idiots are inventing the "better idiot proof systems",
I Respect your opinion !
Regardz
Colin Davies
Mode robotoid idiot O' boredom
|
|
|
|
|
The bmp you want to move around is actually called a "sprite" in the world of 2D Animations. A sprite is basically a Bitmap with a Mask that would make the unwanted areas of the bitmap in question to not be drawn or in other wotds turn transparent and then are both blitted to the screen over another Bitmap of the background.
You can produce a mask for your Train bmp and then blit it onto the background image usinf BilBlit(..) function.
Load your image using the LoadImage(..) function, or better yet put your image as a resource in your app and then load it.
Search the google.com on "Windows Sprite Programming" and you get a lot of good replies!
Good Luck!
|
|
|
|
|
Any one has any suggestions on how i may execute a few batch files programmatically?? I would like to use C++.
Thanks in adv.
Sean
|
|
|
|
|
|
for real fun parse the BAT files,
and then use system() thus you'll
be able to trap for any errors in your windows APP,
Regardz
Colin Davies
|
|
|
|
|
Different computers have different screen areas. How can I programmatically attain a list of screen areas for a computer and how can I programmatically change the screen area?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Checkout EnumDisplaySettings and ChangeDisplaySettings in the MSDN.
|
|
|
|
|
Tim, go out and have some green beer will you . Have one for me too as I'm marooned at home with a sick wife, two sick kids and a sick me .
(how's that for totally overusing a smiley!)
David
|
|
|
|
|
Hi folks,
simple question :
I have 2 threads running where the second threads (not written by me) writes a lot of output to COUT, thou this thread has no console the data is lost. I can redirect this output by hard to a file.
I like to get the data written to COUT for debuggin in a CEdit field or some kind that ?
I never though about such a problem ?
Any Ideas ? Any Clues ?
Thx
oliver
|
|
|
|
|
I have a cformview w/ a control that I'd like to have respond to the enter key. I understand you can use getdlgcode for dialogs, but would I need it for this situation? How would I go about doing this? I searched around but didn't come up with much in my situation. Any leads would be appreciated.
Thanks in advance.
|
|
|
|
|
I don't know if this is good practise or not, but I found the keys being eaten on the way through some PreTranslateMsg code, so did this:
BOOL CSmc3View::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message != WM_KEYDOWN)
return CFormView::PreTranslateMessage(pMsg);
else
return WindowProc(pMsg->message, pMsg->lParam, pMsg->wParam);
}
Now, OnKeyDown gets hit in the form view class, and enter doesn't seem to be a problem. But I don't know if this is kosher - it bypasses a lot of MFC code... caveat emptor.
later...
er... and oh yeah... then you can call the OnButton code from OnKeyDown... geez, what a hack! oh well... I try...
|
|
|
|
|
Hi
Can you recommend some sockets library
preferably based on C++ templates like STL or ATL
Thanx
|
|
|
|