|
does this[^] help you?
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thanks , this solves my problem.
|
|
|
|
|
Glad to hear it You are welcome.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Normally it is
ABCD
EFGH
IJKL
MNOP
QRST
UVWX
YZ
while I want is :
Y U Q M I E A
Z V R N J F B
W S O K G C
X T P L H D
|
|
|
|
|
You can either format the text before setting it to the edit box or handle the EN_CHANGE notification sent to the parent window class of the edit control and format the text accordingly.
|
|
|
|
|
I hope to implement the function like mspaint.exe' s text input. Mspaint has a font toobar, if check the last button on the bar, you can type text from right top to left down.
|
|
|
|
|
Hi, I'm having some issues with Visual Studio 2010; I have suddenly gotten an error while trying to compile a project that compiled fine in Visual Studio 2008.
The errors are:
error C2440: 'initializing' : cannot convert from 'const char [10]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [3]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [4]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [5]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [6]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [8]' to 'char *'
The errors come from one of Visual Studio 2010's include files called "xmemory". The code the error points to is:
void construct(pointer _Ptr, _Other&& _Val)
{
::new ((void _FARQ *)_Ptr) _Ty(_STD forward<_Other>(_Val));
}
I have done alot of googling but can find nothing to help me with this, except something about Visual Studio 2010 uses nullptr now instead of the number 0. I really need help. I have no idea what is using xmemory or why this is happening.
|
|
|
|
|
Looks like a conflict between the UNICODE and NON-UNICODE character set.
Check if you're passing in a wide character data type to a function expecting an ASCII data type.
|
|
|
|
|
Thanks for your reply. In my project settings, my character set I'm using is Multi-Byte, if thats what you are asking. I believe that is ASCII.
|
|
|
|
|
If you know which line of produces the error in your code, please post that line and the variable declaration affecting that line.
|
|
|
|
|
I do not know which line it is.
|
|
|
|
|
Comment out a section of the code and build it.
Depending on whether it compiles or not, we can determine if the error occurs in that part of the code.
This way you can pin-point the exact line where the error occurs.
You could also change multi-byte to unicode and try to compile, if that is at all possible.
|
|
|
|
|
I switched to unicode and i get the same errors.
|
|
|
|
|
Nah....
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This sounds to me like its coming from an attempt to use a string literal to set up something that is expecting a non-const char *. Since a string literal is const, this is a const violation. Are you setting up 6 items somewhere in your code using 6 string literals of the lengths reported in your error messages?
|
|
|
|
|
Hi
Suppose I have following:
class A
{
}
class B : public class A
{
}
I have an instance of class A "pClassA". can I cast it to class B?
I want an instance of class B from the existing instance class A. How can I get it?
Thanks,
modified on Thursday, January 14, 2010 5:41 PM
|
|
|
|
|
Assuming the inheritance is public (in your sample it is private), you can do something like:
A* a = new B;
B* b = dynamic_cast<B*>(a);
|
|
|
|
|
I have following:
A* a = new A;
B* b = dynamic_cast<B*>(a);; ??????
|
|
|
|
|
Since it is a dynamic cast, a type safety check is incurred at runtime: Add a try catch block and you will know. Alternative answer, if you want an instance of class B you might need to create a new object (if class B has more member variables than class A), a good way to do this could be a specific constructor/assignment operator.
Hope this helps,
M
|
|
|
|
|
You cannot do that: a tiger is an animal, an animal (usually... ) isn't a tiger.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CODEPC wrote: I have an instance of class A "pClassA". can I cast it to class B?
No, you can only cast back from derived to base class. In your example a B object is always also an A object, but an A object may not be a B object.
MVP 2010 - are they mad?
|
|
|
|
|
Hi,
I am debugging a C app using Visual Studio would anyone know what is
the best approach
Is there an add on for this
Thankx
|
|
|
|
|
Set break points and step through? You don't need any addons for that. Just the debugger will do.
What sort of specific debugging issue are you having? Is the app multi-threaded? Are there DLLs involved? If so, do you have the source? Ask something more specific.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
There are pretty big macros
It also multi threaded
Guess there are no easy answers to this
would be nice if I could make a breakpoint
in the macro However I know there is no code associated
with macros variables are just substitued
|
|
|
|
|
Macros? I feel your pain.
The only approach that works for me is to open the Dissasembly windows (Alt+8 with VC++ keyboard setting) and look there. The macros are expanded into real lines of C code and if you are not comfortable with assembly you can simply ignore that part.
|
|
|
|