Click here to Skip to main content
15,912,493 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: delete and delete [] what is the difference Pin
Ryan Park23-Feb-01 14:56
Ryan Park23-Feb-01 14:56 
Generalbad arrays .. Pin
Travis D. Mathison22-Feb-01 4:06
Travis D. Mathison22-Feb-01 4:06 
GeneralRe: bad arrays .. Pin
Chris Losinger22-Feb-01 4:49
professionalChris Losinger22-Feb-01 4:49 
GeneralRe: bad arrays .. Pin
l a u r e n22-Feb-01 6:03
l a u r e n22-Feb-01 6:03 
GeneralRe: bad arrays .. Pin
Julien22-Feb-01 15:24
Julien22-Feb-01 15:24 
GeneralRe: bad arrays .. Pin
Travis D. Mathison22-Feb-01 16:27
Travis D. Mathison22-Feb-01 16:27 
QuestionDatabase programming?? Pin
22-Feb-01 3:37
suss22-Feb-01 3:37 
GeneralListBox problem ... Pin
Hadi Rezaee22-Feb-01 0:56
Hadi Rezaee22-Feb-01 0:56 
<<< In the name of GOD >>>
Hi.
I want to get string from Owner-Draw ListBox :

void CHlistbox::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CString string;
CDC *pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
CRect rc = lpDrawItemStruct->rcItem;
UINT action = lpDrawItemStruct->itemAction;
UINT state = lpDrawItemStruct->itemState;
UINT index = lpDrawItemStruct->itemID;
if(action & ODA_DRAWENTIRE)
{
GetText(index,string);
pDC->FillSolidRect(rc,RGB(0,0,0));
pDC->SetTextColor(RGB(100,100,50));
pDC->TextOut(rc.left+1, rc.top+1, string); // PROBLEM IS THERE
}
}

Adding string with ListBox :

void TestDlg::OnOK()
{
m_listbox.AddString("Hadi Rezaie");
}

My other problem is when i added 1 string, i cant adding other string with ListBox.
Please help me ...

Confused | :confused:

Hadi Rezaie
GeneralListCtrl Scrolling Pin
banrio21-Feb-01 23:55
banrio21-Feb-01 23:55 
GeneralResource ID for dynamically created component Pin
nicola21-Feb-01 22:42
nicola21-Feb-01 22:42 
GeneralRe: Resource ID for dynamically created component Pin
l a u r e n22-Feb-01 6:09
l a u r e n22-Feb-01 6:09 
GeneralRe: Resource ID for dynamically created component Pin
Erik Funkenbusch22-Feb-01 12:54
Erik Funkenbusch22-Feb-01 12:54 
QuestionHow to get ip and customer id again!!! Pin
21-Feb-01 21:48
suss21-Feb-01 21:48 
AnswerRe: How to get ip and customer id again!!! Pin
Le Ridder Noir21-Feb-01 22:01
Le Ridder Noir21-Feb-01 22:01 
GeneralDataBase and ATL Pin
ov21-Feb-01 21:42
ov21-Feb-01 21:42 
GeneraliJpeg Image Pin
21-Feb-01 21:38
suss21-Feb-01 21:38 
GeneralRe: iJpeg Image Pin
22-Feb-01 1:46
suss22-Feb-01 1:46 
GeneralHELP! User-defined Msg caused illegal operation at run time Pin
21-Feb-01 19:23
suss21-Feb-01 19:23 
GeneralRe: HELP! User-defined Msg caused illegal operation at run time Pin
Tim Deveaux22-Feb-01 3:45
Tim Deveaux22-Feb-01 3:45 
GeneralWinsock & SOCKS Pin
Amit Jain21-Feb-01 16:28
Amit Jain21-Feb-01 16:28 
QuestionC++ equivalent of C getch()? Pin
21-Feb-01 15:41
suss21-Feb-01 15:41 
AnswerRe: C++ equivalent of C getch()? Pin
Amit Jain21-Feb-01 16:39
Amit Jain21-Feb-01 16:39 
GeneralRe: C++ equivalent of C getch()? Pin
Christian Graus21-Feb-01 17:35
protectorChristian Graus21-Feb-01 17:35 
GeneralRecord Headers in ListBox and retrival Pin
Ariel21-Feb-01 14:21
Ariel21-Feb-01 14:21 
GeneralTrying to Lock some Records in ODBC - CRecordset Pin
Ariel21-Feb-01 14:13
Ariel21-Feb-01 14:13 

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.