Click here to Skip to main content
16,004,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Access violation when using STL map in DLL (VS7) Pin
led mike29-Aug-07 7:18
led mike29-Aug-07 7:18 
AnswerRe: Access violation when using STL map in DLL (VS7) Pin
Cedric Moonen29-Aug-07 7:20
Cedric Moonen29-Aug-07 7:20 
GeneralRe: Access violation when using STL map in DLL (VS7) Pin
Stephen Hewitt29-Aug-07 16:25
Stephen Hewitt29-Aug-07 16:25 
AnswerRe: Access violation when using STL map in DLL (VS7) Pin
George L. Jackson29-Aug-07 14:26
George L. Jackson29-Aug-07 14:26 
QuestionTCP/IP Sockets or Something New Pin
Andy20229-Aug-07 5:06
Andy20229-Aug-07 5:06 
AnswerRe: TCP/IP Sockets or Something New Pin
led mike29-Aug-07 7:13
led mike29-Aug-07 7:13 
AnswerRe: TCP/IP Sockets or Something New Pin
Mark Salsbery29-Aug-07 7:24
Mark Salsbery29-Aug-07 7:24 
QuestionGDI+ DrawImage Pin
TheShihan29-Aug-07 4:27
TheShihan29-Aug-07 4:27 
Hi, it's me... again Wink | ;-)

I've now added GDI+ to an existing application, to allow the display of TIFF images (and other reasons). So the old "OleLoadPicture" and the IPicture have to be replaced.

I've a global var as a buffer for the image:
Gdiplus::Image *m_image;

I display the image with this code:
graphics.DrawImage(&m_image, x, y, size_x, size_y);

When I load a test image this way, it works (= it is displayed):
Gdiplus::Image m_image(L"testSMALL.TIF");

But of course I have to replace the old code, where the image is save out from a stream with the help of OleLoadPicture. I tried it this way:
LPSTREAM pstm = NULL;<br />
// create IStream* from global memory<br />
HRESULT hr = CreateStreamOnHGlobal(hGlobal, TRUE, &pstm);<br />
if (SUCCEEDED(hr) && pstm)<br />
{<br />
    Gdiplus::Image m_image(pstm);<br />
}


But it won't compile this way. It says it has an error at the line where the "DrawImage" is:
error C2664: 'Gdiplus::Status Gdiplus::Graphics::DrawImage(Gdiplus::Image *,Gdiplus::REAL,Gdiplus::REAL,Gdiplus::REAL,Gdiplus::REAL)': Konvertierung des Parameters 1 von 'Gdiplus::Image **__w64 ' in 'Gdiplus::Image *' nicht möglich

-> in english: cannot convert the first parameter 'Gdiplus::Image **__w64 ' in 'Gdiplus::Image *'

And please don't bash me, I know that I don't have a clue about C++ Smile | :)

Thx and Greets, Shi
AnswerRe: GDI+ DrawImage Pin
James R. Twine29-Aug-07 7:01
James R. Twine29-Aug-07 7:01 
AnswerRe: GDI+ DrawImage Pin
Hamid_RT29-Aug-07 7:18
Hamid_RT29-Aug-07 7:18 
GeneralRe: GDI+ DrawImage Pin
TheShihan29-Aug-07 20:31
TheShihan29-Aug-07 20:31 
GeneralRe: GDI+ DrawImage Pin
Hamid_RT31-Aug-07 2:04
Hamid_RT31-Aug-07 2:04 
QuestionIE7 and Explorer Folders Pin
convivial.developer29-Aug-07 4:10
convivial.developer29-Aug-07 4:10 
AnswerRe: IE7 and Explorer Folders Pin
Perspx29-Aug-07 6:32
Perspx29-Aug-07 6:32 
GeneralRe: IE7 and Explorer Folders Pin
convivial.developer29-Aug-07 7:22
convivial.developer29-Aug-07 7:22 
GeneralRe: IE7 and Explorer Folders Pin
Perspx29-Aug-07 8:21
Perspx29-Aug-07 8:21 
QuestionIs it possible to add check to for each tree items instead of all? Pin
eagle5129-Aug-07 4:10
eagle5129-Aug-07 4:10 
AnswerRe: Is it possible to add check to for each tree items instead of all? Pin
Jason Teagle30-Aug-07 3:29
Jason Teagle30-Aug-07 3:29 
AnswerRe: Is it possible to add check to for each tree items instead of all? Pin
eagle514-Sep-07 20:04
eagle514-Sep-07 20:04 
QuestionHow to stop Autorun Pin
VC_RYK29-Aug-07 4:10
VC_RYK29-Aug-07 4:10 
AnswerRe: How to stop Autorun Pin
_AnsHUMAN_ 29-Aug-07 4:11
_AnsHUMAN_ 29-Aug-07 4:11 
GeneralRe: How to stop Autorun Pin
VC_RYK29-Aug-07 4:25
VC_RYK29-Aug-07 4:25 
QuestionRe: How to stop Autorun Pin
David Crow29-Aug-07 4:44
David Crow29-Aug-07 4:44 
AnswerRe: How to stop Autorun [modified] Pin
Russell'29-Aug-07 5:47
Russell'29-Aug-07 5:47 
AnswerRe: How to stop Autorun Pin
Michael Dunn29-Aug-07 7:54
sitebuilderMichael Dunn29-Aug-07 7:54 

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.