🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Dialog Boxes and child windows

#10907
From: Ed Mulroy [TeamB]
Date: Sat, 20 Mar 2004 18:25
26 lines
1739 bytes
In this part of the code:

>    HINSTANCE hInst =
> reinterpret_cast<HINSTANCE>(GetWindowLong(hWnd,
> GWL_HINSTANCE));

That is a lot of typing to get what you already have.  The startup
code gives you that value.  Add this at the top of your source file to
make it available.

  extern HINSTANCE _hInstance;

In this line:

>   while (GetMessage(&msg, 0, 0, 0)) {

Win32 has altered things.  In some cases a -1 is returned and
indicates a situation where you wish to stop the loop.  I suggest that
you change it to something like this:

   while (GetMessage(&msg, 0, 0, 0) > 0) {

.  Ed

> Gary Setter wrote in message
> news:405c6892$1@newsgroups.borland.com...
Technical Details
Message-ID: <405c8cb1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <405b3edd@newsgroups.borland.com> <405b4370$1@newsgroups.borland.com> <405b53f5$1@newsgroups.borland.com> <405c6892$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,f7c94584fd5860a5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-20 10:41:01 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <405b3edd@newsgroups.borland.com> <405b4370$1@newsgroups.borland.com> <405b53f5$1@newsgroups.borland.com> <405c6892$1@newsgroups.borland.com>
Subject: Re: Dialog Boxes and child windows
Date: Sat, 20 Mar 2004 13:25:50 -0500
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 24.74.175.102
Message-ID: <405c8cb1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079807153 24.74.175.102 (20 Mar 2004 10:25:53 -0800)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail