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

C / C++ / MFC

 
Questionsend scsi command to usb device using DeviceIoControl method Pin
Anil Veeraghattapu 420-Jul-09 23:11
Anil Veeraghattapu 420-Jul-09 23:11 
AnswerRe: send scsi command to usb device using DeviceIoControl method Pin
Randor 21-Jul-09 0:29
professional Randor 21-Jul-09 0:29 
QuestionHow to auto generate the registry key value in MFC Pin
DevelopmentNoob20-Jul-09 20:31
DevelopmentNoob20-Jul-09 20:31 
AnswerRe: How to auto generate the registry key value in MFC Pin
«_Superman_»20-Jul-09 20:37
professional«_Superman_»20-Jul-09 20:37 
AnswerRe: How to auto generate the registry key value in MFC Pin
Adam Roderick J20-Jul-09 21:09
Adam Roderick J20-Jul-09 21:09 
QuestionCallback to a Non static Member function in C++ need to be called from a DLL Pin
San20-Jul-09 19:53
San20-Jul-09 19:53 
AnswerRe: Callback to a Non static Member function in C++ need to be called from a DLL Pin
«_Superman_»20-Jul-09 20:31
professional«_Superman_»20-Jul-09 20:31 
AnswerRe: Callback to a Non static Member function in C++ need to be called from a DLL Pin
Rick York21-Jul-09 6:54
mveRick York21-Jul-09 6:54 
One way is to do this is like many callback procedures do - they pass along a user specified argument as a void pointer (PVOID). You can pass a pointer to one of your objects as the argument and use a static member of the same class for the callback procedure. Then in the callback procedure cast the void pointer to a pointer to your object and call your member method. As an example, your callback procedure could look something like this :

class YourClass
{
static int CompareCallback( ctchar * item1, ctchar * item2, void *ptr )
{
    if( ! ptr )
        return 0;
    YourClass * pObject = (YourClass *)ptr;
    return pObject->Compare( item1, item2 );
}
};


BTW : you can use this technique in a wide variety of callback scenarios like for thread procedures or window enumeration procedures or ...
QuestionHow Do I Change StillCap Resolution Pin
Tom Hubin20-Jul-09 19:49
Tom Hubin20-Jul-09 19:49 
QuestionFont Pin
kumar sanghvi20-Jul-09 17:40
kumar sanghvi20-Jul-09 17:40 
QuestionRe: Font Pin
Randor 20-Jul-09 18:00
professional Randor 20-Jul-09 18:00 
Questionfile share problem Pin
york52820-Jul-09 16:55
york52820-Jul-09 16:55 
QuestionRe: file share problem Pin
«_Superman_»20-Jul-09 18:10
professional«_Superman_»20-Jul-09 18:10 
AnswerRe: file share problem Pin
york52820-Jul-09 18:41
york52820-Jul-09 18:41 
GeneralRe: file share problem Pin
«_Superman_»20-Jul-09 18:44
professional«_Superman_»20-Jul-09 18:44 
GeneralRe: file share problem Pin
york52820-Jul-09 18:54
york52820-Jul-09 18:54 
GeneralRe: file share problem Pin
«_Superman_»20-Jul-09 19:48
professional«_Superman_»20-Jul-09 19:48 
GeneralRe: file share problem Pin
york52820-Jul-09 22:03
york52820-Jul-09 22:03 
AnswerRe: file share problem Pin
Randor 20-Jul-09 18:43
professional Randor 20-Jul-09 18:43 
GeneralRe: file share problem Pin
york52820-Jul-09 18:59
york52820-Jul-09 18:59 
GeneralRe: file share problem Pin
Randor 20-Jul-09 19:17
professional Randor 20-Jul-09 19:17 
GeneralRe: file share problem Pin
york52820-Jul-09 19:43
york52820-Jul-09 19:43 
GeneralRe: file share problem Pin
Stuart Dootson20-Jul-09 23:30
professionalStuart Dootson20-Jul-09 23:30 
GeneralRe: file share problem Pin
SelvaKr20-Jul-09 20:25
SelvaKr20-Jul-09 20:25 
GeneralRe: file share problem Pin
york52820-Jul-09 22:16
york52820-Jul-09 22:16 

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.