|
And what is the exact error ? Some info might help us, we still can't read what's written on your screen (altough we are trying hard).
|
|
|
|
|
The program compiled succesfully but encountered an error in the constructor.
Error:
Unhandled exception: Access violation reading location 0x00000010.
pointing to atlsimpstr.h which is not my included in my source code.
|
|
|
|
|
Are you sure the exception is due to Image constructor. Have you debugged step into the Image constructor? When i did even though the path is not correct, i didn't get exception and it not directing to the source coded of atlsimpstr.h. I think it is not because of Image constructor. I suggest you to check the callstack which statement in your program leads to the exception and you can also debug the Image Constructor to verify.
|
|
|
|
|
Yes, I have debugged the code and error appears after the constructor line.
|
|
|
|
|
can you post the code snippet.
|
|
|
|
|
Why can't you just debug and find out the problem?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
So set a breakpoint in the constructor and single-step over each statement.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Did you try without using L, I mean -
Image img("c:\\Sample.jpg");
|
|
|
|
|
Yes, and has a compiling error.
Error:
Cannot convert const char[10] to const WCHAR*.
|
|
|
|
|
Whenever an error occurs:
(1) Read the error message, usually it is quite descriptive.
(2) If after point (1) you're still in troubles then post here your code (you've already done it) and the error message itself (you haven't done yet).
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
|
|
|
|
|
checkout c:\\Sample.jpg on the right path or the splling of the image you r using correct.
Rajesh
|
|
|
|
|
|
By the way I have made this code work in other project.
Now I'm trying to integrate this to an open source project.
|
|
|
|
|
Runtime error? If so, have you initialized GDI+ (GdiplusStartup(), etc)??
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello All
Is it possible to get Handle to the Container window(Internet Explorer) of the ActiveX Control?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
|
Thanks for your kind reply.
Actualy i want to minimize internet explorer wheneve my activex is loaded in IE.
I am using this:
::ShowWindow(GetWindow(GW_OWNER)->GetSafeHwnd(), SW_MINIMIZE);
But This function gets fail.
Is it correct way to do this?
please provide me any solution to it.
Once again Thanks Steve
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
You don’t mention what framework you’re using (if any)?
Steve
|
|
|
|
|
No, i am not using any framework
My activex is in pure MFC.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
manish.patel wrote: No, i am not using any framework
My activex is in pure MFC.
ROTFL.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: ROTFL.
What you want to say??
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
I am also new to these abbreviation, but the WordWeb free dictionary helps me,
ROTFL - Rolling on the floor laughing.
I guess, he meant MFC is also a framework.
|
|
|
|
|
MFC actually *is* a framework.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks for your Guidance.
Up to now I am considering MFC as a Microsoft Foundation Classes. I don’t know It is a “Framework”
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
manish.patel wrote: Up to now I am considering MFC as a Microsoft Foundation Classes.
You're just looking at the abbreviation. You need to read up a little bit to understand that MFC is more than a bunch of classes. For example, you don't write a main() function for a program that you write in MFC, do you? So, does that mean there is no main function? You get to build a doc/view app with menus, windows, print previewing capability, etc., just with mouse clicks! Can you do it just with a few classes alone? The framework does everything for you behind the scenes.
If that interests you, I'd recommend a few books - Programming Windows with MFC, MFC Internals.
Also, see MFC in Wikipedia[^]
Rajesh
|
|
|
|