Announcement

Collapse
No announcement yet.

resizing borderless dialogs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chris Holbrook
    replied
    Originally posted by Chris Boss View Post
    You can process the WM_NCHITTEST message
    Yes, I just worked that one out, and found some code of Jules Marchildon's (from the late Pleistocene I believe), which uses WM_NCHITTEST and also features grippers, a nice example which I have adapted to work with dialogs and DDT. I put a demo back on the Source Code Forum here: http://www.powerbasic.com/support/pb...077#post293077.

    Leave a comment:


  • Edwin Knoppert
    replied
    *That's* a good one.

    Leave a comment:


  • Chris Boss
    replied
    You can process the WM_NCHITTEST message to "fake" Windows into thinking there is a resizable border. The return value you return for this message determines how Windows displays the cursor and how mouse clicks are handled.

    Leave a comment:


  • Edwin Knoppert
    replied
    Wm_setcursor..

    Leave a comment:


  • Chris Holbrook
    started a topic resizing borderless dialogs

    resizing borderless dialogs

    So far I have used the WS_THICKFRAME style to give a sizing border to the dialogs which I have been using. This works well but when the main dialog contains dozens of child dialogs it looks too fussy. However, when I loose the style, I loose the functionality as well.

    I can detect a left click near a border of a child dialog by trapping WM_MOUSEACTIVATE, then the WM_LBUTTONDOWN mouse message from the lparam, but the HIT-TEST value is always HT_CLIENT, reasonably enough.
    At this point by converting the mouse pointer coordinates I can detect whether the "hit" is within say 5 units of whichever edge of the child dialog, and use that for sizing by using SetWindowPos in the WM_PAINT handler.

    My difficulty is with where to obtain the coordinates used to resize the window while the border is being "moved" by the mouse. WM_MOUSEMOVE doesn't appear to fire while the child dialog is being resized.
Working...
X