|
-
April 19th, 1999, 02:19 PM
#1
Changing the height of a CHeaderCtrl that a CListCtrl uses
Does anyone know what mechanism a CListCtrl uses to determine where it can start drawing if you are using it in a Report mode with column headers?
I've have been using Spy++ to see what messages the CHeaderCtrl gets, but I cannot figure out what the CListCtrl is doing. I tried trapping the
HDM_LAYOUT message in the CHeaderCtrls DefWindowProc( I subclassed the header ), and from what I can tell the HDM_LAYOUT is being handled,
but when I try to change the cy value in the HD_LAYOUT under the WINDOWPOS.cy nothing happens. Any help would be greatly appreciated.
Sorry about the anon. post but the board won't recognize my password or something.
TIA,
Dan Ramage
-
October 24th, 2005, 08:11 AM
#2
Re: Changing the height of a CHeaderCtrl that a CListCtrl uses
just now i have first half-success with this source
half because i wand header smaller and first list ctrl line does not move up from original position (testing with xp look)
HRESULT CHeaderCtrlSmall::GetLayout(WPARAM wParam, LPARAM lParam)
{
HD_LAYOUT *phdLayout;
RECT *pRc;
WINDOWPOS *pWPos;
phdLayout = (HD_LAYOUT*)lParam;
pRc = phdLayout->prc;
pWPos = phdLayout->pwpos;
HRESULT lResult = CHeaderCtrl: efWindowProc(HDM_LAYOUT, wParam, lParam);
int bottom_old = pRc->bottom;
pRc->bottom = 25;
pWPos->cy -= bottom_old - pRc->bottom;
lResult = S_OK;
return lResult;
}
Last edited by real name; October 24th, 2005 at 08:21 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|