|
I just tried this today and got the same error. Unfortunately, I do not know why either. I think (but am not sure) that maybe WTL7 is for .Net and that is why it may not work. I believe that there is an ATL 2.0, ATL 3.0 and 7.0 and a WTL 3.0 and WTL 7.0. The only thing I can figure, since there seems to be a major jump in version numbers, is that 7.0 is for .Net.
Can someone clarify or verify this?
|
|
|
|
|
Hi,
I am in the process of converting all my MFC projects from VS6 to VS.Net and I'm getting a peculiar problem. My programs seemed to convert fine (with a few minor code changes). However, when I run my app it turns out I am having problems deserializing an object of a type of class defined in an extension DLL. I get the following TRACE output "Warning: Cannot load CMyClass from archive. Class not defined".
On the MSDN, it says that this will be a problem when using an extension DLL from a regular DLL. However, I am using the extension DLL from a regular MFC application - which the MSDN says should work fine.
MSDN link here (New window)
Does anyone have any idea why I am getting this error? I would be very grateful if anyone could shed some light on this issue.
Many thanks,
Mike.
|
|
|
|
|
I was going through some C++ code and found this syntax:
Complex **_W;
I do not understand the ** notation. Is it a pointer to a pointer? How am I supposed to initialize such an object and access its member functions?
Thanks. Looking forward to some replies
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Complex W;
Complex* pW = &W;
Complex** ppW = &pW;
Complex*pX = *ppW;
Complex X=**ppW;
double i=(*ppW)->i;
double j=(**ppW).j;
Easy really!
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
pankajdaga wrote:
Is it a pointer to a pointer?
Yes.
pankajdaga wrote:
How am I supposed to initialize such an object and access its member functions?
_W x;
*x = new Complex();
*x->ComplexMethod1();
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Hi,
I might not be the best at explaining this, but I'll try...
If you want to change a variable that is passed in to a function, you would pass it by pointer or by reference. In the same way, if you want to change a pointer that is passed in to a function, you could pass a pointer to a pointer.
Here is how you might do it:
// We hope that calling FindComplex will change the value of pFoo
Complex* pFoo = NULL;
// Pass a pointer to a pointer
FindComplex(&pFoo);
// Now pFoo may have changed
BOOL bChanged = (pFoo != NULL);
...
void FindComplex(Complex** pFoo)
{
Complex* pFound = NULL;
// Do some code here to find a Complex object and set pFound
*pFoo = pFound;
}
Hope this helps and I hope it's right!!
|
|
|
|
|
Hi,
How can I draw strings with GDI+ that are are vertical bottom to top aligned!
I try things as SetFormat(StringFormatFlagsDirectionVertical | StringFormatFlagsDirectionRightToLeft) but the text is always top to bottom oriented.
|
|
|
|
|
Yep, that's a serious limitation of GDI+ but it can be easily overpassed by rotating yourself the text:
Graphics* m_pGraphics;
What you have to do is :
1. translate text to origin,
2. rotate,
3. translate back to position,
Let's go:
We create a graphic container to apply transformations
graphicsContainer = m_pGraphics->BeginContainer();
Doing steps 1,2,3 the order of matrix multiplication is important !
m_pGraphics->TranslateTransform(pointF.X,pointF.Y);
m_pGraphics->RotateTransform(-angle);
m_pGraphics->TranslateTransform(-pointF.X,-pointF.Y);
Draw the string
m_pGraphics->DrawString(str, -1, &font, pointF, &sf,&solidBrush);
Fold back transformations by getting out of the container
m_pGraphics->EndContainer(graphicsContainer);
Jonathan de Halleux, Belgium.
|
|
|
|
|
Very thanks friend.
It´s really what I was thinking to do. Thanks for your help!
|
|
|
|
|
i am using winmain in my application and i want to restrict that only one instance of the application should run at one time. is there way to restrict it.
|
|
|
|
|
Look at this^ article.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Perhaps this article can help you ...
Clic here
A single instance is a "Singleton"
Hello World!!!
from Raphaël
|
|
|
|
|
Sorry, but a Singleton is to do with having a single instance of a particular class in an application (and is a very useful thing ), but the question was asking about only ever having a single instance of an application running at a time.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Of course... Sorry...
Hello World!!!
from Raphaël
|
|
|
|
|
Hi all, I know this is cheeky in the C++ section but pleeease help me!! I need to shave some time off of the compiler generated interrupt code. In the code below (#int_gobal with compiler generated interrupt code within it) this shoul compile then work the same as it previously did but the compiler stops on '03.5', this is the status register bit 5 so i tryed 'BTFSC STATUS,5' but that didnt work either. Im very confused, please help me.
#int_global
isr() { // Will be programmed at location 4
#asm
BTFSC 03.5
GOTO 00A
MOVWF 25
SWAPF 03,W
MOVWF 26
GOTO 00F
........ etc ....
#endasm
}
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
i duuno much about PICs, but other controlers ... so ... first, why not doing all the stuff in asm ? ... secondly, giving 03 will always work whereas STATUS must be an alias and should be used only if it is defined somewhere as being equal to 03 (like an #include STATUS 03)(check the include files and/or your compiler settings)
Could you post the BTFSC description function ??
~RaGE();
|
|
|
|
|
Hi !
Just like to know how difficult this is to skin a dialog app such winamp does (must be the 100000th to ask it, but ... ) ? Someone knows about a _good_ article on that ?
Thanks ...
~RaGE();
|
|
|
|
|
Yes, my article and it is VERY good.
http://www.codeproject.com/dialog/winampwnd.asp
I thank you
James
|
|
|
|
|
James Spibey wrote:
Yes, my article and it is VERY good.
Lol ... Ok, I´ll take it
James Spibey wrote:
http://www.codeproject.com/dialog/winampwnd.asp
well, i must really have searched like a '*Ä+ä#, because i did not find it on CP ...
Thanks a lot, that´s exactly what i was looking for.
~RaGE();
|
|
|
|
|
Hi !
I have a "one euro question" ...
I´d like to know how to allocate memory for a 20x10 "matrix"; I´ve tried foolowing :
int **Table;
*Table=new int[nb_lines];
for(int i=0;i<10;i++)
{
Table[i]=new int[nb_columns];
}
This works - at least it compiles and does something in the app, but it still crashes when in use, so i guess there must be another way to do it .BTW, i do not want to declare another structure or use another thing, i´d really like to know how to do it this way (it´s just for fun)... Anyone knows ?
~RaGE();
|
|
|
|
|
And this:
int **table;
table = new int*[nb_lines];
for(int i = 0; i < nb_lines; i++) {
table[i] = new int[nb_columns];
}
I think ...
Hello World!!!
from Raphaël
|
|
|
|
|
Hi,
I've got a pointer pointing an image (buffer) and I want to display this image in the client area (view)...
How to do this simply ???
Thanks in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
what kind of "buffer" ?
to display anything in Windows, you've got to convert it to a DIB or HBITMAP first.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I get an image from a frame grabber...
Thus the image comes from a buffer in the SDRam memory. I think it must exist an Object which encapsulate un pointer which pointe to this buffer...
I think... No?
Hello World!!!
from Raphaël
|
|
|
|
|
do you have any documentation?
most devices will return a DIB (HDIB, LPDIB, LPBITMAPINFO, etc) or an HBITMAP.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|