Click here to Skip to main content
15,891,253 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionCAxWindow Pin
Anthony98875-Apr-06 9:07
Anthony98875-Apr-06 9:07 
AnswerRe: CAxWindow Pin
Michael Dunn5-Apr-06 13:36
sitebuilderMichael Dunn5-Apr-06 13:36 
GeneralRe: CAxWindow Pin
Anthony98876-Apr-06 4:44
Anthony98876-Apr-06 4:44 
GeneralRe: CAxWindow Pin
Stuart Dootson7-Apr-06 23:06
professionalStuart Dootson7-Apr-06 23:06 
Questionhow can I use control ?which book I shoud see? Pin
heboy3-Apr-06 17:37
heboy3-Apr-06 17:37 
AnswerRe: how can I use control ?which book I shoud see? Pin
Michael Dunn4-Apr-06 11:46
sitebuilderMichael Dunn4-Apr-06 11:46 
GeneralRe: how can I use control ?which book I shoud see? Pin
heboy4-Apr-06 15:45
heboy4-Apr-06 15:45 
QuestionHow can i sort the elements of the CListCtrl by clicking the Column Heading Pin
Jitendra Shri3-Apr-06 17:24
Jitendra Shri3-Apr-06 17:24 
Hi all,
I am using ATL COM application, in which i am having a list control, i want that by clicking the particular column the elements of that column sorted out how can i do it ...Plz help me out

I write one callback function for sorting and i called that function in the OnColumnClickListname handler i share my code

LRESULT OnColumnclickList1(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)

{
// My code started here
m_ctrllist.Attach(GetDlgItem(IDC_LIST1));
HD_NOTIFY *phdn = (HD_NOTIFY *) pnmh;
m_ctrllist.SortItems(SortFunc, phdn->iItem);
m_ctrllist.Detach();

//My code ends here

return 0;
}



static int CALLBACK SortFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{

int nRetVal;

PITEMDATA pData1 = (PITEMDATA)lParam1;
PITEMDATA pData2 = (PITEMDATA)lParam2;


switch(lParamSort)
{
case 0:
nRetVal = strcmp(pData1->empcode,
pData2->empcode);
break;

case 1:
nRetVal = strcmp(pData1->empname,
pData2->empname);
break;

case 2:
nRetVal = strcmp(pData1->designation, pData2->designation);
break;


default:
break;
}

return nRetVal;
}


AnswerRe: How can i sort the elements of the CListCtrl by clicking the Column Heading Pin
Igor Vigdorchik4-Apr-06 7:24
Igor Vigdorchik4-Apr-06 7:24 
QuestionBase64Encode Pin
gyzmau3-Apr-06 4:04
gyzmau3-Apr-06 4:04 
AnswerRe: Base64Encode Pin
SilentSilent5-Apr-06 0:16
SilentSilent5-Apr-06 0:16 
QuestionHow can i sort list in the ATL application Pin
Jitendra Shri31-Mar-06 3:09
Jitendra Shri31-Mar-06 3:09 
AnswerRe: How can i sort list in the ATL application Pin
Milton Karimbekallil1-Apr-06 3:01
Milton Karimbekallil1-Apr-06 3:01 
AnswerRe: How can i sort list in the ATL application Pin
Igor Vigdorchik2-Apr-06 10:26
Igor Vigdorchik2-Apr-06 10:26 
Questionhow to declare a method with out parameter Pin
baldha rakesh30-Mar-06 23:26
baldha rakesh30-Mar-06 23:26 
AnswerRe: how to declare a method with out parameter Pin
Stephen Hewitt30-Mar-06 23:39
Stephen Hewitt30-Mar-06 23:39 
GeneralRe: how to declare a method with out parameter Pin
baldha rakesh31-Mar-06 1:58
baldha rakesh31-Mar-06 1:58 
QuestionLate binding on ATL COM dll Pin
HakunaMatada29-Mar-06 22:04
HakunaMatada29-Mar-06 22:04 
AnswerRe: Late binding on ATL COM dll Pin
Stuart Dootson29-Mar-06 22:35
professionalStuart Dootson29-Mar-06 22:35 
GeneralRe: Late binding on ATL COM dll Pin
HakunaMatada29-Mar-06 22:44
HakunaMatada29-Mar-06 22:44 
GeneralRe: Late binding on ATL COM dll Pin
Stuart Dootson30-Mar-06 0:01
professionalStuart Dootson30-Mar-06 0:01 
GeneralRe: Late binding on ATL COM dll Pin
Jörgen Sigvardsson30-Mar-06 8:56
Jörgen Sigvardsson30-Mar-06 8:56 
GeneralRe: Late binding on ATL COM dll Pin
HakunaMatada30-Mar-06 17:17
HakunaMatada30-Mar-06 17:17 
GeneralRe: Late binding on ATL COM dll Pin
Stephen Hewitt30-Mar-06 17:57
Stephen Hewitt30-Mar-06 17:57 
GeneralRe: Late binding on ATL COM dll Pin
Jörgen Sigvardsson30-Mar-06 20:13
Jörgen Sigvardsson30-Mar-06 20: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.