Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error C2102: '&' requires l-value Pin
Rage14-May-03 22:50
professionalRage14-May-03 22:50 
GeneralRe: error C2102: '&' requires l-value Pin
flora_k14-May-03 23:08
flora_k14-May-03 23:08 
GeneralRe: error C2102: '&' requires l-value Pin
jhwurmbach14-May-03 23:19
jhwurmbach14-May-03 23:19 
GeneralRe: error C2102: '&' requires l-value Pin
Rage14-May-03 23:27
professionalRage14-May-03 23:27 
GeneralRe: error C2102: '&' requires l-value Pin
flora_k14-May-03 23:54
flora_k14-May-03 23:54 
GeneralRe: error C2102: '&' requires l-value Pin
David Crow15-May-03 3:02
David Crow15-May-03 3:02 
GeneralRe: error C2102: '&' requires l-value Pin
flora_k14-May-03 22:40
flora_k14-May-03 22:40 
Generaldifficult - CListCtrl::GetItemRect() Pin
JensB14-May-03 21:59
JensB14-May-03 21:59 
Hi
I made a derived class from CListCtrl.
I tried to use GetItemRect in a paint() function in that class

void CMyListCtrl::OnPaint()
...
CHeaderCtrl* pHC = (CHeaderCtrl*)GetDlgItem(0);

if ( pHC != NULL )
{
CRect rcH;
pHC->GetItemRect(0, &rcH);
}

This should certainly work because GetItemRect() is a member function of CListCtrl. But VC5 doesn't recognise this member function.
I know i can obtain the same thing with manually sending a message
something like:

OnPaint();
...
CHeaderCtrl* pHC = (CHeaderCtrl*)GetDlgItem(0);

if ( pHC != NULL )
{
CRect rcH;
this->SendMessage(LVM_GETITEMRECT, &rcH, 0);
}

LVM_GETITEMRECT is the message 'GetItemRect' sends, but this doesn't work. Does anyone know how to do this correctly?

Greetings
Jens
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
Rage14-May-03 22:09
professionalRage14-May-03 22:09 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
JensB14-May-03 22:17
JensB14-May-03 22:17 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
Rage14-May-03 22:25
professionalRage14-May-03 22:25 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
JensB14-May-03 22:32
JensB14-May-03 22:32 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
Rage14-May-03 22:46
professionalRage14-May-03 22:46 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
JensB14-May-03 22:52
JensB14-May-03 22:52 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
Rage14-May-03 22:59
professionalRage14-May-03 22:59 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
JensB14-May-03 23:05
JensB14-May-03 23:05 
GeneralRe: difficult - CListCtrl::GetItemRect() Pin
Rage14-May-03 23:15
professionalRage14-May-03 23:15 
Generalchange the language in edit box Pin
Didaa14-May-03 21:55
Didaa14-May-03 21:55 
GeneralRe: change the language in edit box Pin
Rage15-May-03 7:58
professionalRage15-May-03 7:58 
GeneralProgramming with templates Pin
Steve Thresher14-May-03 21:48
Steve Thresher14-May-03 21:48 
GeneralRe: Programming with templates Pin
jhwurmbach14-May-03 22:22
jhwurmbach14-May-03 22:22 
GeneralRe: Programming with templates Pin
Steve Thresher14-May-03 23:00
Steve Thresher14-May-03 23:00 
GeneralRe: Programming with templates Pin
jhwurmbach14-May-03 23:09
jhwurmbach14-May-03 23:09 
GeneralShellExecute Pin
Bonnie214-May-03 21:38
Bonnie214-May-03 21:38 
GeneralRe: ShellExecute Pin
Johnny ²14-May-03 21:43
Johnny ²14-May-03 21:43 

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.