Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Resizing controls as per screen resolution Pin
Cedric Moonen8-Feb-11 20:08
Cedric Moonen8-Feb-11 20:08 
QuestionSortItems function of CListCtrl giving a error Pin
VCProgrammer7-Feb-11 22:26
VCProgrammer7-Feb-11 22:26 
AnswerRe: SortItems function of CListCtrl giving a error Pin
CPallini7-Feb-11 22:41
mveCPallini7-Feb-11 22:41 
GeneralRe: SortItems function of CListCtrl giving a error Pin
VCProgrammer8-Feb-11 0:11
VCProgrammer8-Feb-11 0:11 
GeneralRe: SortItems function of CListCtrl giving a error Pin
CPallini8-Feb-11 0:12
mveCPallini8-Feb-11 0:12 
GeneralRe: SortItems function of CListCtrl giving a error Pin
VCProgrammer8-Feb-11 0:22
VCProgrammer8-Feb-11 0:22 
GeneralRe: SortItems function of CListCtrl giving a error Pin
CPallini8-Feb-11 0:33
mveCPallini8-Feb-11 0:33 
AnswerRe: SortItems function of CListCtrl giving a error Pin
David Crow8-Feb-11 4:27
David Crow8-Feb-11 4:27 
Should be:

m_List.InsertColumn(0,"Name",100,100); // 100 is not a valid alignment
m_List.InsertColumn(1,"Number",100,100);
  
int x = m_List.InsertItem(0,"Item1");
m_List.SetItemText(x,1,"2");
  
x = m_List.InsertItem(1,"Item2");
m_List.SetItemText(x,1,"3");
  
x = m_List.InsertItem(2,"Item3");
m_List.SetItemText(x,1,"1");
  
int CALLBACK MyCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{	
    UNREFERENCED_PARAMETER(lParamSort);	
    return (int)(lParam1 - lParam2); // this will be meaningless unless you call SetItemData()
}
  
void CItemDlg::OnBnClickedButton1()
{	
    m_List.SortItems(MyCompareProc, 0);
}

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


AnswerRe: SortItems function of CListCtrl giving a error Pin
Rolf Kristensen8-Feb-11 9:12
Rolf Kristensen8-Feb-11 9:12 
QuestionViewing fits image in visual c++ Pin
keval5p7-Feb-11 19:39
keval5p7-Feb-11 19:39 
AnswerRe: Viewing fits image in visual c++ Pin
Andrew Brock7-Feb-11 20:14
Andrew Brock7-Feb-11 20:14 
QuestionDesktop rect Pin
includeh107-Feb-11 7:08
includeh107-Feb-11 7:08 
AnswerRe: Desktop rect Pin
Hans Dietrich7-Feb-11 7:27
mentorHans Dietrich7-Feb-11 7:27 
AnswerRe: Desktop rect Pin
loyal ginger8-Feb-11 2:55
loyal ginger8-Feb-11 2:55 
QuestionNon-Templatized methods in Template Class? Pin
bob169727-Feb-11 4:28
bob169727-Feb-11 4:28 
AnswerRe: Non-Templatized methods in Template Class? Pin
Stefan_Lang7-Feb-11 7:07
Stefan_Lang7-Feb-11 7:07 
AnswerRe: Non-Templatized methods in Template Class? Pin
Stefan_Lang7-Feb-11 22:00
Stefan_Lang7-Feb-11 22:00 
GeneralRe: Non-Templatized methods in Template Class? Pin
bob169728-Feb-11 4:46
bob169728-Feb-11 4:46 
GeneralRe: Non-Templatized methods in Template Class? Pin
Stefan_Lang8-Feb-11 5:09
Stefan_Lang8-Feb-11 5:09 
AnswerRe: Non-Templatized methods in Template Class? Pin
CPallini7-Feb-11 22:13
mveCPallini7-Feb-11 22:13 
GeneralRe: Non-Templatized methods in Template Class? Pin
bob169728-Feb-11 4:42
bob169728-Feb-11 4:42 
QuestionC++ - how to refer a header file which is used in a dll while loading thru loadlibrary method Pin
DavJes7-Feb-11 1:47
DavJes7-Feb-11 1:47 
AnswerRe: C++ - how to refer a header file which is used in a dll while loading thru loadlibrary method Pin
Hans Dietrich7-Feb-11 2:07
mentorHans Dietrich7-Feb-11 2:07 
AnswerRe: C++ - how to refer a header file which is used in a dll while loading thru loadlibrary method Pin
CPallini7-Feb-11 3:00
mveCPallini7-Feb-11 3:00 
AnswerRe: C++ - how to refer a header file which is used in a dll while loading thru loadlibrary method Pin
Stefan_Lang8-Feb-11 1:36
Stefan_Lang8-Feb-11 1:36 

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.