Seeking opinions of best practice on splitter windows  
Author Message
Yazzo





PostPosted: Tue Apr 05 07:05:32 CDT 2005 Top

Visual Studio C++ >> Seeking opinions of best practice on splitter windows Hello
When having a splitter window, i.e. a window that is about 5 pixels wide and
goes between the left-hand treeview and the right hand control, be it mdi
client window or listview or whatever, is it generally preferred practice to
have the left and right windows resize as the user is dragging the splitter
window, or to wait until the splitter window is dropped.
I notice that most Microsoft applications (e.g. Windows Explorer, Outlook
Express) go for the former, however it seems Visual Studio .NET adopts the
latter strategy.
I've coded my application so that it works like Visual Studio .NET. However
I can't make the splitter window adopt that transparent-gray crosshatch
pattern when it is being dragged, anybody know off-hand what the background
needs setting to to make it like that?
And also, which is the 'best-practice' method, or doesn't it generally
matter either way?

Visual Studio93  
 
 
dirk





PostPosted: Tue Apr 05 07:05:32 CDT 2005 Top

Visual Studio C++ >> Seeking opinions of best practice on splitter windows
"Bonj" <EMail@HideDomain.com> wrote in message
news:O4$EMail@HideDomain.com...
> Hello
> When having a splitter window, i.e. a window that is about 5 pixels wide
and
> goes between the left-hand treeview and the right hand control, be it mdi
> client window or listview or whatever, is it generally preferred practice
to
> have the left and right windows resize as the user is dragging the
splitter
> window, or to wait until the splitter window is dropped.
> I notice that most Microsoft applications (e.g. Windows Explorer, Outlook
> Express) go for the former, however it seems Visual Studio .NET adopts the
> latter strategy.
> I've coded my application so that it works like Visual Studio .NET.
However
> I can't make the splitter window adopt that transparent-gray crosshatch
> pattern when it is being dragged, anybody know off-hand what the
background
> needs setting to to make it like that?
> And also, which is the 'best-practice' method, or doesn't it generally
> matter either way?
>
>

There is a system setting (desktop properties): Show window contents while
dragging. You should respect this setting and do the appropriate
painting/update. For the second problem you can take a look at the WTL's
CSplitterWindow. They use CreatePatternBrush with a gray bitmap and then
PatBlt with PATINVERT.




 
 
Bonj





PostPosted: Tue Apr 05 11:30:01 CDT 2005 Top

Visual Studio C++ >> Seeking opinions of best practice on splitter windows
>>
>
> There is a system setting (desktop properties): Show window contents while
> dragging.

Oh yes, there is - that's good to know. It appears to be a numeric value in
a string key though - is this normal / to be expected? Might it change in a
future version of windows?


 
 
dirk





PostPosted: Tue Apr 05 13:55:50 CDT 2005 Top

Visual Studio C++ >> Seeking opinions of best practice on splitter windows
"Bonj" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>
> >>
> >
> > There is a system setting (desktop properties): Show window contents
while
> > dragging.
>
> Oh yes, there is - that's good to know. It appears to be a numeric value
in
> a string key though - is this normal / to be expected? Might it change in
a
> future version of windows?
>
>

BOOL m_bFullDrag;
::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, &m_bFullDrag, 0);

If you worry about future windows versions you can check for success and if
it fails
use your own setting.


 
 
Bonj





PostPosted: Tue Apr 05 14:08:39 CDT 2005 Top

Visual Studio C++ >> Seeking opinions of best practice on splitter windows oh, that's a much better way thanks

"dirk" <dirk.kapusta@reply_in_newsgroup> wrote in message
news:EMail@HideDomain.com...
>
> "Bonj" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
>>
>> >>
>> >
>> > There is a system setting (desktop properties): Show window contents
> while
>> > dragging.
>>
>> Oh yes, there is - that's good to know. It appears to be a numeric value
> in
>> a string key though - is this normal / to be expected? Might it change in
> a
>> future version of windows?
>>
>>
>
> BOOL m_bFullDrag;
> ::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, &m_bFullDrag, 0);
>
> If you worry about future windows versions you can check for success and
> if
> it fails
> use your own setting.
>
>