Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Header in ListView control

Posted on 1998-12-12
1
Medium Priority
?
388 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
[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
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

604 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