Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2004

Tip: Looking for answers? Try searching our database.

Problem with ListView_GetGroupMetrics & LVM_GETGROUPMETRICS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 16 Jun 2004 03:07 GMT
I found a huge design flaw with ListView_GetGroupMetrics (aka LVM_GETGROUPMETRICS) and I think this flaw is the reason the newsgroups do not mention this macro.

Basically this macro is supposed to return the metrics of a group in a listview, but none of the parameters in the data structure specify which group you want the info on!  I'm trying to find the size of a group header and the rectangle that group's items are sitting in and due to this I can't!  This is a really big mistake and I hope it gets fixed soon, the functionality is absolutely useless without this information!

While I'm at it, does the API provide any other way to get at this information?  Didn't think so :(

Another problem with using this macro (or its corresponding message) is that the flags are not defined.  The help says you can use LVGMF_BORDERCOLOR,
LVGMF_BORDERSIZE, LVGMF_NONE, and LVGMF_TEXTCOLOR.  If you use them, and even if you've included the required header Commctrl.h, you'll discover the compiler has no clue what you're talking about.

Any chance this was a feature that was never intended for public use and that's why it doesn't work or even have the necessary flags available?  I'm curious because I might force 0xffffffff into the flag field and see if it can somehow generate useful information anyway.
Wiz - 17 Jun 2004 21:38 GMT
> Another problem with using this macro (or its corresponding message)
> is that the flags are not defined.  The help says you can use
> LVGMF_BORDERCOLOR, LVGMF_BORDERSIZE, LVGMF_NONE, and LVGMF_TEXTCOLOR.  
> If you use them, and even if you've included the required header
> Commctrl.h, you'll discover the compiler has no clue what you're
> talking about.

My copies of CommCtrl.h in the PlatformSDKs for both VC7.0 and VC7.1
have:
#define LVGMF_NONE          0x00000000
#define LVGMF_BORDERSIZE    0x00000001
#define LVGMF_BORDERCOLOR   0x00000002
#define LVGMF_TEXTCOLOR     0x00000004

Can't argue with your other point, though, I don't see any way to
retrieve the group size information, either.

Wiz.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.