BrainDump
  Home arrow BrainDump arrow Item Selection in List Control under MFC
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Item Selection in List Control under MFC
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-03-10

    Table of Contents:
  • Item Selection in List Control under MFC
  • The Custom Draw
  • Enable
  • In action

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Item Selection in List Control under MFC


    (Page 1 of 4 )

    The MFC list control using the report view can be a very powerful implementation of a control, with many sub items separated by clearly visible grids that still do not ruin the overall picture. Making an application inherit this Excel lookalike style is easier than it sounds. The down side of this, however, is that it lacks some major features, such as clear sub item selection.

    Now this is not necessarily a bad thing. If it were already implemented it could sometimes be a down side for the user, as an additional unused code segment. On the other hand, if you want to have this option, you may implement it using some MFC paired with OOP knowledge. Of course this is a troublesome process, because as easy it seems at first glance, the painful aspect involves taking care of all of the special cases.

    Due to this, many users turn to an already-implemented class. Just browse the Codeproject page, and after a few clicks you will find some implementations. A few are freeware that you may use it inside your application for no fee at all. The only problem with this approach is that users who did this in their spare time implement these, and code maintenance and debugging was not done throughout the implementation. 

    This small problem can be bypassed by acquiring a third party library. Nevertheless, keep in mind that you will have to pay some cash for this. However, if you can afford the time to develop your own, you will have the advantage of seeing both what happens in front of and behind the scenes, so if something strange happens you can find the upsetting code section more easily.

    This article is designed to help you with this task, or to introduce a method for how you can achieve something like this. Additionally I will also show you how to exploit the custom drawing inside the MFC. This article is the third part of the series I allocated to the introduction of the MFC list control.

    If you failed to read the first two, I invite you to read them here on the ASP Free website under the names of Controls inside MFC and The Virtual List. Of course, you may find them faster by clicking on my name and selecting from there the corresponding parts. These articles contain some crucial information that you will need to understand this article as well, so if you intend to keep reading I strongly advise to start with those.

    More BrainDump Articles
    More By Gabor Bernat


     

    BRAINDUMP ARTICLES

    - Microsoft, NSF Open Cloud Computing to Scien...
    - Windows 7 Grabs One-Tenth of Market
    - Windows Mobile 7
    - Commands in WPF
    - Routing Events in WPF
    - Property Value Inheritance and More WPF Conc...
    - Important New Concepts in WPF
    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek