Article View: borland.public.cppbuilder.nativeapi
Article #8353Re: Toolbar
From: JF Jolin
Date: Tue, 02 Nov 2004 20:00
Date: Tue, 02 Nov 2004 20:00
48 lines
2263 bytes
2263 bytes
From what I understand, your two toolbar windows overlapped each others. Try to compare their positions with GetWindowRect(). Their coordinates are probably the same. A toolbar created with WS_CHILD occupy the entire width of the window at creation time. So left and right on a same line doesn't seem to make sense in this context. I would suggest to merge all buttons into one toolbar. Spaces between buttons can be adjust with coordinates of the window to which they belong. -- JF Jolin [Montreal, Canada] 30 Oct 2004 13:51:34 -0400, Bob Piskac wrote: > I am using a toolbar in a Dialog box with help tips. All is working fine > except.... > > I can only create one tool bar in the dialog box. If I try to create a > second one with a new ID, the first toolbar pictures don't draw correctly > and I don't see the second toolbar. > > Is there any way to put spaces between the buttons? > > > hToolbarLeft = CreateWindowEx(WS_EX_TOOLWINDOW, TOOLBARCLASSNAME, NULL, > WS_VISIBLE | > WS_BORDER | WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT, > 0, 0, 180, 30, > hwndDlg, (HMENU)1000, > (HINSTANCE) > GetWindowLong(hwndDlg, GWL_HINSTANCE), NULL); > > hToolbarRight = CreateWindowEx(WS_EX_TOOLWINDOW, TOOLBARCLASSNAME, NULL, > WS_VISIBLE | > WS_BORDER | WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT, > 120, 0, 100, 30, > hwndDlg, (HMENU)1001, > (HINSTANCE) > GetWindowLong(hwndDlg, GWL_HINSTANCE), NULL); > > >
Technical Details
Message-ID:
<opsgusi6dbz6rw7b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4183d493$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fe2724bcd928c67d X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Toolbar References: <4183d493$1@newsgroups.borland.com> Message-ID: <opsgusi6dbz6rw7b@newsgroups.borland.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed From: JF Jolin <jfj@nospam.com> MIME-Version: 1.0 Date: Tue, 02 Nov 2004 15:00:32 -0500 User-Agent: Opera7.11/Win32 M2 build 2887 NNTP-Posting-Host: 66.158.141.132 X-Trace: newsgroups.borland.com 1099425633 66.158.141.132 (2 Nov 2004 12:00:33 -0700) Lines: 48 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail