Discussion:
MFC and OpenGL (newbie)
(too old to reply)
Massimo Soricetti
2010-02-25 19:58:58 UTC
Permalink
Hello,

I'm started some days ago to learn OpenGL. I saw some MFC + OpenGL
tutorials using an emptied dialog as window and OK they work, but what
if I need to use a regular MFC window, say a CView class for example?

Is that very different? Why?

could you please post any link to info on this matter?

Thank you...
Wolfgang Draxinger
2010-02-26 09:54:39 UTC
Permalink
Post by Massimo Soricetti
Hello,
I'm started some days ago to learn OpenGL. I saw some MFC + OpenGL
tutorials using an emptied dialog as window and OK they work, but what
if I need to use a regular MFC window, say a CView class for example?
Ugh, do you really want to use MFC, a mere wrapper around Win32 API adding
merely C++ syntactic sugar? How about a real toolkit? There are plenty:
* Qt
* GTK
* wxWidgets (that looks a lot like MFC, but offers real toolkit functions)
Post by Massimo Soricetti
could you please post any link to info on this matter?
If I'm not totally mistaken, Visual Studio 97 shipped with a complete OpenGL
in MFC CView exmple. If you really need it, I could get it (VS 97 Box still
on my shelf, I stopped using it around 2002 or so...).


Wolfgang
Massimo Soricetti
2010-02-27 10:02:18 UTC
Permalink
Post by Wolfgang Draxinger
If I'm not totally mistaken, Visual Studio 97 shipped with a complete OpenGL
in MFC CView exmple. If you really need it, I could get it (VS 97 Box still
on my shelf, I stopped using it around 2002 or so...).
retrieved myself, thanks a lot.

I use MFC because know them already. Having no knowledge of Qt, GTK or
wxWidgets, I didn't even thought of using them, even if I heard news on
the matter. Maybe I could look at Qt or wxWidgets... don't feel good
vibes from GTK.
Wolfgang Draxinger
2010-02-27 12:22:58 UTC
Permalink
don't feel good vibes from GTK.
Out of sheer curiousity: Which vibes would that be?


Wolfgang
Massimo Soricetti
2010-02-28 03:48:51 UTC
Permalink
Post by Wolfgang Draxinger
don't feel good vibes from GTK.
Out of sheer curiousity: Which vibes would that be?
I have seen and used some application made with GTK, like GIMP and
others, under windows and Linux. Don't like the look and feel... maybe
it's a "feature", let's say the programmers like it that way and that's
it, but still I think that GTK has something to do with it. Just a
sensation. So... "bad vibes"...
Wolfgang Draxinger
2010-02-28 12:12:28 UTC
Permalink
Post by Massimo Soricetti
I have seen and used some application made with GTK, like GIMP and
others, under windows and Linux. Don't like the look and feel... maybe
it's a "feature", let's say the programmers like it that way and that's
it, but still I think that GTK has something to do with it. Just a
sensation. So... "bad vibes"...
GTK is completely themable, you can change about anything in it's Look-and-
Feel. Also the Win32 version comes with a style engine that matches the
"normal" Windows look.


Wolfgang
Uwe Kotyczka
2010-02-28 19:11:30 UTC
Permalink
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html

It's just about MFC + OpenGL.

HTH
Massimo Soricetti
2010-03-01 06:24:48 UTC
Permalink
Post by Uwe Kotyczka
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html
It's just about MFC + OpenGL.
Downloaded now, thanks
Etienne Rousee
2010-03-01 10:58:58 UTC
Permalink
Post by Uwe Kotyczka
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html
It's just about MFC + OpenGL.
Hello Uwe,

It do not compile with Visual Studio 9 on Windows XP SP2.
The compiler tells: "hcw not found".
What can I do ?

Thanks.
--
Etienne
Uwe Kotyczka
2010-03-01 16:58:36 UTC
Permalink
Post by Etienne Rousee
It do not compile with Visual Studio 9 on Windows XP SP2.
The compiler tells: "hcw not found".
What can I do ?
Well, the project files are written for the old VC6 IDE.
Just edit the old project files (*.dsp) and remove the
section with the "hcw" entry. It's easy to find that.
(BTW "hcw" is just the tool that generates the help
file from *.rtf)
Then you can import the old prject files into the new
IDE. If you did so before - just delete the new project
files an import the old ones again.

And yes, I do expect, that you have to do some few
code changes. In VC6 I use the /W4 compiler option.
But VC6 is not strictly standard conform.

HTH
Etienne Rousee
2010-03-01 17:24:52 UTC
Permalink
Post by Uwe Kotyczka
Well, the project files are written for the old VC6 IDE.
Just edit the old project files (*.dsp) and remove the
section with the "hcw" entry. It's easy to find that.
(BTW "hcw" is just the tool that generates the help
file from *.rtf)
Then you can import the old prject files into the new
IDE. If you did so before - just delete the new project
files an import the old ones again.
Ok. I did that, and I have the message:

Erreur 1 fatal error C1189: #error : _WIN32_WINNT settings conflicts
with _WIN32_IE setting c:\program files\microsoft
sdks\windows\v6.0a\include\sdkddkver.h 217 General

and the same in OpenGLSampleSDI
--
Etienne
Uwe Kotyczka
2010-03-01 19:03:56 UTC
Permalink
Erreur  1       fatal error C1189: #error :  _WIN32_WINNT settings conflicts
with _WIN32_IE setting  c:\program files\microsoft
sdks\windows\v6.0a\include\sdkddkver.h  217     General
and the same in  OpenGLSampleSDI
I do not have VS9 availible, so I cannot give you a proper
advice. If VS complains about _WIN32_WINNT and _WIN32_IE
I would take a look where these constants are defined.
Start at StdAfx.h in the projects. Take a look, which header
files are included and track it down.
Asking Google for the error message you will also find lots
of results. Should not be too difficult.

HTH
u***@web.de
2016-12-13 18:52:25 UTC
Permalink
Post by Uwe Kotyczka
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html
Update: Now it can be found at
http://kotyczka.000webhostapp.com/opengl_en.html
Uwe Kotyczka
2017-01-02 00:11:16 UTC
Permalink
Post by u***@web.de
Post by Uwe Kotyczka
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html
Update: Now it can be found at
http://kotyczka.000webhostapp.com/opengl_en.html
Moved once again to
http://kotyczka.webspace4free.net/opengl_en.html
Uwe Kotyczka
2018-05-30 23:01:45 UTC
Permalink
Post by Uwe Kotyczka
Post by u***@web.de
Post by Uwe Kotyczka
You might want to take a look at my little
demo http://www.virtue.nu/kotyczka/opengl_en.html
Update: Now it can be found at
http://kotyczka.000webhostapp.com/opengl_en.html
Moved once again to
http://kotyczka.webspace4free.net/opengl_en.html
It seems that free webhosting services do not last very long nowadays.
Now it can be found at
http://kotyczka.byethost24.com/opengl_en.html

Loading...