Solved

Header in ListView control

Posted on 1998-12-12
1
370 Views
Last Modified: 2013-12-03
How can I get the header control in ListView control?
We have a PropertySheet with 5 tabs. In one tab of this PropertySheet there is a dialog and a ListView control. The first time that we paint this dialog, the ListView control don't paint well. I posted a meesage to ListView for repaint and the rows are ok, but the header is ¿hide?.
If we go to another tab and return to the ListView, then it looks well.

If I get the handle of the header, I can force it to display, but I haven't this handle.

I'm programming in BC++ 5.0
Sorry, my english is very bad.
0
Comment
Question by:tui
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1417186
1. MFC version, pList is a pointer to a CListCtrl,
      CWnd * pChild = pList->GetWindow( GW_CHILD ) ;
      if ( pChild == NULL ) return ;
      ASSERT_VALID(pChild) ;
pWnd is a pointer to the CHeaderCtrl


2. API version

HWND hChild = GetWindow( hList, GW_CHILD ) ;

hList is HWND of the list control
hChild is HWND of the header



Remember in either case the return from GetWindow can be NULL if the header can't be found (it's not created yet, or you don't have on your list)

HWND hWndHeader =
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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