Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can vectors really hold classes? Pin
Lord Kixdemp12-Aug-06 15:25
Lord Kixdemp12-Aug-06 15:25 
GeneralRe: Can vectors really hold classes? Pin
markkuk13-Aug-06 1:22
markkuk13-Aug-06 1:22 
Questioninsert/add a GIF image in VC++ 6.0 Pin
Dhananjayak0212-Aug-06 9:06
Dhananjayak0212-Aug-06 9:06 
AnswerRe: insert/add a GIF image in VC++ 6.0 Pin
Joe Woodbury12-Aug-06 19:01
professionalJoe Woodbury12-Aug-06 19:01 
AnswerRe: insert/add a GIF image in VC++ 6.0 Pin
A_Fa12-Aug-06 19:07
A_Fa12-Aug-06 19:07 
AnswerRe: insert/add a GIF image in VC++ 6.0 Pin
tanvon malik12-Aug-06 21:16
tanvon malik12-Aug-06 21:16 
AnswerRe: insert/add a GIF image in VC++ 6.0 Pin
Hamid_RT13-Aug-06 9:45
Hamid_RT13-Aug-06 9:45 
GeneralRe: insert/add a GIF image in VC++ 6.0 Pin
Dhananjayak0214-Aug-06 4:51
Dhananjayak0214-Aug-06 4:51 
Hi,

As u Suggested I started to use Image object in GDI+.My intention was to make a Image object and manupulate its position and orientation.(As given in msdn page titled Drawing, Positioning, and Cloning Images - refer the link below)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/AboutGDIPlus/IntroductiontoGDIPlus/OverviewofGDIPlus.asp[^]

I tried to insert a image to my main frame using "Image" in GDI+. But a runtime error (unhandled exception) is occuring when im going to run the program.The details are as follows.

I have included "gdiplus.h" in StdAfx.h. There were no issues on that.But the problem started when i tried to insert a image using the guidelines given in above msdn link(.Drawing, Positioning, and Cloning Images - GDI+)


As per that method I used the following code:

CPaintDC dc(this);<br />
Graphics myGraphics(dc.m_hDC);<br />
<br />
Image myImage(L"robot.gif"); // this line creates the problem<br />
myGraphics.DrawImage(&myImage, 20, 10);


The program Built & compiled successfully in VC++ 6.0.But didn't run.It gaves a error.

When I insert that code to a .NET project the error message says that ;"Unhandled exception at 0x7c9105f8 in tttdk.exe: 0xC0000005: Access violation reading location 0x00000010."
When I break it , it shows the location of the error in the following cpp file.

D:\VS\VC\atlmfc\src\atl\atls\allocate.cpp

..<br />
<br />
...<br />
<br />
CAtlTraceCategory *CAtlAllocator::GetCategory(int iCategory) const<br />
<br />
{<br />
<br />
if(iCategory == m_pProcess->CategoryCount())<br />
<br />
return NULL;<br />
<br />
<br />
<br />
ATLASSERT((iCategory < m_pProcess->CategoryCount()) || (iCategory == -1));<br />
<br />
CAtlTraceCategory *pCategory = NULL;<br />
<br />
if(iCategory >= 0)<br />
<br />
{<br />
<br />
BYTE *pb = reinterpret_cast(m_pProcess) + m_pProcess->MaxSize(); // this is the location of the error<br />
<br />
pCategory = reinterpret_cast(pb) - iCategory - 1;<br />
<br />
}<br />
<br />
return pCategory;<br />
<br />
}<br />
<br />
..............
Please help me regarding the above matter ASAP.or else tell me way to Insert a GIF image to a MFC frame and to change its position and rotate by given angles time to time.


Dhananjaya




ENTC
UoM



ENTC
UoM

GeneralRe: insert/add a GIF image in VC++ 6.0 Pin
Hamid_RT14-Aug-06 7:38
Hamid_RT14-Aug-06 7:38 
QuestionVirtual memory allocation Pin
RomTibi12-Aug-06 6:02
RomTibi12-Aug-06 6:02 
AnswerRe: Virtual memory allocation Pin
tanvon malik12-Aug-06 6:31
tanvon malik12-Aug-06 6:31 
GeneralRe: Virtual memory allocation Pin
RomTibi12-Aug-06 9:04
RomTibi12-Aug-06 9:04 
AnswerRe: Virtual memory allocation Pin
Mike Dimmick13-Aug-06 5:43
Mike Dimmick13-Aug-06 5:43 
GeneralRe: Virtual memory allocation Pin
RomTibi13-Aug-06 8:01
RomTibi13-Aug-06 8:01 
Questionlinked list Pin
jon-8012-Aug-06 5:29
professionaljon-8012-Aug-06 5:29 
AnswerRe: linked list Pin
Chris Losinger12-Aug-06 5:42
professionalChris Losinger12-Aug-06 5:42 
QuestionHow to control the behaviour of a toolbar button? Pin
Vinod Sankaranarayanan12-Aug-06 1:52
Vinod Sankaranarayanan12-Aug-06 1:52 
AnswerRe: How to control the behaviour of a toolbar button? Pin
Monty212-Aug-06 2:20
Monty212-Aug-06 2:20 
GeneralRe: How to control the behaviour of a toolbar button? Pin
Vinod Sankaranarayanan12-Aug-06 3:55
Vinod Sankaranarayanan12-Aug-06 3:55 
AnswerRe: How to control the behaviour of a toolbar button? Pin
ovidiucucu12-Aug-06 4:23
ovidiucucu12-Aug-06 4:23 
GeneralRe: How to control the behaviour of a toolbar button? Pin
Vinod Sankaranarayanan12-Aug-06 5:44
Vinod Sankaranarayanan12-Aug-06 5:44 
GeneralRe: How to control the behaviour of a toolbar button? [modified] Pin
ovidiucucu13-Aug-06 1:54
ovidiucucu13-Aug-06 1:54 
AnswerRe: How to control the behaviour of a toolbar button? Pin
Hamid_RT14-Aug-06 7:09
Hamid_RT14-Aug-06 7:09 
QuestionHost ActiveX control and draw to memory context? Pin
Andrew Altham12-Aug-06 0:22
Andrew Altham12-Aug-06 0:22 
AnswerRe: Host ActiveX control and draw to memory context? Pin
bob1697212-Aug-06 6:45
bob1697212-Aug-06 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.