Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: [Excel automation] How to show the SaveAs dialog? Pin
followait28-Jul-08 2:06
followait28-Jul-08 2:06 
Questionbutton enable Pin
guru moorthy.k28-Jul-08 0:51
guru moorthy.k28-Jul-08 0:51 
AnswerRe: button enable Pin
Rajesh R Subramanian28-Jul-08 0:54
professionalRajesh R Subramanian28-Jul-08 0:54 
GeneralRe: button enable Pin
guru moorthy.k28-Jul-08 0:59
guru moorthy.k28-Jul-08 0:59 
GeneralRe: button enable Pin
Rajesh R Subramanian28-Jul-08 1:14
professionalRajesh R Subramanian28-Jul-08 1:14 
GeneralRe: button enable Pin
guru moorthy.k28-Jul-08 1:23
guru moorthy.k28-Jul-08 1:23 
GeneralRe: button enable Pin
Rajesh R Subramanian28-Jul-08 1:31
professionalRajesh R Subramanian28-Jul-08 1:31 
AnswerRe: button enable Pin
CPallini28-Jul-08 1:35
mveCPallini28-Jul-08 1:35 
Well, if the button IDs are contiguous then you simply make an iteration
for (int i=0; i < iEnabledCount; i++)
{
  GetDlgItem(ID_BUTTON0 + i)->EnableWindow(TRUE);
}


On the other hand, if the button IDs are sparse, you may use an array:
UINT uBtnId[]= { ID_BUTTON0, ID_BUTTON1, ... };
for (int i=0; i < iEnabledCount; i++)
{
  GetDlgItem(uBtnId[i])->EnableWindow(TRUE);
}

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


[My articles]

JokeOT (THHB attempt 3) Pin
Rajesh R Subramanian28-Jul-08 1:40
professionalRajesh R Subramanian28-Jul-08 1:40 
GeneralRe: OT (THHB attempt 3) Pin
CPallini28-Jul-08 1:47
mveCPallini28-Jul-08 1:47 
GeneralRe: OT (THHB attempt 3) Pin
Mark Salsbery28-Jul-08 7:34
Mark Salsbery28-Jul-08 7:34 
QuestionHow CPU uage is calulcated? Pin
vikramlinux28-Jul-08 0:25
vikramlinux28-Jul-08 0:25 
AnswerRe: How CPU uage is calulcated? Pin
_AnsHUMAN_ 28-Jul-08 0:34
_AnsHUMAN_ 28-Jul-08 0:34 
GeneralRe: How CPU uage is calulcated? Pin
vikramlinux28-Jul-08 0:35
vikramlinux28-Jul-08 0:35 
GeneralRe: How CPU uage is calulcated? Pin
toxcct28-Jul-08 0:37
toxcct28-Jul-08 0:37 
GeneralRe: How CPU uage is calulcated? Pin
vikramlinux28-Jul-08 0:41
vikramlinux28-Jul-08 0:41 
GeneralRe: How CPU uage is calulcated? PinPopular
Luc Pattyn28-Jul-08 2:15
sitebuilderLuc Pattyn28-Jul-08 2:15 
JokeRe: How CPU uage is calulcated? Pin
CPallini28-Jul-08 2:22
mveCPallini28-Jul-08 2:22 
GeneralRe: How CPU uage is calulcated? Pin
Rajesh R Subramanian28-Jul-08 2:30
professionalRajesh R Subramanian28-Jul-08 2:30 
GeneralRe: How CPU uage is calulcated? Pin
CPallini28-Jul-08 21:54
mveCPallini28-Jul-08 21:54 
JokeRe: How CPU uage is calulcated? Pin
Rajesh R Subramanian31-Jul-08 3:03
professionalRajesh R Subramanian31-Jul-08 3:03 
GeneralRe: How CPU uage is calulcated? Pin
vikramlinux28-Jul-08 2:48
vikramlinux28-Jul-08 2:48 
QuestionDeleting Items in CTreeCtrl Pin
Adeel Mirza27-Jul-08 23:27
Adeel Mirza27-Jul-08 23:27 
AnswerRe: Deleting Items in CTreeCtrl Pin
_AnsHUMAN_ 27-Jul-08 23:48
_AnsHUMAN_ 27-Jul-08 23:48 
AnswerRe: Deleting Items in CTreeCtrl Pin
kDevloper28-Jul-08 0:11
kDevloper28-Jul-08 0:11 

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.