Click here to Skip to main content
15,914,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Terminate a process Pin
Stephen Hewitt10-Mar-10 19:22
Stephen Hewitt10-Mar-10 19:22 
GeneralRe: Terminate a process Pin
R@jeev K R10-Mar-10 21:09
R@jeev K R10-Mar-10 21:09 
AnswerRe: Terminate a process Pin
KarstenK10-Mar-10 21:26
mveKarstenK10-Mar-10 21:26 
QuestionMaking application as a child one Pin
Pryabu10-Mar-10 18:29
Pryabu10-Mar-10 18:29 
AnswerRe: Making application as a child one Pin
Stephen Hewitt10-Mar-10 18:41
Stephen Hewitt10-Mar-10 18:41 
GeneralRe: Making application as a child one Pin
Pryabu10-Mar-10 18:55
Pryabu10-Mar-10 18:55 
GeneralRe: Making application as a child one Pin
Stephen Hewitt10-Mar-10 18:58
Stephen Hewitt10-Mar-10 18:58 
QuestionCListCtrl custom draw issue Pin
Prasanth Vijayan10-Mar-10 18:11
Prasanth Vijayan10-Mar-10 18:11 
Hi all,

I am writing a custom control for my Win 32 application. IDE is VS2005 with MFC framework,
OS is Win Vista. Please see the code below and i could get the cell rectangle area by lplvcd->nmcd.rc.

void CExListCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMLVCUSTOMDRAW lplvcd = reinterpret_cast<LPNMLVCUSTOMDRAW>(pNMHDR);

if(NULL == lplvcd)
*pResult = 0;

//1
if (lplvcd->nmcd.dwDrawStage == CDDS_PREPAINT)
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
//2
else if (lplvcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT)
{
*pResult = CDRF_NOTIFYSUBITEMDRAW;
}
//3
else if (lplvcd->nmcd.dwDrawStage == (CDDS_ITEMPREPAINT | CDDS_SUBITEM))
{

//lplvcd->nmcd.rc - cell rect

*pResult = CDRF_DODEFAULT;
}
}


But when i tried to run the same code in Windows XP with Visula studio 2008, lplvcd->nmcd.rc.bottom and lplvcd->nmcd.rc.top value is always zero.

Does anybody know why it is happening?


Thanks,
Prasanth
AnswerRe: CListCtrl custom draw issue Pin
Eugen Podsypalnikov10-Mar-10 20:47
Eugen Podsypalnikov10-Mar-10 20:47 
GeneralRe: CListCtrl custom draw issue Pin
Prasanth Vijayan10-Mar-10 20:51
Prasanth Vijayan10-Mar-10 20:51 
QuestionComments in .rgs file Pin
Krishnakumartg10-Mar-10 18:09
Krishnakumartg10-Mar-10 18:09 
AnswerRe: Comments in .rgs file Pin
LunaticFringe10-Mar-10 18:17
LunaticFringe10-Mar-10 18:17 
GeneralRe: Comments in .rgs file Pin
Krishnakumartg10-Mar-10 21:46
Krishnakumartg10-Mar-10 21:46 
QuestionHow can insert menu to dialog by ce application? Pin
Patrick Tang10-Mar-10 15:27
Patrick Tang10-Mar-10 15:27 
AnswerRe: How can insert menu to dialog by ce application? Pin
Patrick Tang10-Mar-10 16:01
Patrick Tang10-Mar-10 16:01 
GeneralRe: How can insert menu to dialog by ce application? Pin
KingsGambit10-Mar-10 17:52
KingsGambit10-Mar-10 17:52 
QuestionDetecting Hooks [modified] Pin
hxhl9510-Mar-10 13:01
hxhl9510-Mar-10 13:01 
AnswerRe: Detecting Hooks Pin
Baltoro10-Mar-10 13:55
Baltoro10-Mar-10 13:55 
GeneralRe: Detecting Hooks Pin
hxhl9510-Mar-10 14:25
hxhl9510-Mar-10 14:25 
GeneralRe: Detecting Hooks Pin
Baltoro11-Mar-10 9:39
Baltoro11-Mar-10 9:39 
GeneralRe: Detecting Hooks Pin
Baltoro11-Mar-10 9:49
Baltoro11-Mar-10 9:49 
GeneralLooking for Hooks Pin
Baltoro11-Mar-10 10:34
Baltoro11-Mar-10 10:34 
GeneralRe: Detecting Hooks Pin
hxhl9511-Mar-10 13:29
hxhl9511-Mar-10 13:29 
GeneralRe: Detecting Hooks Pin
Baltoro13-Mar-10 10:47
Baltoro13-Mar-10 10:47 
GeneralRe: Detecting Hooks Pin
hxhl9513-Mar-10 10:49
hxhl9513-Mar-10 10:49 

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.