|
after some try i found , error is from my view class !!!
default CView class work properly !!! but own class that
i derived have problem when i try to OpenDocument from another
template , other CView do not work properly!
|
|
|
|
|
OK guys I received a project from a buddy, needs some work on it; however it's a sln project file in 2005 and I use 2003. I really do not want to have to install 2005, as I have no need to upgrade right now. I have seen other converters, but none to go from 2005 to 2003. Is there any other solution? Thanks.
|
|
|
|
|
I don't know of a converter, but my past experience with similar converted has been that it's better to recreate the base project with the previous IDE and then bring the files in.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
how to write a code to control the surround volumn for each?
please give me some idea and example
|
|
|
|
|
Hi!
I'm making an extension for a program (MMF2) and have run in to some problems...
The user can load a DLL, set the arguments and the call a function. All of theese at runtime. I push my values on to the stack and call the function.. That works fine.. the problem occurs when I try to pop the arguments of the stack (Need this if anyhing has changed, for instance when calling GetWindowText())...
I know the cause of this.. In MMF2 all function calls are __stdcall (or WINAPI)... Is there any workaround for this??
This is how a function looks in the SDK
long WINAPI DLLExport Function(LPRDATA rdPtr,long param1) {<br />
return 0;<br />
}
I call my function from within this function (my function is not __stcall, it's __cdecl)
Does anyone have a solution??
EDIT: I use asm for the function calling btw!
-- modified at 10:53 Thursday 14th September, 2006
|
|
|
|
|
use EXTERN "C"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thanks for your answer... Unfortunately this did'nt work!
|
|
|
|
|
I'm not very sure how to code this one. I have a base class and 3 derived classes. All of the derived classes need use of a timer, which I think is best to place in the base class. Is it possible for the baseclass to call derived class functions?
|
|
|
|
|
Yes, if you declare the function virtual, then if the function is redefined in the derived classes, this one will be called.
|
|
|
|
|
|
Hey, what Cedric said is called "polymorphism", which works only when you use pointers to reference objects. So this would call the overridden method:
YourBaseClass *p = new YourDerivedClass();
p->SomeFunction();
But this wouldn't:
YourBaseClass obj;
obj.SomeFunction();
Best,
Jun
|
|
|
|
|
waldermort wrote: All of the derived classes need use of a timer, which I think is best to place in the base class. Is it possible for the baseclass to call derived class functions?
Beware Active Derived Class member will receive the call!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
waldermort wrote: All of the derived classes need use of a timer, which I think is best to place in the base class. Is it possible for the baseclass to call derived class functions?
Beware Active Derived Class member will receive the call only
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi
Can anyone give me any guide lines as web searches have been unsucessful
I want to be able to save input from a console application to a text file.
eg: if a user inputs their "name" via cin on the console, how do you save the name to a text file.
I have just started learning if/ofstream classes and have a basic understanding, so if you could show me some examples of the code to save the input to a text file I would be grateful. Also I wish to append new data to the same file so if you could also advise me if the use of "ios::app" is the correct way of doing this without over writing old data.
Thanks in advance.
The problem with political jokes is they get elected.
|
|
|
|
|
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
|
|
|
|