Solved

Error while running with GDI+ in VC++6 application

Posted on 2004-10-09
8
515 Views
Last Modified: 2013-11-20
Dear experts,
I've decided to enable my VC++6 with GDI+ graphics. By adding the following code:

typedef unsigned __int64 ULONG_PTR
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib, "Gdiplus.lib")

to stdafx.h, I get the following error:

gdiplus.h(18) : error C2144: syntax error : missing ';' before type 'IDirectDrawSurface7'

I've tried to add the additional code needed to get VC++6 application running with GDI+, but still get the same error.
I'd be greatly appreciated for any suggestion.
0
Comment
Question by:German_N
8 Comments
 
LVL 6

Accepted Solution

by:
nabehs earned 75 total points
ID: 12270296
// write the following in stdafx.h
// delete the typedef
//typedef unsigned __int64 ULONG_PTR
#include <ddraw.h>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib, "Gdiplus.lib")

0
 

Author Comment

by:German_N
ID: 12274828
Followig your comments:
if I don't define "typedef unsigned __int64 ULONG_PTR" I get the following error: diplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier. If I do, I get the following error: ddraw.h(38) : error C2144: syntax error : missing ';' before type 'int'.
It would be nice you could take a look at the project, sure if you have vc++6 installed. Probably I miss something basic.
0
 
LVL 6

Expert Comment

by:nabehs
ID: 12274856
ok, try to send it to me to: emadns@yahoo.com
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:nabehs
ID: 12275127
i received  a notification message saying: This notification has been sent to inform you that a message has been deleted .The message subject is GDI+ problem project. Why is this happening? The message you are sending is infected with a virus.

0
 

Author Comment

by:German_N
ID: 12275169
I'll be trying to send it again later... thanks for taking a care :)
0
 
LVL 12

Assisted Solution

by:OnegaZhang
OnegaZhang earned 25 total points
ID: 12293784
THe following is a small VC6 program demonstrating usage of GDI+
www.fruitfruit.com/vc/graphics/img2gif.cpp
0
 
LVL 2

Assisted Solution

by:Ruskialt
Ruskialt earned 25 total points
ID: 12324314
Check the order of your include paths in tools->options->directories, make sure that the new sdk paths are listed before anythin else, this goes for includes and for libs. You may hit some wrong (old) files, if the order is incorrect.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need Help INsttalling wget on Mavericks OS X 3 90
wordappend challenge 8 143
Detect file exist or not 3 128
Is there a simple front-end menu system. 9 69
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now