Click here to Skip to main content
15,921,279 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to record my voice to *.wma format? Pin
Huu Quynh26-Oct-01 1:02
Huu Quynh26-Oct-01 1:02 
GeneralSending WM_MOUSEMOVE to any window Pin
Kuniva26-Oct-01 0:48
Kuniva26-Oct-01 0:48 
Generalalso... Pin
Kuniva26-Oct-01 0:49
Kuniva26-Oct-01 0:49 
GeneralRe: also... Pin
Alvaro Mendez26-Oct-01 11:31
Alvaro Mendez26-Oct-01 11:31 
GeneralRe: Sending WM_MOUSEMOVE to any window Pin
Tomasz Sowinski26-Oct-01 0:55
Tomasz Sowinski26-Oct-01 0:55 
GeneralScrolling Large Views Pin
26-Oct-01 0:40
suss26-Oct-01 0:40 
GeneralRe: Scrolling Large Views Pin
Tomasz Sowinski26-Oct-01 0:46
Tomasz Sowinski26-Oct-01 0:46 
GeneralSelected Item's in custom draw CListCtrl Pin
stephan25-Oct-01 22:40
stephan25-Oct-01 22:40 
I create custom draw text in ClistCtrl. But i get problems because
the item's i selected were not highlighted. Do anybody know how i can do
this?

Please help!
Here is the code i wrote:
void CMyList::OnCustomdrawList ( NMHDR* pNMHDR, LRESULT* pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<nmlvcustomdraw*>( pNMHDR );

*pResult = 0;

CDC *pDC= CDC::FromHandle(pLVCD->nmcd.hdc);
CRect rect;

switch(pLVCD->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
*pResult = CDRF_NOTIFYITEMDRAW;
break;

case CDDS_ITEMPREPAINT:
int iRow = pLVCD->nmcd.dwItemSpec;
CString sItem = GetItemText(iRow, 0);
CString sNo = sItem.SpanIncluding("1234567890");
CString sLetter= sItem.Right(4);

GetItemRect(iRow, rect, LVIR_LABEL);

pDC->SetTextAlign ( TA_RIGHT | TA_TOP | TA_UPDATECP );
pDC->MoveTo ( rect.right , rect.top );

if ( sLetter.Find("B") != -1 )
{
pDC->SetTextColor ( RGB(255,0,0) );
pDC->TextOut ( 0, 0, sLetter );

}
else if ( sLetter.Find("E") != -1 )
{
pDC->SetTextColor ( RGB(0,0,255) );
pDC->TextOut ( 0, 0, sLetter );
}
else if ( sLetter.Find("V") != -1 )
{
pDC->SetTextColor ( RGB(0,170,0) );
pDC->TextOut ( 0, 0, sLetter );

}
else if ( sLetter.Find("U") != -1 )
{
pDC->SetTextColor ( RGB(255,0,255) );
pDC->TextOut ( 0, 0, sLetter );

}
else if ( sLetter.Find("AR") != -1 )
{
pDC->SetTextColor ( RGB(0,255,255) );
pDC->TextOut ( 0, 0, sLetter );

}
pDC->SetTextColor ( RGB(0,0,0) );
pDC->TextOut ( 0, 0, sNo );

*pResult= CDRF_SKIPDEFAULT;

break;
default:
*pResult = CDRF_DODEFAULT;
break;
}
}
GeneralRe: Selected Item's in custom draw CListCtrl Pin
Tomasz Sowinski26-Oct-01 0:06
Tomasz Sowinski26-Oct-01 0:06 
GeneralRe: Selected Item's in custom draw CListCtrl Pin
stephan8-Nov-01 3:10
stephan8-Nov-01 3:10 
QuestionHow to change the caption of a dialog at run time ?? Pin
25-Oct-01 22:27
suss25-Oct-01 22:27 
AnswerRe: How to change the caption of a dialog at run time ?? Pin
25-Oct-01 22:43
suss25-Oct-01 22:43 
AnswerRe: How to change the caption of a dialog at run time ?? Pin
Christian Graus25-Oct-01 22:44
protectorChristian Graus25-Oct-01 22:44 
AnswerThanx Pin
adara25-Oct-01 23:15
adara25-Oct-01 23:15 
GeneralSetting a window's font Pin
James Bird25-Oct-01 21:44
James Bird25-Oct-01 21:44 
GeneralRe: Setting a window's font Pin
Nish Nishant25-Oct-01 23:39
sitebuilderNish Nishant25-Oct-01 23:39 
GeneralRe: Setting a window's font Pin
Christian Graus25-Oct-01 23:42
protectorChristian Graus25-Oct-01 23:42 
GeneralRe: Setting a window's font Pin
Nish Nishant26-Oct-01 0:01
sitebuilderNish Nishant26-Oct-01 0:01 
GeneralRe: Setting a window's font Pin
Tomasz Sowinski26-Oct-01 0:03
Tomasz Sowinski26-Oct-01 0:03 
GeneralRe: Setting a window's font Pin
Nish Nishant26-Oct-01 0:09
sitebuilderNish Nishant26-Oct-01 0:09 
GeneralRe: Setting a window's font Pin
Tomasz Sowinski26-Oct-01 0:17
Tomasz Sowinski26-Oct-01 0:17 
GeneralRe: Setting a window's font Pin
Nish Nishant26-Oct-01 0:23
sitebuilderNish Nishant26-Oct-01 0:23 
GeneralRe: Setting a window's font Pin
Tomasz Sowinski26-Oct-01 0:25
Tomasz Sowinski26-Oct-01 0:25 
GeneralRe: Setting a window's font Pin
Nish Nishant26-Oct-01 0:30
sitebuilderNish Nishant26-Oct-01 0:30 
GeneralRe: Setting a window's font Pin
Tomasz Sowinski26-Oct-01 0:40
Tomasz Sowinski26-Oct-01 0:40 

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.