Visual Studio
(1)
XP
(1)
SysListView32
(1)
DavePlease
(1)
TreeView
(1)
ListView
(1)
Windows
(1)
Serif
(1)

ListView box with adjustable size

Asked By ChangChiTheGraphics
29-Dec-09 09:38 AM
Hi,

I have a dialog box which contains a Listview box and a TreeView box inside it
I like to change the size of the ListView box and the size of TreeView box by
dragging mouse cursor and do it independently of the parent dialog box

Essentially, it seems that I need an equivalent of WS_THICKFRAME for
ListView box.

I am recreating what Windows Explorer does,i.e. we can change the width
of the ListView box or TreeView box.

I would appreciate help.

My code sample is shown below.

AC16MLESS DIALOGEX 50, 30, 401, 276
STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_OVERLAPPEDWINDOW
MENU PREVEXPLORER
FONT 8, "MS Sans Serif", 400, 0, 0x0

BEGIN
CONTROL "",IDC_LIST4,"SysListView32",LVS_LIST | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS |
LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_BORDER |
WS_TABSTOP,152,50,222,182,WS_EX_ACCEPTFILES
END

Thank you,
ChangChiTheGraphics

This is normally done via the use of some form of "splitter" control.

David Lowndes replied to ChangChiTheGraphics
29-Dec-09 10:24 AM
This is normally done via the use of some form of "splitter" control.
Unfortunately, (AFAIK) there is no native splitter control, however if
you use VS and start from an MFC project you can build Explorer like
interfaces (with a split tree/list view) quite easily.

Dave

Thank you, DavePlease excuse my ignorance.What is (AFAIK) and VS, please ?

ChangChiTheGraphics replied to David Lowndes
29-Dec-09 02:39 PM
Thank you, Dave

Please excuse my ignorance.
What is (AFAIK) and VS, please ?

I use Microsoft Visual studio 2008,
my platform is Microsoft XP service pack2
I use C or C++ language.

Would you say a little more to help me solve my problem?
Would you tell me the function that creates the "splitter" control ?

I would appreciate a little more extra help from you.

Thank you very much, Dave

ChangChiTheGraphics

As Far as I Know.

David Lowndes replied to ChangChiTheGraphics
29-Dec-09 04:17 PM
As Far as I Know.
Visual Studio


With Visual Studio, Create a new Visual C++ project, MFC application.

In the MFC Application Wizard, choose a "Windows Explorer" project
style.

That should get you something like what you are looking for.

Dave
Hi David,I tried your idea.You said"It might be crazy enough to work.
ChangChiTheGraphics replied to David Lowndes
30-Dec-09 03:09 AM
Hi David,

I tried your idea.
You said"It might be crazy enough to work."

I inserted "WS_THICKRFAME" to ListView statement.

and IT WORKS, just like your crazy hunch said.
IT WORKS. IT WORKS. IT WORKS.

I also looked into your idea of "splitter" control
I am thinking that what I realy need is "Docking" control.
i.e. TreeView box docking to left side of parent dialog box
and ListView box to the right of parent dialog box.

Am I all wrong?
I know very little about Docking functions.
Would you say something about it if it is a promising
course of action?

Thanks,
ChangchiTheGraphics

Thanks Dave
ChangChiTheGraphics
Only you know what you want.
David Lowndes replied to ChangChiTheGraphics
30-Dec-09 04:27 AM
Only you know what you want.


You're not alone ;)


You wanted something like Explorer, I gave you the nearest thing I am
aware of - which is the splitter solution.

Dave
Post Question To EggHeadCafe