Re: gtk+ in Windows with VC6
- From: Paulo Pinto <paulo pinto altitudesoftware com>
- To: gtk-devel-list gnome org
- Subject: Re: gtk+ in Windows with VC6
- Date: Tue, 01 Aug 2000 09:47:12 +0100
> On Fri, 21 Jul 2000 kelch@act.org wrote:
>
> > Hi all,
> >
> > I have successfully installed and configured GTK+ for Win32 and have
> > it working. Only thing aggravating is the insistence on opening a
> > console window along with the application window. I am using VC6, and
> > setting up a workspace as a Win32 console application, as otherwise it
> > tries to find a WinMain in my code to begin execution, and the link
> > fails. Is there some way to do this without the console window, or to
> > cause it to open minimized? I suspect some kind of command line use
> > of VC6, but if possible I'd like to stay in the IDE.
> >
> > Joe Kelch
> > joek@magnus1.com
> > kelch@act.org
> >
No, the problem is that in Windows C programs only should have main ()
functions
if that are console programs. If they aren't and they create a window,
you will see
an anoying console window appering but witout contents.
The programs that aren't console programs should use instead the
WinMain () function,
but beware that it has a different prototype from main (). In fact the
prototype is
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow);
So if you want to avoid the console window appering, you should select
Win32 application
and replace your main () by WinMain (). Please note that this is not
exclusive of VC, this is
standard in Windows, all C/C++ compilers work this way.
Hope to have helped.
--
Paulo Pinto, uRD Software Engineer
Altitude Software (formerly Easyphone)
paulo.pinto@altitudesoftware.com
www.altitudesoftware.com
The opinions expressed by myself are personal and not of my employer.
Use Linux. The choice of a free generation.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]