🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Title bar on Edit box

#7460
From: Remy Lebeau (TeamB)
Date: Mon, 31 Jan 2005 20:58
39 lines
2071 bytes
"Wifetaker" <nobody@nowhere.com> wrote in message
news:41fe8b24@newsgroups.borland.com...

> eh = CreateWindow("EDIT", NULL, WS_VISIBLE | WS_VSCROLL | ES_MULTILINE |
> WS_BORDER
>         | ES_LEFT, 0, 0, 250, 250, NULL, NULL, hInst, NULL);

You did not specify the WS_CHILD style.

> SetParent(eh, hWnd);

You do not need to call SetParent() as CreateWindow() has an hWndParent
parameter that you should be using instead.

    eh = CreateWindow("EDIT", NULL, WS_VISIBLE | WS_VSCROLL | ES_MULTILINE |
WS_BORDER | ES_LEFT, 0, 0, 250, 250, hWnd, NULL, hInst, NULL);

> ShowWindow(eh, SW_SHOW);

You do not need to call ShowWindow().  You already gave the the edit window
the WS_VISIBLE style, so it will automatically be visible in its Parent
window.

With all of that said, use this code:

    // Main window
    hWnd = CreateWindow("BeoWindow", "BeoWindow", WS_OVERLAPPEDWINDOW, 0, 0,
250, 250, NULL, NULL, hInst, NULL);

    // Edit Box
    eh = CreateWindow("EDIT", NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL |
ES_MULTILINE | WS_BORDER | ES_LEFT, 0, 0, 250, 250, hWnd, NULL, hInst,
NULL);

    ShowWindow(hWnd, SW_SHOW);


Gambit
Technical Details
Message-ID: <41fe9b50$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41fe8b24@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7a784de19bdaae32
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41fe8b24@newsgroups.borland.com>
Subject: Re: Title bar on Edit box
Date: Mon, 31 Jan 2005 12:58:46 -0800
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41fe9b50$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107204944 68.69.17.41 (31 Jan 2005 12:55:44 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail