Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - AddExpandButton return value
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AddExpandButton return value

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: AddExpandButton return value
    Posted: 03 May 2008 at 2:31pm
The following functions should return the pointer to the button:
 
AddExpandButton
AddSpinButton
AddComboButton
 
Otherwise you get ugly code such as this:
pOptions->AddExpandButton();
pOptions->GetButton(0)->SetIconIndex(iconIndex); // How do we know 0 is indeed this button?
 
Better:
pOptions->AddExpandButton()->SetIconIndex(iconIndex);
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.