|
Well, normally in a dialog, pressing <ESC> triggers IDCANCEL (simulates pressing [Cancel] ). If you have something mapped to the same identifier value as IDCANCEL, or something in a OnCancel(...) handler, it may get triggered by pressing <ESC> .
I had a similar problem one when my resources got messed up oen time and one of my buttons took on the same ID value as IDCANCEL - since there was no real [Cancel] button on the dialog, the RC allowed me to do so.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Everything I've been able to read about cppunit shows how to build the TestRunner code in either the InitInstance() or the Main function of an executable. I have 20+ dlls that I want to be able to test individually, and I was hoping there is an easier way to test them besides writing a test App that I would have to create to run tests on the dlls. Thanks for your time and help!
|
|
|
|
|
Hi,
Can I implement the property grid with VC++ 8 (VisualStudio 2005)? where can I find an example?
I'm new to program with .NET, and I'd like to know where it's possible to me to have an example project
Thanks
|
|
|
|
|
|
is there any thing like static class in c++
thank u
kk.
|
|
|
|
|
static class, no.
static instance of a class yes.
please explain where you heard this, and what you want to be detailed...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
hello toxcct,
it was asked to me in an interview,
u r saying we have a static class , like
static class A{ ----- };
and if i create an object for it what happens???
kk
|
|
|
|
|
dude !!!
didn't you read what i said, or didn't you understand ?
when i say you cannot define a class as static, it means that you CANNOT define a class like you do :
<font color=red>static</font> class CFoo {
};
what i said however is that you are allowed to declare an instance of a class as static, that means a variable which type is a user-defined type :
#include "Foo.h"
static CFoo foo;
now, what don't you understand ?
you'd certainly google the internet or even better, search a good C++ book for static concept...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
kumar_windows wrote: u r saying we have a static class , likestatic class A{ ----- };and if i create an object for it what happens???
Dude There is nothing like Static class, as class doesnot have any address till is object is created, so how can you make anything static which doesn't exist till it object is created
"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
|
|
|
|
|
kumar_windows wrote: is there any thing like static class in c++
What do you mean exactly ? Can you be more explicit and explain what you want to do exactly ?
Yes, you can declare a class static like any other variable but I don't know if this is what you are looking for.
Cédric Moonen
Software developper
Charting control
-- modified at 9:43 Friday 12th May, 2006
Sorry, not very clear . As toxxct said (and what I meant by saying that) is declaring an instance of a class static, not the class itself
|
|
|
|
|
Cedric Moonen wrote: Yes, you can declare a class static like any other variable
actually, you're not declaring the class static but the instance of the class...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Yes, my post has already been modified . It's friday afternoon so my english skills tend to decrease
Cédric Moonen
Software developper
Charting control
|
|
|
|
|
Cedric Moonen wrote: Sorry, not very clear . As toxxct said
damn, toxcct, not toxxct think to "toxicity" if that can help... anyway, ok, friday afternoon... hehehe
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Do you think it's easy not to make mistakes while typing with your nose ?
Cédric Moonen
Software developper
Charting control
|
|
|
|
|
|
Cedric Moonen wrote: while typing with your nose ?
Again Nose
"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
|
|
|
|
|
hello cedric,
it was an interview question,
u mean to say i can declare a class as static like
static class A{----};
what is its purpose, please elaborate on single instance of a class, u mean when i create an object for this class
thanks kk
|
|
|
|
|
kumar_windows wrote: is there any thing like static class in c++
Are you looking something like SingleTon Classes[^]?
"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
|
|
|
|
|
hi alok,
no not a singleton class, it was an interview question abt the static class, do we have it just like a static member variable and static function,
wat is its significance/purpose?? can i create an object for this static class?? wat happens?
thank u, kk
|
|
|
|
|
The code snipet below demonstrates the variable instance obj to be static not the type Type , even though it would be confusing you.
#include <iostream>
int main()
{
static class Type
{
public:
void Hello() { std::cout << "Type::Hello() \n"; }
} obj;
obj.Hello();
return 0;
} Which is equivelent to:
#include <iostream>
int main()
{
class Type
{
public:
void Hello() { std::cout << "Type::Hello() \n"; }
};
static Type obj;
obj.Hello();
return 0;
}
Maxwell Chen
|
|
|
|
|
i hesitated to show off this example, but finally didn't, thinking it would confuse most beginners around. by the way, it is perfectly legal to do so, as we declare a variable with the type definition inlined...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
And a further example to demonstrate that the member variables are not shared among individual static instances.
#include <iostream>
static class Type
{
int v;
public:
void Hello() {
std::cout << "Type::Hello() \nv = " << v << " \n";
}
void Hello(int n) {
v = n;
std::cout << "Type::Hello(" << v << ") \n";
}
} g_obj, g_objx;
int main()
{
std::cout << "g_obj \n";
g_obj.Hello(3);
g_obj.Hello();
std::cout << "g_objx \n";
g_objx.Hello();
return 0;
} The output goes to:
g_obj
Type::Hello(3)
Type::Hello()
v = 3
g_objx
Type::Hello()
v = 0
Maxwell Chen
|
|
|
|
|
C# has the concept of a static class: a static class is a class that contains only static members and instances can't be created with the new keyword. C++ has no such concept; although you can create classes with only static members you do so explictly and the compiler will not stop you from adding a non-static member.
Steve
|
|
|
|
|
kumar_windows wrote: is there any thing like static class in c++
No.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
I am getting the following error while compiling a project in a workspace.
fatal error LNK1202: "C:\product\GUI\Widgets\SafetyEventLine\Modules\vc60.pdb" is missing debugging information for referencing module
Please let me know:
1] Why does this error occour?
2] How to prevent this error
regards
-- modified at 9:20 Friday 12th May, 2006
|
|
|
|