From: Piranha on
I´m finding 1000s of hits on Google, even 100s of tutorials, but they
all are made for VC++ or MFC or Borland.
Maybe I´m just blind, but I can´t get the smallest Dialog to work, it
always ends up in a bunch of compiler errors.

I guess it´s because I´m not using any of those compilers, but
Code::Block/MinGW/GCC++, meaning I already get stuck when it comes to
linker settings and includes, obviously a tutorial for VC++ doesn´t
mention which libraries to include, while VC++ has them included by
default.

So the question is, how do I create a dialog, or where can I find a
beginners tutorial that isn´t based on a specific compiler or at least
mentions what one has to include when using a different compiler.

I´d be happy to have a single edit field and an OK button where the
user can submit a line of text to the program.
From: Sylvain SF on
Piranha wrote on 24/07/2008 00:04:
> [...]
> So the question is, how do I create a dialog, or where can I find a
> beginners tutorial that isn�t based on a specific compiler or at least
> mentions what one has to include when using a different compiler.

somes samples in the MSDN library [1] are in plain C, looking for
DialogBoxParam or CreateDialog will give you valuable tips.

[1] <http://msdn.microsoft.com> or, for instance:
<http://msdn.microsoft.com/en-us/ms644996(VS.85).aspx>

for each Win32 function the MSDN pages give you the name of header
file and import library (the ones you'll list as linker parameters).

HTH,
Sylvain.
From: Puckdropper on
Piranha <eu_piranha(a)gmx.net> wrote in news:9f526c82-75ac-4d4b-ada4-
a309bb5bb8ac(a)m3g2000hsc.googlegroups.com:

> I�m finding 1000s of hits on Google, even 100s of tutorials, but they
> all are made for VC++ or MFC or Borland.
> Maybe I�m just blind, but I can�t get the smallest Dialog to work, it
> always ends up in a bunch of compiler errors.
>
> I guess it�s because I�m not using any of those compilers, but
> Code::Block/MinGW/GCC++, meaning I already get stuck when it comes to
> linker settings and includes, obviously a tutorial for VC++ doesn�t
> mention which libraries to include, while VC++ has them included by
> default.
>
> So the question is, how do I create a dialog, or where can I find a
> beginners tutorial that isn�t based on a specific compiler or at least
> mentions what one has to include when using a different compiler.
>
> I�d be happy to have a single edit field and an OK button where the
> user can submit a line of text to the program.

My GCC build batch file looks something like this:
windres test.rc test.o
gcc -mwindows test.cpp test.o

If you use Windows Common Controls, you'll need to add -lcomctl32 before -
mwindows

theForger's tutorial has a few hints for different compilers, but is based
on VC++: http://www.winprog.org/tutorial/

Puckdropper
--
If you're quiet, your teeth never touch your ankles.

To email me directly, send a message to puckdropper (at) fastmail.fm
From: Piranha on
On 24 Jul., 08:26, Puckdropper <puckdropper(at)yahoo(dot)com> wrote:
> Piranha <eu_pira...(a)gmx.net> wrote in news:9f526c82-75ac-4d4b-ada4-
> a309bb5bb...(a)m3g2000hsc.googlegroups.com:
>
>
>
>
>
> > I´m finding 1000s of hits on Google, even 100s of tutorials, but they
> > all are made for VC++ or MFC or Borland.
> > Maybe I´m just blind, but I can´t get the smallest Dialog to work, it
> > always ends up in a bunch of compiler errors.
>
> > I guess it´s because I´m not using any of those compilers, but
> > Code::Block/MinGW/GCC++, meaning I already get stuck when it comes to
> > linker settings and includes, obviously a tutorial for VC++ doesn´t
> > mention which libraries to include, while VC++ has them included by
> > default.
>
> > So the question is, how do I create a dialog, or where can I find a
> > beginners tutorial that isn´t based on a specific compiler or at least
> > mentions what one has to include when using a different compiler.
>
> > I´d be happy to have a single edit field and an OK button where the
> > user can submit a line of text to the program.
>
> My GCC build batch file looks something like this:
> windres test.rc test.o
> gcc -mwindows test.cpp test.o
>
> If you use Windows Common Controls, you'll need to add -lcomctl32 before -
> mwindows
>
> theForger's tutorial has a few hints for different compilers, but is based
> on VC++:  http://www.winprog.org/tutorial/
>
> Puckdropper
> --
> If you're quiet, your teeth never touch your ankles.
>
> To email me directly, send a message to puckdropper (at) fastmail.fm- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

I know theForger´s site, I´ve checked it out once, but I found it
useless for me.
In his page about Dialogs, I get as far as line one of chapter one,
creating a resource.
That´s where my compiler already brings up "syntax error" and I have
no clue what is spelled wrong there.
I´ve downloaded his source code, to check for differences, but
aparently the typo is in there as well.
From: dj3vande on
In article <3209357e-903f-45c3-b066-0ce9d7c7dc50(a)e39g2000hsf.googlegroups.com>,
Piranha <eu_piranha(a)gmx.net> wrote:

>I know theForger4s site, I4ve checked it out once, but I found it
>useless for me.
>In his page about Dialogs, I get as far as line one of chapter one,
>creating a resource.
>That4s where my compiler already brings up "syntax error" and I have
>no clue what is spelled wrong there.
>I4ve downloaded his source code, to check for differences, but
>aparently the typo is in there as well.

Stupid question, but... are you trying to compile the resource script
with a C compiler? That could be a problem.
I've never encountered a C compiler that recognizes and does the right
thing with a resource file; there's a separate resource compiler you
should be using. I believe it's `windres' for MinGW.
(A Win32 linker should be able to recognize and DTRT with the compiled
resource file.)


dave

--
Dave Vandervies dj3vande at eskimo dot com
I recall a car which had a "CHECK ENGINE" _noise_. When the noise
stopped, you checked the engine.
--Tanuki in the scary devil monastery