Click here to Skip to main content
16,005,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert unsigned char to const char in vc++ Pin
nehathoma17-Apr-05 22:55
nehathoma17-Apr-05 22:55 
GeneralRe: convert unsigned char to const char in vc++ Pin
22491717-Apr-05 23:00
22491717-Apr-05 23:00 
GeneralWinHttp- WinHttpSendRequest fails Pin
naeemrbhatti17-Apr-05 19:01
naeemrbhatti17-Apr-05 19:01 
GeneralListCtrl items not displayed Pin
laiju17-Apr-05 18:06
laiju17-Apr-05 18:06 
GeneralRe: ListCtrl items not displayed Pin
ThatsAlok17-Apr-05 18:33
ThatsAlok17-Apr-05 18:33 
GeneralRe: ListCtrl items not displayed Pin
Michael Dunn17-Apr-05 19:00
sitebuilderMichael Dunn17-Apr-05 19:00 
GeneralRe: ListCtrl items not displayed Pin
laiju17-Apr-05 19:19
laiju17-Apr-05 19:19 
GeneralRe: ListCtrl items not displayed Pin
laiju17-Apr-05 19:38
laiju17-Apr-05 19:38 
i dont need a column header since i dont want multiple columns.
I just want to display all the list items in a report style.
Thats the reason i set NoColumnHeader to TRUE.
But even after setting NoColumnHeader to FALSE ,the list items arent visible.I guess they are not added because when i try to fetch the total count it says zero.
But my code works fine if the view property is set to ' list ' .
I have attached my code .Pls..verify if possible.

void CFontPage::OnFontSelection() // fills the list box with unique font types
{
bool bNewEntry;
int iIndex;
int iListItems;
int iResult;
TCHAR cFont[MAX_LIST_CHARS];
TCHAR cListFont[MAX_LIST_CHARS];
CString sFont;
LVITEM lvItem;

bNewEntry = TRUE;
iIndex = m_FontType.GetCurSel();
m_FontType.GetLBText(iIndex,cFont);

iListItems = m_FontList.GetItemCount();
for (iIndex = 0; iIndex < iListItems; iIndex++)
{
m_FontList.GetItemText(iIndex,NULL,cListFont,sizeof(cListFont));
iResult = strcmp(cListFont,cFont);
if (0 == iResult) //matching font .Font already available in list
{
bNewEntry = FALSE;
}
memset(cListFont,'\0',sizeof(cListFont));
}
if (TRUE == bNewEntry)
{
iListItems++;
lvItem.mask = LVIF_TEXT|LVIF_STATE;
lvItem.state = LVIS_SELECTED;
lvItem.stateMask = NULL ;
lvItem.iItem = iListItems;
lvItem.pszText = cFont;
lvItem.iSubItem = NULL;

m_FontList.SetItem(&lvItem);
m_FontList.InsertItem(&lvItem);
}

SetModified(TRUE);
}

void CFontPage::OnClickedRemove() // deletes currently selected list items
{
int iIndex;
LVITEM lvItem;
iIndex = m_FontList.GetSelectionMark(); // retrieves current selected list item
m_FontList.DeleteItem(iIndex);
}


laiju
GeneralRe: ListCtrl items not displayed Pin
David Crow18-Apr-05 3:01
David Crow18-Apr-05 3:01 
Generalurgent-need some functions help Pin
smarty1217-Apr-05 17:56
smarty1217-Apr-05 17:56 
GeneralRe: urgent-need some functions help Pin
Christian Graus17-Apr-05 18:10
protectorChristian Graus17-Apr-05 18:10 
GeneralRe: urgent-need some functions help Pin
ThatsAlok17-Apr-05 18:26
ThatsAlok17-Apr-05 18:26 
GeneralNeed help for LRESULT CALLBACK Pin
Francis Chau17-Apr-05 17:42
Francis Chau17-Apr-05 17:42 
GeneralRe: Need help for LRESULT CALLBACK Pin
Christian Graus17-Apr-05 18:09
protectorChristian Graus17-Apr-05 18:09 
Generalneed help !!!! urgent !!!! Please !!!!! Pin
khyap17-Apr-05 16:58
khyap17-Apr-05 16:58 
GeneralRe: need help !!!! urgent !!!! Please !!!!! Pin
Christian Graus17-Apr-05 17:42
protectorChristian Graus17-Apr-05 17:42 
GeneralRe: need help !!!! urgent !!!! Please !!!!! Pin
El Corazon17-Apr-05 17:45
El Corazon17-Apr-05 17:45 
GeneralRecording from microphone Pin
ytvsoftware17-Apr-05 14:52
ytvsoftware17-Apr-05 14:52 
GeneralClosing consoles running apps Pin
GraemeS17-Apr-05 6:33
GraemeS17-Apr-05 6:33 
GeneralRe: Closing consoles running apps Pin
ng kok chuan17-Apr-05 14:58
ng kok chuan17-Apr-05 14:58 
GeneralRe: Closing consoles running apps Pin
GraemeS18-Apr-05 3:57
GraemeS18-Apr-05 3:57 
GeneralTwo's complement problem Pin
eli1502197917-Apr-05 2:18
eli1502197917-Apr-05 2:18 
GeneralRe: Two's complement problem Pin
John M. Drescher17-Apr-05 4:17
John M. Drescher17-Apr-05 4:17 
GeneralRe: Two's complement problem Pin
eli1502197917-Apr-05 4:23
eli1502197917-Apr-05 4:23 
GeneralRe: Two's complement problem Pin
John M. Drescher17-Apr-05 5:30
John M. Drescher17-Apr-05 5:30 

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.