|
To use ofstream the way you specified:
char name[20] = {0};
ofstream fout;
fout.open("mylog.log", ios::app);
cin >> name;
fout << name;
fout.close();
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Cheers Zac
Thanks for the prompt response.
Worked first time on your advise.
Many thanks.
The problem with political jokes is they get elected.
|
|
|
|
|
how do I, programmatically, get the driver's version (to simulate the device manager data --> driver's properties)?
thanx
|
|
|
|
|
Hello all..
I am very new to MFC. so please suggest me how can i create my simple .cpp file by VC++ without creating any workspace....If it is possible than plz tell me the way...
Egarly waiting for reply...Please reply soon
Thank you for reading this message....
alpa shah
|
|
|
|
|
Haven't you checked Files tab, when used New option from File menu?
|
|
|
|
|
I'm really sorry for that...but i am totally new to MFC....thanks for your help...now i will check it...and send you reply about that...
alpa shah
|
|
|
|
|
I have tried this direct file creation...but dear it didn't work..because it requires to create a workspace..so simple might not be work..that i was asking..
Againg thanks for your suggestion...and thanks for reading my question....
alpa shah
|
|
|
|
|
alpa shah wrote: I have tried this direct file creation...but dear it didn't work..because it requires to create a workspace
You can create .cpp file without workspace. But as mentioned earlier, thats not what you required.
-- modified at 10:12 Thursday 14th September, 2006
|
|
|
|
|
if you use VisualC++ (whatever vesion), you must create a workspace (or a solution, both appelations are same depending on the IDE). otherwise, you'll have to use the command line to call the compiler/linker yourself, but i don't advise you to, because if you are new, yo go directly to the headaches !!
creating a new project is not a that difficult task. take few minutes to experiment the IDE.
|
|
|
|
|
Well you can create such a file simple by choosing New/File in the File menu, but i don't think thats what you want. It really depends on what kind of Application/Library etc. you want to create. The simplest i think is to create a new Project from the Win32 Console Application Template. Just use File/New/Project, then choose Win32 Console Application under Visual C++ Projects and enter a project name, then hit ok. Next window hit OK again, default options should suffice for now. In your project explorer (usually on the right side) you will find a .cpp file with the name of your project. This file contains an empty body of the main function. You can write your code here. Then hit Strg+F5 to execute.
So much for a short total beginners tutorial. Hope that was helpfull and not too low
|
|
|
|
|
Thank you for this help..I am going to try this out...
alpa shah
|
|
|
|
|
Thank you....It's working....
alpa shah
|
|
|
|
|
the OP wants an MFC project, not Win32 console
|
|
|
|
|
I help to you first what do you need? if see in File->New you can create many projects but it seems that you are new so you can create a MFC Application and next step in Application Type use Dialog based and click Finish button for compile in Debug menu select->Start Without Debugging.
If you have any problem maybe i can help to you
|
|
|
|
|
I want to ask about some help with: "GuiToolkit MFC Extension"
http://www.codeproject.com/library/guitoolkit.asp
I am writeing the MFC application (VS2003 Std - I am not useing the document-view architecture!). I do some practice with the GuiToolkit library. I can create a button or combobox. But I can not to make XP Style menu. I see this examples in folders: CGuiAccess or CGuiTabbedDemo, but it shows me in the old way.
Regards
mwgomez
Poland
|
|
|
|
|
Of course the examples from GuiLib are running propperly.
Regards
mwgomez
Poland
|
|
|
|
|
Hi all,
I want to change the font of a control, specifically CListView control, I know how to create a font, and how to select it into a device context, lets assume that my font is ready to use (MyFont), in what dc should I select it???
I have tried:
MyListView.GetDC()->SelectObject(&MyFont);
and
MyListView.GetListCtrl().GetDC()->SelectObject(&MyFont);
and neither of them works!!! so whats the problem?????????
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Have you tried the SetFont() method?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes, it definitely works!!!
Thanks David...
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
I am working on SDI application that creates a modeless dialog, the problem is that modeless dialog always remains in foreground, even if i click on the title bar of the sdi frame. I have set style of sdi frame window to WS_EX_TOPMOST but it donot works for modeless dialog. How can i bring modeless dialog to the back of Z order, SetWindowPosition also do not work. It looks that windows always puts modeless dialog in forground of main window. how this default behaviour can be changed.
|
|
|
|
|
Create the dialog as child of the desktop (GetDesktopWindow()) instead of the main application window ...
|
|
|
|
|
Thanks for the idea, instead of making it child of desktop i have made it child of another class, because i dont know effects of making it child of desktop it may mind any how the problem is solved.
|
|
|
|
|
Does anyone know where the tab order of the controls placed on a Dialog Box is stored? I want to change this by hand 'cause visually it'g getting kindoff hard
|
|
|
|
|
it is stored in the order in which the #includes of the controls ID are ordered in the resource.h
BTW, do you know that graphically, you are allowed to click on the order number as part of a control to select it ?
|
|
|
|
|
toxcct wrote: it is stored in the order in which the #includes of the controls ID are ordered in the resource.h
Nope. Their initial z-order is governed by the order in which they appear in the dialog's template (the .rc file).
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|