|
Why not read the values of the edit boxes and then use standard ofstream .
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
Hey Mike,
Alexandru is correct as using a ofstream object would be rather simple if that is all you need to do, something such as this should work:
ofstream outputfile;
outputfile.open("myFile.dat", ios::out);
if(outputfile.is_open())
{
outputfile << m_int1;
outputfile << m_int2;
outputfile << time;
outputfile.close();
}
Hope this helps..
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Some endl s are called for here if you want to read the info later.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You could just use Get/SetPrivateProfileInt() and Get/SetPrivateProfileString() to save the data to an .ini file.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks Nick, Alexandru and Ravi
I used the fstream and it does exactly what I needed. I guess the biggest hangup was I was not aware that fstream would work under windows. None of the books I have were clear on the subject. I am curious as to how I could accomplish the same task using Get/SetPrivateProfileInt() and Get/SetPrivateProfileString() for the same task. Also Is there one for GetSetPrivateProfileDouble()?
Mike Deming
|
|
|
|
|
MikeDeming wrote:
Also Is there one for GetSetPrivateProfileDouble()?
No. Just convert it to a CString using Format() and read/write it out as a string.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
My application uses a DLL that causes some trouble:
I can call LoadLibrary successfully (the returned HMODULE is not NULL).
Trying to call FreeLibrary immediatly hangs my application...
Any ideas? I also mention that the dll I am trying to load/free uses some thread variables (__declspec (thread)). Could this be the problem?
Thanks!
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
Alexandru Savescu wrote:
I also mention that the dll I am trying to load/free uses some thread variables (__declspec (thread)). Could this be the problem?
Yes. I did a quick browse of __declspec(thread) on MSDN and it mentions that it may cause problems with "delay loading of DLL imports".
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Thanks, but this is not the problem...
I removed the __declspec (thread) specifier from the DLL and it still hangs...
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
That's pretty strange.
How about just not calling FreeLibrary on it? Just let it be freed when your app is closed.
Sorry I can't be of more help.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Hi!
I have written:
void JEdit::OnKeyUp(UINT ch, UINT count, UINT flags)
{
switch ( ch ) {
case VK_BACK_SPACE:
{
....
}
....
}
I wanted to detected backspace key, but the compiler says: "'VK_BACK_SPACE' : undeclared identifier" . What should I do?
Thanks,
Sovann.
Why waste time learning while ignorence is instantaneous ? [Hobbes]
|
|
|
|
|
Use VK_BACK instead.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
What should I do?
Don't use it if it isn't defined. Use VK_BACK it is defined. Or just define it as 8.
Thanks for the help,
Bill
|
|
|
|
|
I have written a DLL which contains a function that I have exported with the NONAME directive.
I have been trying to access this function within VC++6.0 but have had no luck.
I accept that this will not hide the exported function from anyone so this is more of a personal exercise. I was hoping to use this function for error and other internal checks.
If anyone can help. . . . .
If they tell you that I can program, don't believe 'em!
|
|
|
|
|
You will need to use ::GetProcAddress to get the address of your function. You provide the module handle of your dll after you loaded it, and the ordinal number that you gave your function.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hello Everybody:
I'm having a problem whenever my application is executed without administrator privileges in Win2000. An ASSERT error comes out. Something that I noticed is when I click ignore, a blank AfxMessageBox comes out with just the OK button. When you clicked OK, the application continues. I look at the code, and the error happens in InitInstance() of the application. The error is exactly in this line:
m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
Have any of you experienced this problem before? If so, is there any solution to solve this?
Any answer is more than welcome.
Thanks,
Luis E.
Luis E. Cuadrado
)
|
|
|
|
|
The line is trying to update a protected registry key whilst updating the COM automation server registration. The way around it is to perform all your registrations on installation when the user will have the correct access rights.
If you are not using your app as a COM server then you could just remove the line and the other m_server related code.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
|
Well, I visited the link that Hans-Georg Ulrich provided. I did everything that the article said and it worked. Thank you Michael P Butler and Hans-Georg Ulrich for your help in this thread. Take care and see you later here ).
Best regards,
Luis E.
Luis E. Cuadrado
)
|
|
|
|
|
Hellew fellow citizens.
I wish to create CSplitterWnd that looks like:
+-------+----+
|Viewww1|View|
+-------+""""+
|Viewww2|""""|
+-------+----+
I've read Daniel Zuppingers article, but it's too much. Doe's anybody has
an easier solution???
Do help. plz.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
That is quite easy if you know how to do it.
In your CChildFrame::OnCreateClient you do:
CSplitterWnd first;
CSplitterWnd secondleft;
CSplitterWnd secondright;
first.CreateStatic(this, 1, 2);
secondleft.CreateStatic(&first, 2, 1, WS_CHILD|WS_VISIBLE|WS_BORDER, first.IdFromRowCol(0,0));
secondright.CreateStatic(&first, 2, 1, WS_CHILD|WS_VISIBLE|WS_BORDER, first.IdFromRowCol(0,1));
secondleft.createView(0,0,...);
secondleft.createView(1,0,...);
secondleft.createView(0,0,...);
secondleft.createView(1,0,...); Hope this has helped a little
|
|
|
|
|
Hellew fellow citizens.
I wish to create CSplitterWnd that looks like:
+-------+----+
| | |
+-------+ +
| | |
+-------+----+
I've read Daniel Zuppingers article, but it's too much. Doe's anybody has
an easier solution???
Do help. plz.
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Every time I try to access the msdn help I get the message : "Attempting to use an invalid compled help (.chm) file." This happened yesterday and I can't fix it. I re-installed both VC++ and MSDN but nothing. I wonder if the service pack which I installed yesterday has anything to do with this (version 5). Please help, I virus scanned and everything. My last option will be a full format which I don't want to do!
|
|
|
|
|
hi all,
i have the source code for QuakeII for windows...it is a VC++ project....when i build the project on a system with win2000, it compiles the project but is not able to compile the asm files...i downloaded MASM compiler but i have no idea, as to what am i suposed to do.....this is the error which i get when i try to build the project,
linking *.asm
"'ml' is not recognised as an internal command"
* is replaced by the asm file...
i need help
u hv been buzzzzzed by JUMBO JET
|
|
|
|
|
Well ml comes with VC. it must be in your directory of VC98 incase of Visual Studio or will be in VC7 for VS.Net.
Anyway you have to register the environment variables. To do this run vcvars.bat in vc98 directory. Otherwise do following for win2k or winxp.
Go to System properties by right clicking on MyComputer. and in advanced tab click on Environment Variables. There in system variables in the bottom list find Path and edit it so that you append path to vc98 directory like this.
c:\program files\XXXX\VC98
You have to give path of VC98 not ml.exe.
The paths are separated with semi colons. So place semicolon before appending your this path.
|
|
|
|