bottlerun
bottlerun

Reputation: 51

How can I use create a program that uses GDI+ 1.0 on XP and 1.1 on Vista/Win7

I know that if I use the features of GDI+ 1.1, the .EXE file won't run on Windows XP. I want to make a program that runs on Windows XP and Windows 7 both, and use the GDI+ 1.1 feature on Win7.

Is there anyway to do this?

Upvotes: 1

Views: 244

Answers (1)

Gabe
Gabe

Reputation: 86698

A simple way to do it is to put your GDI+ 1.1 code in #ifdefs and compile it to two different DLLs -- one with the code and one without. Then at runtime load the DLL that will work. Maybe you could even attempt to load the 1.1 DLL and if that fails fall back to the 1.0 DLL.

Upvotes: 1

Related Questions