Currently, I've been using the DrawFocusRect to indicate the border of a window being dragged. Trust me, showing just the outline is fine. The window can be dragged anywhere on the app or desktop, over other apps, etc. My biggest complaint with DrawFocusRect is it's mid-gray color, which is almost invisible on some backgrounds. Does anyone have suggestions/sources for a better way? Thanks
Posted on 2001-02-07 05:46:00 by Ernie
use rectangle? MS has an article about it Article ID: Q135865
Posted on 2001-02-07 06:06:00 by Hiroshimator
That is a good article, but I'm looking more for basic drawing info, like how to draw a rect with a wide border, possibly with a 'dot' brush, and draw it with an XOR format , so drawing the same again makes it dissapear. Blitting, LineTo I can do, but I think this is setting a path or such, and I'm clueless there.
Posted on 2001-02-07 14:15:00 by Ernie
Ernie, your project seems to progress fast. I do use DrawFocusRect too. But if you're not satisfied with it, check out FrameRect. You can create your own brush for use with it. As to the GDI operation, check SetROP2 function. Good luck
Posted on 2001-02-07 14:25:00 by Iczelion
Fast? You think this is FAST? Gee, it seems positively glacial to me. But I do have a toolwindow I can dock to horizontal rebars... gotta hack in the vertical stuff now (special WM_PAINT, HITTESTs and such). This window class may act as a holder for any control you wish. It might be ready for prime time in another week.
Posted on 2001-02-07 15:26:00 by Ernie
Ernie, Is this your docking toolbar example you're working on? Why don't you just drag a bitmap of what's being dragged (like office tools) so you don't see the outline... actually, I think it's really moving the tool in realtime... actually executing it as you drag it... otherwise, I have no ideas... I haven't done that yet. I wrote my own translucent imag drag (in VB) but not asm... since I didn't like the bounding box it by default shows... Oh well, can't wait to see this when it's finished. I've been wanting to know how to make windows dock forever now and haven't figured it out yet... _Shawn
Posted on 2001-02-07 15:34:00 by _Shawn
Shawn, It's no huge secret how to make a toolwindow dock. Such a window will of course be the parent to some other controls so it does something useful. To dock it, just change the style and exstyle so it becomes a plain borderless child window, then send a rebar a RB_INSERTBAND message to add this window. Changing the styles still keeps all the kidlets where they were, just 'docks' then to the rebar. Undocking is similar, send a RB_DELETEBAND message, then again change the styles to get back a toolwindow. To make this a reuseable piece of code, I put most of the code in the handler to a custom window class (ToolTab) that should be used as a holder for the real controls that need docking. Adding fancy docked state buttons and such was just easier and more contained to do by subclassing the rebar to take over it's WM_PAINT, WM_LBUTTONDOWN, WM_LBUTTONUP and WM_MOUSEMOVE messages. Ugh, see how it gets complex real fast? I still have not mapped out how to do the single-splitters like VS has (I'm aiming for a studio dock tab clone) (is that some MFC class? I see the same in other apps)
Posted on 2001-02-08 02:17:00 by Ernie