Click here to Skip to main content
15,867,834 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Useage about OPCODE collision detection Pin
Henry Hong3-Jun-13 15:55
Henry Hong3-Jun-13 15:55 
GeneralRe: Useage about OPCODE collision detection Pin
Richard MacCutchan3-Jun-13 20:52
mveRichard MacCutchan3-Jun-13 20:52 
GeneralRe: Useage about OPCODE collision detection Pin
Henry Hong3-Jun-13 22:15
Henry Hong3-Jun-13 22:15 
GeneralRe: Useage about OPCODE collision detection Pin
Richard MacCutchan3-Jun-13 22:22
mveRichard MacCutchan3-Jun-13 22:22 
GeneralRe: Useage about OPCODE collision detection Pin
Henry Hong3-Jun-13 22:35
Henry Hong3-Jun-13 22:35 
AnswerRe: Useage about OPCODE collision detection Pin
Chris Losinger4-Jun-13 4:05
professionalChris Losinger4-Jun-13 4:05 
QuestionHow to conditional call a library Pin
thanh_bkhn2-Jun-13 19:00
professionalthanh_bkhn2-Jun-13 19:00 
AnswerRe: How to conditional call a library Pin
«_Superman_»2-Jun-13 20:35
professional«_Superman_»2-Jun-13 20:35 
Create function pointers in a header file for all the magnification APIs that you're going to use.
Check the OS version and if Vista or above, call LoadLibrary on Magnification.dll.
After this call GetProcAddress on the function to initialize the function pointer.

So the header file could look like this -
typedef BOOL (*PFN_MAG_INITIALIZE)(void);

From the main program, you could have a call to some function called InitMagnification.

In the InitMagnification function, do the dynamic loading after checking the OS version.
PFN_MAG_INITIALIZE MagInitialize = NULL;

if (osVersion >= "VISTA")   // Consider this as pseudo-code
{
    HMODULE hmod = LoadLibrary(_T("Magnification.dll"));

    MagInitialize = GetProcAddress(hmod, "MagInitialize");
}

In the source where this function is called, do the checking as follows -
if (MagInitialize)
{
    MagInitalize();
}

I have omitted error checking, which you have to do.
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++) (October 2009 - September 2013)

Polymorphism in C

GeneralRe: How to conditional call a library Pin
thanh_bkhn3-Jun-13 16:05
professionalthanh_bkhn3-Jun-13 16:05 
AnswerRe: How to conditional call a library Pin
David Crow3-Jun-13 2:54
David Crow3-Jun-13 2:54 
GeneralRe: How to conditional call a library Pin
thanh_bkhn3-Jun-13 16:06
professionalthanh_bkhn3-Jun-13 16:06 
AnswerRe: How to conditional call a library Pin
chaau3-Jun-13 18:28
chaau3-Jun-13 18:28 
GeneralRe: How to conditional call a library Pin
thanh_bkhn3-Jun-13 20:32
professionalthanh_bkhn3-Jun-13 20:32 
QuestionHow to mute soundin a audio / video file using directshow mfc.? Pin
mbatra311-Jun-13 1:16
mbatra311-Jun-13 1:16 
QuestionRe: How to mute soundin a audio / video file using directshow mfc.? Pin
David Crow1-Jun-13 7:20
David Crow1-Jun-13 7:20 
AnswerRe: How to mute soundin a audio / video file using directshow mfc.? Pin
mbatra312-Jun-13 18:56
mbatra312-Jun-13 18:56 
AnswerRe: How to mute soundin a audio / video file using directshow mfc.? Pin
David Crow3-Jun-13 2:52
David Crow3-Jun-13 2:52 
QuestionHow to disable a property page in a property sheet in mfc.? Pin
mbatra3131-May-13 23:11
mbatra3131-May-13 23:11 
AnswerRe: How to disable a property page in a property sheet in mfc.? Pin
jeron11-Jun-13 6:33
jeron11-Jun-13 6:33 
AnswerRe: How to disable a property page in a property sheet in mfc.? Pin
David Crow1-Jun-13 7:20
David Crow1-Jun-13 7:20 
QuestionC++ and Arduino interfacing Pin
nonness31-May-13 23:02
nonness31-May-13 23:02 
QuestionRe: C++ and Arduino interfacing Pin
David Crow1-Jun-13 7:19
David Crow1-Jun-13 7:19 
AnswerRe: C++ and Arduino interfacing Pin
nonness3-Jun-13 10:03
nonness3-Jun-13 10:03 
QuestionRe: C++ and Arduino interfacing Pin
CPallini2-Jun-13 11:00
mveCPallini2-Jun-13 11:00 
AnswerRe: C++ and Arduino interfacing Pin
nonness3-Jun-13 10:04
nonness3-Jun-13 10:04 

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.