Click here to Skip to main content
12,508,996 members (53,722 online)
Click here to Skip to main content
Add your own
alternative version

Stats

124.5K views
1.1K downloads
54 bookmarked
Posted

List view customizations

, 23 Apr 2001
Rate this:
Please Sign up or sign in to vote.
List view sort on header click and showing 'No items' with 'More' tooltip

Sample Image - LVSample.jpg

Introduction

WinMain simply calls WinMain_Internal. WinMain_Internal does the following:

  1. Initializes common controls.
    INITCOMMONCONTROLSEX InitCC;
    
    InitCC.dwICC =
    InitCC.dwICC =
        ICC_LISTVIEW_CLASSES  |  //  list view
        ICC_PROGRESS_CLASS    |  //  progress bar
        ICC_TREEVIEW_CLASSES  |  //  tree view & tooltip
        ICC_BAR_CLASSES       |  //  toolbar, status bar, trackbar & tooltip
        ICC_UPDOWN_CLASS      |  //  up-down
        ICC_USEREX_CLASSES    |  //  extended combo box
        ICC_TAB_CLASSES       |  //  tab & tooltip
        ICC_COOL_CLASSES      |  //  rebar
        ICC_DATE_CLASSES      |  //  date & time picker
        0;
    InitCC.dwSize    = sizeof(INITCOMMONCONTROLSEX);
    
    if(!InitCommonControlsEx(&InitCC))
        return -2;

    -1 is the standard return value for DialogBox failure, so we use -2. Of course, defining error constants with more readable values is recommended.

    Notes:

    1. Although Ole32.lib is linked, only VARIANT comparations and BSTR manipulator are used. So, OleInitialize call is not required.
    2. Not all of the ICC_* constants are required for this sample. You may choose the appropriate set that fits your needs.
    3. The sample assumes the list view in report mode.
  2. Calls DialogBox to show our sample dialog.

The dialog has 4 handlers.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Sardaukar
Web Developer
Romania Romania
No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
Generalquestion Pin
Member 457620314-Sep-10 0:49
memberMember 457620314-Sep-10 0:49 
Questionsummarize particular listview column data Pin
ayeshika27-Jun-08 8:10
memberayeshika27-Jun-08 8:10 
GeneralCompiler Error Pin
cpp_prgmer6-Feb-06 19:40
membercpp_prgmer6-Feb-06 19:40 
GeneralComplier error... Pin
huangashen14-Jul-04 2:47
memberhuangashen14-Jul-04 2:47 
GeneralRe: Complier error... Pin
Cristian Amarie27-Dec-04 4:39
memberCristian Amarie27-Dec-04 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160927.1 | Last Updated 24 Apr 2001
Article Copyright 2001 by Sardaukar
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid