|
viveking wrote:
still the "Symbol not defined" is displayed when u right click on a variable to see where it is declared... can u help me out
I Believe Visual Studio 6.0 IDE is playing game with you . Get b>Visual Assit X[^] <, this is very good addin for Visual Studio
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Have you deleted all of the other temporary files, including the Debug folder?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
CRuntimeClass* pRuntimeClass = RUNTIME_CLASS( CMyClass );
CObject* pObject = pRuntimeClass->CreateObject();
ASSERT( pObject->IsKindOf( RUNTIME_CLASS( CMyClass ) ) );
the above is an sample for creating object dynamically. But the same thing can be done easily like this also :
CObject *pObject = new CMyClass();
So can you tell me the advantage of dynamic creation using CRuntimeClass ?
Thanks for your time
|
|
|
|
|
At the "external effects" thay are equivalent, but what you do in your second sentence is not a "dynamic creation": it is a static creation (you know the type) of a dynamic object (is allocated runtime "on demand").
Now, exend your view and imagine your code to be inside a function that has to create an "object" whose type cannot be known to you at the moment of writing the function.
Your
CRuntimeClass* pRuntimeClass = RUNTIME_CLASS( CMyClass );
CObject* pObject = pRuntimeClass->CreateObject();
ASSERT( pObject->IsKindOf( RUNTIME_CLASS( CMyClass ) ) );
can loose its first line and take CRuntimeClass* pRuntimeClass as a function paramenter.
But your
CObject *pObject = new CMyClass();
cannot.
It can only create a CMyClass .
This is mostly used in MFC serialization of pointers: the runtime class classname is saved, and, on load, the CreateObject function called.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
i want to add menu to my propertysheet. how can i acheive it?
menu cannot be added to property pages? how i implemt the concept of menu in property sheets or property pages?
|
|
|
|
|
HOW I WILL CONNECT ORACLE DATABASE TO VC++ USING ODBC /DAO . PLZ MAIL TO ME THE CODE AT:- jananjoy@yahoo.co.in
|
|
|
|
|
jananjoy wrote:
HOW I WILL CONNECT ORACLE DATABASE TO VC++ USING ODBC /DAO .
STOP SHOUTING
jananjoy wrote:
PLZ MAIL TO ME THE CODE AT:- jananjoy@yahoo.co.in
No. If you won't even read this forum for an answer, why would we help you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
jananjoy wrote:
PLZ MAIL TO ME THE CODE AT:- jananjoy@yahoo.co.in
hey, why do you ask this on a forum so ?
if you want an answer by mail, don't ask it here, firstly because nobody will, and secondly because no one here will see the sollution of your problem (which can be interresting to be known).
for anyone seeing this, i'm also highly interrested by the response...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I think you are a newbie round here..first of all *don't* post in caps...it is considered as shouting...and is a *very* bad netiquette and considered rude.
Also if you want to have the solution, you would have to work hard...no one will deliver it ready-made to your mail. We can help you out, but you have to ask the right way....
--
kane
Owner and Administrator,
http://www.coderkane.com
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
_kane_ wrote:
I think you are a newbie round here
... and me, i think you're more "newbie" than me, 'cause you don't even post to the right person...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
you don't even post to the right person...
Cool Down TOX!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
whoops...sorry about that...
thats what happens when u try to make a lightning fast reply...
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
lol, nevermind, i didn't take it for me
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
hi all
how can i render a text with halo effect using win32 GDI functions
need help urgent!!!
regards
pradish
|
|
|
|
|
What do you mean by the 'halo effect' exactly?
You might look at DrawFocusRect for guidance on the common 'dotted rectangle' surrounding selected items.
The DrawFocusRect function draws a rectangle in the style used to indicate that the rectangle has the focus.
|
|
|
|
|
I presume you are talking about something similar to the blue "glow" that you get on OS X edit fields?
One thing you could do is to customize the WM_NCPAINT message. This allows you to paint in the "border" region, i.e. the non client area, of a control. You could customize the size of the non client area and then with WM_NCPAINT you could draw you own glow effect, however you choose to do that.
If you want to actually render the *text* with a halo, win32 GDI has no functions that do this. You might look into GDI++, or some other alternate library like AGG[^] to help out with that.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
I have seen various people using various macros for the same purpose, and that confuses some people
Should I use _T or TEXT?
Should I use _TCHAR or TCHAR?
Jeffrey Richter uses TEXT and TCHAR in his book, but at all other places I have seen _T and _TCHAR.
|
|
|
|
|
_T() allow you to be unicode/ansii independant...
so, if you just - one day - #define _UNICODE , if you use the _T() macro, you won't have to change anything in your code, and it will support unicode.
of course, if you do so, use TCHAR instead of char ...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Flace wrote:
Should I use _T or TEXT?
Should I use _TCHAR or TCHAR?
It's upto you what to use, as they are same, i.e. nothing difference between them
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I have this piece of code:
<br />
result = RegOpenKeyEx(hkey, registrykey, 0,KEY_SET_VALUE ,&key);<br />
where registrykey is a _TCHAR *. This line compiles fine with _MBCS defined, but when I change it to _UNICODE, I get this error:
error C2664: 'RegOpenKeyExA' : cannot convert parameter 2 from 'unsigned short [512]' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Any idea why 'RegOpenKeyEx' is getting resolved to 'RegOpenKeyExA' when _UNICODE is defined? Can we fix this problem without explicit casting? Thanks in advance.
|
|
|
|
|
Where did you define _UNICODE? It needs to be defined for all the files (at the project level, for example)
Or maybe you didn't re-create your pre-compiled headers?
'RegOpenKeyEx' getting resolved to 'RegOpenKeyExA' means _UNICODE wasn't defined at the time the compiler found its declaration.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios wrote:
Where did you define _UNICODE? It needs to be defined for all the files (at the project level, for example)
Yeah, I defined it in the project settings. I just changed _MBCS to _UNICODE.
Jose Lamas Rios wrote:
Or maybe you didn't re-create your pre-compiled headers?
I changed 'Automatic use of precompiled headers' to 'dont use precompiled headers', and got the same errors.
Jose Lamas Rios wrote:
'RegOpenKeyEx' getting resolved to 'RegOpenKeyExA' means _UNICODE wasn't defined at the time the compiler found its declaration.
Note that _TCHAR is getting resolved to unsigned short, I am wondering whats going wrong with RegOpenKeyEx...
|
|
|
|
|
Flace wrote:
Note that _TCHAR is getting resolved to unsigned short, I am wondering whats going wrong with RegOpenKeyEx...
Try defining UNICODE (with no leading underscore) too. It seems like _UNICODE affects MFC headers, while UNICODE affects Win32 API headers.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios wrote:
Try defining UNICODE (with no leading underscore too). It seems like _UNICODE affects MFC headers, while UNICODE affects Win32 API headers
Right, I just noticed that that RegOpenKeyEx resolves to RegOpenKeyExW when UNICODE is defined, and not when _UNICODE is defined. I couldnt locate if UNICODE is automatically defined when _UNICODE is defined. So I now changed _UNICODE to UNICODE in the project settings, now tchar.h doesnt seem to know about UNICODE:
error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'char [512]' to 'const unsigned short *'
|
|
|
|