Click here to Skip to main content
15,904,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFormView Background Pin
HPSI31-Jul-03 19:53
HPSI31-Jul-03 19:53 
GeneralRe: CFormView Background Pin
Vitali Halershtein31-Jul-03 21:25
Vitali Halershtein31-Jul-03 21:25 
GeneralJTC.h Pin
hkl31-Jul-03 14:11
hkl31-Jul-03 14:11 
Generaldisable/enable toolbar buttons in a dialog Pin
Marissa18231-Jul-03 13:34
Marissa18231-Jul-03 13:34 
GeneralRe: disable/enable toolbar buttons in a dialog Pin
Alexander M.,31-Jul-03 13:46
Alexander M.,31-Jul-03 13:46 
GeneralRe: disable/enable toolbar buttons in a dialog Pin
Marissa18231-Jul-03 14:27
Marissa18231-Jul-03 14:27 
GeneralRe: disable/enable toolbar buttons in a dialog Pin
Marissa18231-Jul-03 15:10
Marissa18231-Jul-03 15:10 
GeneralRe: disable/enable toolbar buttons in a dialog Pin
tmangan1-Aug-03 2:00
tmangan1-Aug-03 2:00 
1) If you have a mapped variable for the dialog item:
1A) If it is a static item created with the visual editor:
itemmappedvariable.EnableWindow(BOOL);
1B) If it is a dynamic item created on the fly:
itemmappedvariable->EnableWindow(BOOL);
where BOOL is TRUE or FALSE. Setting to FALSE makes the item greyed out and not selectable by the user, which is what most people mean by disabled.

2) If you want the dialog item to completely disapear, you use:
2A) itemmappedvariable.ShowWindow(var);
2B) itemmappedvariable->ShowWindow(var);
where var=SW_SHOW to make it visible
var=SW_HIDE to make it disapear.

If you don't know what a mapped variable is, either:
1) Ggo to the item in the dialog editor. Click on the dialog item, Right click, select create variable. Fill in the name, hit OK. This makes all the coding changes so that you can use the A syntax above. If you search your dialog .h and .cpp you can see the simple changes and do others by hand. Pay attention to the lack of trailing semicolons if you do.
2) You can also use GetDlgItem(IDC_WHATEVER)->EnableWindow(BOOL) or GetDlgItem(IDC_whatever)->ShowWindow(var). Less efficient this way if you do it a lot.

Good luck!

tim
Founder, TMurgent Technologies
www.tmurgent.com
tmangan@tmurgent.com
GeneralSending "hello world" through com port to other pc. Pin
IrishSonic31-Jul-03 13:19
IrishSonic31-Jul-03 13:19 
GeneralRe: Sending "hello world" through com port to other pc. Pin
Alexander M.,31-Jul-03 13:43
Alexander M.,31-Jul-03 13:43 
GeneralUpdating an Edit control within a loop Pin
tdmcclure025631-Jul-03 13:15
tdmcclure025631-Jul-03 13:15 
GeneralRe: Updating an Edit control within a loop Pin
Mike Dimmick31-Jul-03 13:19
Mike Dimmick31-Jul-03 13:19 
GeneralRe: Updating an Edit control within a loop Pin
DougW4831-Jul-03 17:43
DougW4831-Jul-03 17:43 
QuestionWindows start time? Pin
JSH_CAN31-Jul-03 13:08
sussJSH_CAN31-Jul-03 13:08 
AnswerRe: Windows start time? Pin
Alexander M.,31-Jul-03 13:48
Alexander M.,31-Jul-03 13:48 
GeneralRe: Windows start time? Pin
JHS_CAN31-Jul-03 14:30
sussJHS_CAN31-Jul-03 14:30 
GeneralRe: Windows start time? Pin
Mike Dimmick31-Jul-03 23:59
Mike Dimmick31-Jul-03 23:59 
GeneralRe: Windows start time? Pin
Alexander M.,1-Aug-03 2:25
Alexander M.,1-Aug-03 2:25 
GeneralRe: Windows start time? Pin
Mike Dimmick1-Aug-03 2:30
Mike Dimmick1-Aug-03 2:30 
GeneralRe: Windows start time? Pin
JSH_CAN1-Aug-03 8:57
sussJSH_CAN1-Aug-03 8:57 
GeneralPlease help to create a simple ODBC database application Pin
ElizabethC31-Jul-03 12:27
ElizabethC31-Jul-03 12:27 
GeneralRe: Please help to create a simple ODBC database application Pin
Alexander M.,31-Jul-03 13:47
Alexander M.,31-Jul-03 13:47 
GeneralRe: Please help to create a simple ODBC database application Pin
ElizabethC31-Jul-03 14:04
ElizabethC31-Jul-03 14:04 
GeneralRe: Please help to create a simple ODBC database application Pin
Anthony_Yio31-Jul-03 16:02
Anthony_Yio31-Jul-03 16:02 
GeneralRe: Please help to create a simple ODBC database application Pin
ElizabethC4-Aug-03 5:56
ElizabethC4-Aug-03 5:56 

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.