🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Title bar on Edit box

#7459
From: Wifetaker
Date: Mon, 31 Jan 2005 19:43
40 lines
2642 bytes
I'm trying to create a window from within a DLL.  The main window is created
and displayed correctly, but I try to put an edit box on there, and the edit
box has a title bar on the top.  The code loooks like this:

WNDCLASSEX wndClass;
ZeroMemory(&wndClass, sizeof(WNDCLASSEX));
wndClass.cbSize = sizeof(WNDCLASSEX);      // size of the window struct in
bytes
wndClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;  // window styles to
use
wndClass.lpfnWndProc = MsgProc;           // function name of event handler
wndClass.hInstance = hInst;          // handle to this DLL instance
wndClass.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);// background
colour of window
wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);   // icon for the app
window
wndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);   // icon when minimized
to taskbar
wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);    // cursor to use for this
window
wndClass.lpszClassName = "BeoWindow";      // name for this class

atmClass = RegisterClassEx(&wndClass);
// Main window
hWnd = CreateWindow("BeoWindow", "BeoWindow", WS_OVERLAPPEDWINDOW, 0, 0,
250, 250, NULL, NULL, hInst, NULL);
// Edit Box
eh = CreateWindow("EDIT", NULL, WS_VISIBLE | WS_VSCROLL | ES_MULTILINE |
WS_BORDER
        | ES_LEFT, 0, 0, 250, 250, NULL, NULL, hInst, NULL);
SetParent(eh, hWnd);
ShowWindow(eh, SW_SHOW);
ShowWindow(hWnd, SW_SHOW);

The question is, how do I get it to not display the title bar?  In case
you're wondering, the window must be created from within the DLL, if that
somehow makes a difference.  The DLL functions as a plug-in for the main
application, which just uses the standard LoadLibrary function.  I've tried
other standard window classes like "BUTTON", and it even puts a title bar on
the freagin' button.
Technical Details
Message-ID: <41fe8b24@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7a784de19bdaae32,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Wifetaker" <nobody@nowhere.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Title bar on Edit box
Date: Mon, 31 Jan 2005 12:43:45 -0700
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 172.163.89.17
Message-ID: <41fe8b24@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107200804 172.163.89.17 (31 Jan 2005 11:46:44 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail