BBC BASIC for Windows
« Rendering some controls invisible? »
Welcome Guest. Please Login or Register. Apr 6th, 2018, 12:07am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Re: Rendering some controls invisible?
« Reply #2 on: Dec 20th, 2014, 3:13pm »
Richard
In the "code" snippet, I defined the two controls, *then* displayed the dialog box, and only *then* wanted to make the controls invisible. Surely I can't define the controls again after displaying the dialog box, this time making them invisible?
-- Ian
Logged
rtr2 Guest
Re: Rendering some controls invisible?
« Reply #3 on: Dec 20th, 2014, 3:52pm »
I defined the two controls, *then* displayed the dialog box, and only *then* wanted to make the controls invisible.
I didn't spot that. Sorry.
Whenever I've done something similar, I've always had some controls which needed to be initially invisible and some which start off being visible and are subsequently made invisible. In that situation it's better to remove the WS_VISIBLE style bit rather than to hide the controls, because even if you hide them immediately after the PROC_showdialog there is a risk that you might see them 'flash' briefly - and almost invariably it only happens on somebody else's system!
If none of your controls need to be hidden initially then that obviously isn't a problem, and you can subsequently hide and show them using ShowWindow in the usual way without any unwanted glitches (the ShowWindow API is documented in the BB4W help and searching for 'hide' finds it).