Print Page | Close Window

AddExpandButton return value

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10475
Printed Date: 16 November 2024 at 4:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AddExpandButton return value
Posted By: znakeeye
Subject: AddExpandButton return value
Date 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);



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net