🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2817

Re: form inside a dll loaded by a console application

#2817
From: Ed Mulroy
Date: Sat, 30 Dec 2006 03:46
30 lines
2528 bytes
In the attachments group there is a message titled GUI window in console 
app.

It is a not very well written demo of something like we are talking about. 
No dialogs, just a Win32 app using a normal window.  For those like me who 
prefer the command line for small demos, a make file is included.

While throwing this together I found out why you need to use PeekMessage 
instead of GetMessage.  A GetMessage loop demands at least one message after 
showing the window (even a mouse move will do it).  Peekmessage does not.

It also demos using a shared variable as a flag with which the console can 
cause the thread to end.

.  Ed

> Bob Gonder wrote in message
> news:u6gap296dev9r8edn5hu797lescpu2oesf@4ax.com...
>
>>I have opened a GUI window in a console mode application.
>>Unfortunately I did it a while ago and it was a Win32 and not
>> VCL application.
>
>>As I remember the console seemed to have its own message
>>loop.  I do not remember how I handled that and will look
>>around to see if I can out find what I did.
>
> I used DialogBox() which has it's own internal message loop,
> and doesn't return until the window closes.
> Perhaps you did too.
Technical Details
Message-ID: <4595e14b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <458e4f48@newsgroups.borland.com> <45903d10$1@newsgroups.borland.com> <45919f15@newsgroups.borland.com> <4591c308$1@newsgroups.borland.com> <4592cf7c$1@newsgroups.borland.com> <4592dc17$1@newsgroups.borland.com> <4592e225@newsgroups.borland.com> <4592ebe5$1@newsgroups.borland.com> <45932f76@newsgroups.borland.com> <u6gap296dev9r8edn5hu797lescpu2oesf@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3fa2091e9808a898
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <458e4f48@newsgroups.borland.com> <45903d10$1@newsgroups.borland.com> <45919f15@newsgroups.borland.com> <4591c308$1@newsgroups.borland.com> <4592cf7c$1@newsgroups.borland.com> <4592dc17$1@newsgroups.borland.com> <4592e225@newsgroups.borland.com> <4592ebe5$1@newsgroups.borland.com> <45932f76@newsgroups.borland.com> <u6gap296dev9r8edn5hu797lescpu2oesf@4ax.com>
Subject: Re: form inside a dll loaded by a console application
Date: Fri, 29 Dec 2006 22:46:30 -0500
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 66.57.117.102
Message-ID: <4595e14b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1167450443 66.57.117.102 (29 Dec 2006 19:47:23 -0800)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail