Non-Client Paint Issue
-
In short, I need to be able to do this: http://i6.photobucket.com/albums/y210/notsotragichero/Chrome.png[^] I need to be able to add a small image in exactly the same spot Google has done here in Vista / 7. I have tried numerous solutions over the past week, but can not get this to be fully functional. Even once the image is painted, the NC area will not refresh, unless it is clicked off of, even when using RedrawWindow(). It shows the painted image, and an un-rendered border / titlebar.
[DllImport("user32.dll")] static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); private void OnTimer1Tick(object sender, EventArgs e) { RedrawWindow(this.Handle, IntPtr.Zero, IntPtr.Zero, 0x0400/*RDW_FRAME*/ | 0x0100/*RDW_UPDATENOW*/ | 0x0001/*RDW_INVALIDATE*/); }
*The tick is just for current testing purposes* Is there something, hopefully simple, that I am missing? Thanks, Brandon -
In short, I need to be able to do this: http://i6.photobucket.com/albums/y210/notsotragichero/Chrome.png[^] I need to be able to add a small image in exactly the same spot Google has done here in Vista / 7. I have tried numerous solutions over the past week, but can not get this to be fully functional. Even once the image is painted, the NC area will not refresh, unless it is clicked off of, even when using RedrawWindow(). It shows the painted image, and an un-rendered border / titlebar.
[DllImport("user32.dll")] static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); private void OnTimer1Tick(object sender, EventArgs e) { RedrawWindow(this.Handle, IntPtr.Zero, IntPtr.Zero, 0x0400/*RDW_FRAME*/ | 0x0100/*RDW_UPDATENOW*/ | 0x0001/*RDW_INVALIDATE*/); }
*The tick is just for current testing purposes* Is there something, hopefully simple, that I am missing? Thanks, BrandonThe best thing I know is to use a form without borders and do your own form borders. You can see that on chrome, msn messenger, media player and more. If you do find a way to draw on that area, please post your answer. Thanks :)