wx dev-Cpp GDI plus problems

ok for some reason I am totally lost on this issues and been looking for an hour without any help.

in dev c++ I keep getting this error and it points to the line in bold:

"18 H:\Projects\Classic Lockdown\main.cpp expected constructor, destructor, or type conversion before '(' token"


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#define INFO_BUFFER_SIZE 32767
#include "iostream"
using namespace std; 
#include <windows.h>
#include <gdiplus.h>
//#include <GdiPlusGetEncoderClsid.h>

#include <stdio.h>
HINSTANCE G_HINS_hInstance = 0;
#include "sstream"
#include "..\PWS_DEV\PWS_DEV.h"

#pragma comment( lib, "gdiplus" )
using namespace Gdiplus;
//GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
Gdiplus::GdiplusStartupInput gdiplusStartupInput;

Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput,NULL);
	     
Bitmap *gdiBitmap = 0;


#include "procedures.h"




why is it doing this?

I also wanted to see if I tried this instead

...
Gdiplus::GdiplusStartup = "";
...

and then I get this error instead:

"18 H:\Projects\Classic Lockdown\main.cpp expected constructor, destructor, or type conversion before '=' token"


not matter what I used with GdiplusStartup it just keeps saying that over and over. Its like it doesn't want anything to do with GdiplusStartup

I am very stuck on this. Can some one please help me out with this?

if you need any more info about this or the project i'm working on, please let me know.

Thank you

Have you tried without the namespace qualification?

1
2
3
4
ULONG_PTR gdiplusToken;
GdiplusStartupInput gdiplusStartupInput; //namespace qualification removed

GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput,NULL); //namespace qualification removed 
Yes I did, I started to look it up online and saw that on some forums people added the namespace to it, so I did the same.

No matter what I do, I can't get that one line to compile.

Its like the statement is off, or dev is off.

idk whats causing it :(
I also think you have a spelling mistake;
on the first line you have gdiplusToken

but in the function call you have:

GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput,NULL);

so correct that spelling error and remember to leave out the namespace name
(because those items are not in the the Gdiplus namespace)

and we'll see what happens.
ahhhhh ok
I just tried that and its still doesn't work though :(.

As I said I can just call it by its self with no parameters and I will still get the same error.

idk what to do about this :(.

Thanks for your help though, I appreciate it :)
Thank you all, this problem has been solved over at "http://stackoverflow.com/questions/14891430/wx-dev-cpp-gdi-plus-problems" by jschroedl

again thank you all and have a good day ^^
Topic archived. No new replies allowed.