Article View: borland.public.cppbuilder.nativeapi
Article #4216Custom button in title bar (MDI)
From: Thorsten Kettner
Date: Tue, 07 Mar 2006 15:29
Date: Tue, 07 Mar 2006 15:29
19 lines
1733 bytes
1733 bytes
Hi, I am trying to place a custom button in the window's title bar. I am catching WM_NCPAINT to do this. This works fine. On WM_NCACTIVATE and WM_SETTEXT Windows would paint my button over and not send WM_NCPAINT. I avoid this by catching these too and suppress their drawing and do mine instead. This works fine too. My problem: My form is an MDI sheet. When I maximize it, my button gets painted over. There must be another event just like WM_NCACTIVATE and WM_SETTEXT that does this. I just don't know which one. Who knows? Which message must I catch and treat like I do with WM_NCACTIVATE and WM_SETTEXT? TIA. PS: If anybody should look for a code sample on how to draw a custom button in the title bar, I got my information here: http://www.catch22.net/tuts/titlebar.asp
Technical Details
Message-ID:
<440db4f7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c1474b588c71f3fa,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> Sender: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> Reply-To: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> Subject: Custom button in title bar (MDI) Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 80.85.196.94 NNTP-Posting-Host: 207.105.83.66 Message-ID: <440db4f7$1@newsgroups.borland.com> Date: 7 Mar 2006 08:29:43 -0700 X-Trace: newsgroups.borland.com 1141748983 207.105.83.66 (7 Mar 2006 08:29:43 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail