Currently on this Super Star Destroyer being telekinetically strangled to death by Darth Vader
Posts
78
This is difficult to figure out...
Hey everybody. Before I start, I want to say how much of help everybody has been so far with me learning C++. Thanks.
I am trying to make a header file which can easily call the Open and Save As dialog boxes. I had written a module in VB, but I'm having trouble translating it to C++. A copy of it is attached herein. If anybody can look at it and help me out, it would be greatly appreciated. Thanks.
- Justin Patrick Butler
Comme je trouve. "As I find."
- Butler family quote
Beneficia sumptos procul superant. "The benefits far exceed the costs."
- Myself
yeah, create a file opensave.c(pp) too and put the code and the OPENFILENAME struct there. And use char * instead of char[] (I think it would produce a failure to use it that way.
Also, I would make filename a char* instead of char**, use strcpy and ask the user to allocat space for the string. Else the user could attempt to save the pointer for later use, meenwhile he calls save or open another time and the old pointer suddenly contains crap (= false file). This error would be a ***** to find.
You also might want to use TCHARs instead of chars to make it UNICODE compatible (use _tcscpy then).
All the buzzt CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.