Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Check File is Saved ? Pin
Maximilien9-Aug-07 3:36
Maximilien9-Aug-07 3:36 
AnswerRe: How to Check File is Saved ? Pin
Iain Clarke, Warrior Programmer9-Aug-07 5:40
Iain Clarke, Warrior Programmer9-Aug-07 5:40 
QuestionTest registered dll Pin
tuxyboy9-Aug-07 2:53
tuxyboy9-Aug-07 2:53 
AnswerRe: Test registered dll Pin
David Crow9-Aug-07 3:02
David Crow9-Aug-07 3:02 
GeneralRe: Test registered dll Pin
tuxyboy9-Aug-07 3:18
tuxyboy9-Aug-07 3:18 
GeneralRe: Test registered dll Pin
DevMentor.org9-Aug-07 7:26
DevMentor.org9-Aug-07 7:26 
QuestionPrint option for NTGraph3D Pin
wajape9-Aug-07 1:57
wajape9-Aug-07 1:57 
QuestionCan I declare a control based on OS version in .h file? Pin
Joe Smith IX9-Aug-07 1:38
Joe Smith IX9-Aug-07 1:38 
Hi all,

I wonder if this doable. I have 2 CButton-derived classes (I don't have the source code for any of them): CButton1 and CButton2. Now I want to use CButton1 for XP or later, and use CButton2 for Win2k or older.

Since controls are declared in the .h file, how do we differentiate the OS version (if feasible). I want to achieve the following (pseudo-code):

class CMyDlg : public CDialog
{
...
   // Dialog Data
   //{{AFX_DATA(CLoginDlg)
   enum { IDD = IDD_MYDLG };
 
   if(RunningWindowsVersion>=XP)
     CButton1 m_btn1;
   else
     CButton2 m_btn1;

   ...
   //}}AFX_DATA
   ...
}


If I can do this, I don't have to compile 2 versions of my program. I would appreciate it if anyone has any pointer on this matter. Thanks.
AnswerRe: Can I declare a control based on OS version in .h file? Pin
toxcct9-Aug-07 1:53
toxcct9-Aug-07 1:53 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
Joe Smith IX9-Aug-07 2:11
Joe Smith IX9-Aug-07 2:11 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
toxcct9-Aug-07 2:18
toxcct9-Aug-07 2:18 
AnswerRe: Can I declare a control based on OS version in .h file? Pin
khb9-Aug-07 1:54
khb9-Aug-07 1:54 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
Joe Smith IX9-Aug-07 1:59
Joe Smith IX9-Aug-07 1:59 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
khb9-Aug-07 2:04
khb9-Aug-07 2:04 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
sps-itsec469-Aug-07 2:56
sps-itsec469-Aug-07 2:56 
QuestionRe: Can I declare a control based on OS version in .h file? Pin
David Crow9-Aug-07 2:55
David Crow9-Aug-07 2:55 
AnswerRe: Can I declare a control based on OS version in .h file? Pin
toxcct9-Aug-07 3:00
toxcct9-Aug-07 3:00 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
David Crow9-Aug-07 3:03
David Crow9-Aug-07 3:03 
AnswerRe: Can I declare a control based on OS version in .h file? Pin
sps-itsec469-Aug-07 3:00
sps-itsec469-Aug-07 3:00 
GeneralRe: Can I declare a control based on OS version in .h file? Pin
David Crow9-Aug-07 3:03
David Crow9-Aug-07 3:03 
QuestionAddstring function Pin
tyagineha9-Aug-07 0:40
tyagineha9-Aug-07 0:40 
AnswerRe: Addstring function Pin
khb9-Aug-07 0:49
khb9-Aug-07 0:49 
GeneralRe: Addstring function Pin
tyagineha9-Aug-07 0:53
tyagineha9-Aug-07 0:53 
AnswerRe: Addstring function Pin
khb9-Aug-07 0:57
khb9-Aug-07 0:57 
GeneralRe: Addstring function Pin
jhwurmbach9-Aug-07 1:07
jhwurmbach9-Aug-07 1:07 

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.