|
Thanks
|
|
|
|
|
For CDR no way.
For .AI I try GhostScript that convert every AI (until version 13) to PS... the with PStoEdit I convert the EPS/PS file to regular SVG thet I import in my prog.
This is the only way I've found.
Bye.
|
|
|
|
|
Hi,
I have to split a string in the format mm/dd/yyyy. This is what I do:
CString date,sMM,sDD,sYY,str;
int yy,mm,dd;
int offset = date_poleSet.Find('/');
date = date_poleSet;
sMM = date_poleSet.Left(offset);
mm = atoi(sMM);
str = date.Mid(offset+1);
offset = str.Find('/');
date = str;
sDD = str.Left(offset);
dd = atoi(sDD);
sYY = date.Mid(offset+1);
yy = atoi(sYY);
Is this good enough? Or can it be done in two or three lines?
Thanks,
Tara
|
|
|
|
|
if your mm/dd/yyyy hypothesis holds then
mm = atoi(str.Left(2));
dd = atoi(str.Mid(3,2));
yy = atoi(str.Right(2));
is a bit more concise.
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
|
|
|
|
|
Wow! Thats nice. Thanks a billion.
Thanks,
Tara
|
|
|
|
|
Have you considered COleDateTime::ParseDateTime() ?
"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
|
|
|
|
|
Damn, you beat me to it
|
|
|
|
|
I guess my CPMRU was fully charged.
"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
|
|
|
|
|
Keep it in mind that no matter how charged it is, there may be some queries with which the CPMRU will not help you at all.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Indeed. That's a documented bug....won't be fixed for a few releases.
Good luck.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Can I ask what CPMRU is short for?
|
|
|
|
|
It is a 'private' joke. It means "Code Project Mind Reader Unit". It appeared recently because a lot of questions that were asked were so incomplete that you had to either see the screen of the guy or read his mind
|
|
|
|
|
Cedric Moonen wrote: you beat me to it
Using Sticks??
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
You could also use a COleDateTime[^] object: you "load" the date using the ParseDateTime method and then you can retrieve all the information you need using the different member functions.
The big advantage is that it checks for the date validity, which is a pain if you have to do it yourself (months don't have the same number of days and you have to take into account leap years too ).
|
|
|
|
|
Thank you. I shall look into ParseDateTime. Didn't know about that! Although for now, what you showed me (left,right, mid) is perfect for what I am trying to do.
Thanks,
Tara
|
|
|
|
|
Tara14 wrote: what you showed me
It was not me
Anyway, it all depends from where your date is coming from: if it entered by a user of your program, then it is better to check its validity.
|
|
|
|
|
|
I dont think you can add CDialogBar to Cdialog.
Yes CDialogBar can be floating. and offcourse you can show and hide it as a normal window.
If you stick to CDialog i dont think there is any easy way.
|
|
|
|
|
Hi,
I'm using VS 2005 to create a win32 application.
Now that i have my exe running i'd like to deploy my application and make it run on a dev-free environment.
Does anyone have an idea how to detect the exe dependencies? Of course i've used the dependency walker and i've got a list of dlls that need to sit in the app dir beside my exe. But still, my exe won't run outside visual studio and i get "abnormal program termination".
I'd highly appriciate your help.
Thanks.
Snir.
|
|
|
|
|
You have to execute vcredist_x86.exe on the target machine. This will install the C-runtime and MFC libraries on the target machine. You can download it from here[^] (scroll down if you have SP1 installed for visual studio).
You need of course to distribute the release version of your programs.
|
|
|
|
|
|
It doesn't sound like dependencies are your issue. If I were you I'd build a Release build of your project but switch Debugging information on (Program Database). Make sure your project has the path to the CRT source code ( You did install it with VS 2005 didn't you ) in it's includes. Run the release build and when it tries to quit on you attach the debugger and see if you can figure out what's going on. There are not that many possible causes for "abnormal program termination" on startup so you've got a reasonable chance of cracking it. Did you try to use the CRT file system during static initialization or try to allocate a negative or > 0x7FFFFFFF amount of heap memory? Those are the sorts of things that might silently fail in Debug but may blow you out of the sky in a Release build.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks for your reply.
My release version runs smoothly from within VS. Problems like those you describe would have prevented it from initializing properly even from within VS. Hence my guess that it has to do with the enveloping CRT environment.
Running the exe from outside VS fails! Even on a computer that has a full VS installed.
Snir.
|
|
|
|
|
The normal expectation would be that running the Release build from within VS and running the Release build on a computer with VS installed are the same thing. You could always try the catchall solution of turning off incremental linking in your project settings and doing a full rebuild. The CRT environment is what's keeling over but that is essentially just a statically linked library or an implicitly linked Dll depending on your project settings ( Make sure if you have multiple modules that the CRT settings are consistent throughout ) Beyond that it's not to easy to get the old veteran that is MSVCRT.DLL to fail in such an arbitrary manner.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Can anybody tell me how I can realize a certain computer?
I mean maybe it's possible to define an unique code for any computer.
|
|
|
|