Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

initialising sub-classed list control

Posted on 1999-06-21
3
Medium Priority
?
153 Views
Last Modified: 2013-11-20
Where's the best place to modify styles and add columns to a sub-classed list control. i've tried in OnCreate but this dont work. i suppose what i'm after is the equivalent of OnInitialUpdate or OnInitDialog.
0
Comment
Question by:paulburns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 1307491
Do it in PreSubclassWindow
e.g. here is sample of my code which i use to subclass a button..

void
CButtonSubc::PreSubclassWindow ()
{
      // Call base class

      CButton::PreSubclassWindow ();

      // Add BS_OWNERDRAW and BS_NOTIFY

      ModifyStyle (0, BS_OWNERDRAW | BS_NOTIFY);

      // Change the window text if necessary

      ChangeWindowText ();
}

Similarly you can change your list control's style and add columns too !

Good Luck!
0
 
LVL 2

Author Comment

by:paulburns
ID: 1307492
yep, that its. answer and points are yours. thanks.
0
 
LVL 23

Accepted Solution

by:
naveenkohli earned 200 total points
ID: 1307493
Alrite !! here is the detailed answer :))
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question