Click here to Skip to main content
15,896,118 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 15:16
fitatc25-Jan-09 15:16 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
«_Superman_»25-Jan-09 16:20
professional«_Superman_»25-Jan-09 16:20 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
Joshua Tully25-Jan-09 16:31
Joshua Tully25-Jan-09 16:31 
GeneralRe: Is "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 21:17
fitatc25-Jan-09 21:17 
QuestionNeed help to create GUI application form in C++ and create instalation program for it. Pin
hdavari25-Jan-09 3:11
hdavari25-Jan-09 3:11 
AnswerRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
Maximilien25-Jan-09 4:01
Maximilien25-Jan-09 4:01 
QuestionRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
David Crow26-Jan-09 3:00
David Crow26-Jan-09 3:00 
QuestionItems are not visible in a ListBox [modified] Pin
Elsie25-Jan-09 1:45
Elsie25-Jan-09 1:45 
In ListBox i'm using it to display the Strings,
After adding it to resource it's property is set as ownerdraw fixed and Single selection
When i create an object of it, as CCheckListBox the items are being displayed,
but when i create an object of CListbox/CNewListBox(Which is derived from CListBox) the items are not visible.
I overriden the DrawItem in CNewListBox, i suspect there must be some problem with the overriden function.
But the irony is when i use the same class in a small application it is working perfect, but in my main application the listbox items are not at all visible.
void CNewListBox::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
if (lpDrawItemStruct->itemID == (UINT)-1)
{
// Draws item text
int h = lpDrawItemStruct->rcItem.bottom - lpDrawItemStruct->rcItem.top;
pDC->SetBkMode(TRANSPARENT);
lpDrawItemStruct->rcItem.left += h;
int i= pDC->DrawText((LPCTSTR)lpDrawItemStruct->itemData, &lpDrawItemStruct->rcItem, DT_LEFT);
}
}
What's the wrong/ or missing?

Would Appreciate any help

modified on Sunday, January 25, 2009 11:40 PM

AnswerRe: Items are not visible in a ListBox Pin
Hans Dietrich25-Jan-09 6:25
mentorHans Dietrich25-Jan-09 6:25 
GeneralRe: Items are not visible in a ListBox Pin
Elsie25-Jan-09 17:40
Elsie25-Jan-09 17:40 
QuestionHow to get message when tab is changed in one MDI multiple tab application Pin
fujoey24-Jan-09 22:52
fujoey24-Jan-09 22:52 
QuestionUnable to move slider position using mouse [modified] Pin
John50224-Jan-09 12:29
John50224-Jan-09 12:29 
AnswerRe: Unable to move slider position using mouse Pin
David Crow24-Jan-09 14:08
David Crow24-Jan-09 14:08 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50225-Jan-09 0:42
John50225-Jan-09 0:42 
AnswerRe: Unable to move slider position using mouse Pin
Mark Salsbery25-Jan-09 7:37
Mark Salsbery25-Jan-09 7:37 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50225-Jan-09 18:58
John50225-Jan-09 18:58 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery25-Jan-09 20:30
Mark Salsbery25-Jan-09 20:30 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 4:30
John50226-Jan-09 4:30 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 5:50
Mark Salsbery26-Jan-09 5:50 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 6:05
John50226-Jan-09 6:05 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 6:23
Mark Salsbery26-Jan-09 6:23 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 6:43
John50226-Jan-09 6:43 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 6:46
Mark Salsbery26-Jan-09 6:46 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50226-Jan-09 7:17
John50226-Jan-09 7:17 
GeneralRe: Unable to move slider position using mouse Pin
Mark Salsbery26-Jan-09 7:26
Mark Salsbery26-Jan-09 7:26 

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.