using GDI+ in C++ windows project
-
Greetings All, How does one initializes GDI+ in C++? Thanks. Sincerely, Max Pastchenko
-
Greetings All, How does one initializes GDI+ in C++? Thanks. Sincerely, Max Pastchenko
If you got to the appropriate section, I have a series of GDI+ articles, including one on how to get it working in VC6. Christian Graus - Microsoft MVP - C++
-
If you got to the appropriate section, I have a series of GDI+ articles, including one on how to get it working in VC6. Christian Graus - Microsoft MVP - C++
certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko
-
certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingcolormemberstopic.asp\\ What I really want to do is use a Dll that works with colors in GDI+, so I need to be able to send Color I want to use to that DLL from C++, if this makes sence. Sincerely, Max Pastchenko
-
certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko
mpastchenko wrote: Lets say i want to start wowrking with colors once i inluded everything... Well, you didn't ask that. Read some tutorials, 'how do I work with colors' is a pretty broad question. Christian Graus - Microsoft MVP - C++
-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingcolormemberstopic.asp\\ What I really want to do is use a Dll that works with colors in GDI+, so I need to be able to send Color I want to use to that DLL from C++, if this makes sence. Sincerely, Max Pastchenko
That link leads to the Colors enum, I'm not sure that's visible in GDI+ using C++. If it is, did you write this dll ? What is it ? Why do you need to pass these values ? An enum is just a bunch of numbers, you should have no trouble passing it around. Christian Graus - Microsoft MVP - C++
-
mpastchenko wrote: Lets say i want to start wowrking with colors once i inluded everything... Well, you didn't ask that. Read some tutorials, 'how do I work with colors' is a pretty broad question. Christian Graus - Microsoft MVP - C++
Ok, sorry, i will be more specific. My area of expertise in GDI+ in C++ environment is still lacking, i have been using it in C# without problems. I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. I did not write the DLL originaly, i added some modofications to it, so i know what it is supposed to do. Sincerely, Max Pastchenko
-
Ok, sorry, i will be more specific. My area of expertise in GDI+ in C++ environment is still lacking, i have been using it in C# without problems. I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. I did not write the DLL originaly, i added some modofications to it, so i know what it is supposed to do. Sincerely, Max Pastchenko
mpastchenko wrote: I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. Why do you need to pass a Color from the enum ? They are just a lookup to a red/green/blue value anyhow, and that's what your code will need to skip colors ( the R/G/B ). Why not pass a COLORREF ? Or even three bytes ? Christian Graus - Microsoft MVP - C++
-
mpastchenko wrote: I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. Why do you need to pass a Color from the enum ? They are just a lookup to a red/green/blue value anyhow, and that's what your code will need to skip colors ( the R/G/B ). Why not pass a COLORREF ? Or even three bytes ? Christian Graus - Microsoft MVP - C++
I think passing one of the two will solve the problem. very good Sincerely, Max Pastchenko