Click here to Skip to main content
15,898,893 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Process hook?? Pin
ThatsAlok22-Dec-04 22:07
ThatsAlok22-Dec-04 22:07 
Generalproblem with Oleacc Pin
spsharma22-Dec-04 16:02
spsharma22-Dec-04 16:02 
GeneralRe: problem with Oleacc Pin
John R. Shaw22-Dec-04 16:18
John R. Shaw22-Dec-04 16:18 
GeneralRe: problem with Oleacc Pin
spsharma22-Dec-04 16:33
spsharma22-Dec-04 16:33 
Questioncan i got the item index from the item lparam? Pin
lowiq22-Dec-04 13:39
lowiq22-Dec-04 13:39 
AnswerRe: can i got the item index from the item lparam? Pin
Michael Dunn22-Dec-04 17:30
sitebuilderMichael Dunn22-Dec-04 17:30 
GeneralRe: can i got the item index from the item lparam? Pin
lowiq22-Dec-04 20:58
lowiq22-Dec-04 20:58 
AnswerRe: can i got the item index from the item lparam? Pin
David Crow23-Dec-04 3:52
David Crow23-Dec-04 3:52 
Are you calling the list control's SortItems() method? If so, the callback function will receive two LPARAM variables, lParam1 and lParam2. Those are pointers and need to be cast to the same type of object that was used with SetItemData(). For example:

struct myStruct
{
    int i;
    char name[32];
};
...
int nIndex = InsertItem(...);
myStruct *p = new myStruct;
SetItemData(nIndex, (DWORD) p);
...
SortItems(CompareFunc, 0);
...
int CALLBACK CompareFunc( LPARAM lParam1, LPARAM lParam2, LPARAM )
{
    int      nReturn = 0;
    myStruct *p1,
             *p2;
     
    p1 = (myStruct*) lParam1;
    p2 = (myStruct*) lParam2;
    // now compare the members of p1 and p2
    ...
}
Make sense?


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


Generalsend key to window Pin
Spiritofamerica22-Dec-04 11:49
Spiritofamerica22-Dec-04 11:49 
GeneralRe: send key to window Pin
Antti Keskinen22-Dec-04 12:29
Antti Keskinen22-Dec-04 12:29 
GeneralConverting 2s complement to signed int Pin
Wheatbread22-Dec-04 10:39
Wheatbread22-Dec-04 10:39 
GeneralRe: Converting 2s complement to signed int Pin
Tim Smith22-Dec-04 11:09
Tim Smith22-Dec-04 11:09 
GeneralAnyone know of a pluggin... Pin
Ian Bowler22-Dec-04 9:47
Ian Bowler22-Dec-04 9:47 
GeneralRe: Anyone know of a pluggin... Pin
RChin22-Dec-04 23:18
RChin22-Dec-04 23:18 
GeneralTesting Client socket is alive Pin
kalicharan22-Dec-04 8:39
kalicharan22-Dec-04 8:39 
GeneralRe: Testing Client socket is alive Pin
Henry miller22-Dec-04 9:58
Henry miller22-Dec-04 9:58 
Generalfixup error Pin
nainakhawaja22-Dec-04 8:37
nainakhawaja22-Dec-04 8:37 
GeneralRe: fixup error Pin
David Crow22-Dec-04 9:10
David Crow22-Dec-04 9:10 
GeneralDragging rectangle Pin
Anonymous22-Dec-04 8:19
Anonymous22-Dec-04 8:19 
GeneralRe: Dragging rectangle Pin
David Crow22-Dec-04 9:03
David Crow22-Dec-04 9:03 
GeneralRe: Dragging rectangle Pin
Anonymous22-Dec-04 11:45
Anonymous22-Dec-04 11:45 
GeneralRe: Dragging rectangle Pin
John R. Shaw22-Dec-04 16:05
John R. Shaw22-Dec-04 16:05 
GeneralVC6 function template problems Pin
peterchen22-Dec-04 7:47
peterchen22-Dec-04 7:47 
GeneralRe: VC6 function template problems Pin
Antti Keskinen22-Dec-04 13:04
Antti Keskinen22-Dec-04 13:04 
GeneralRe: VC6 function template problems Pin
peterchen22-Dec-04 19:53
peterchen22-Dec-04 19:53 

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.