Re: Visual Studio
You don't say what the output is meant to be, but I'm assuming you want some output to appear on press of the "generate" button when you've first pushed the "select first" button, and subsequently checked the "select second" optionbox?
If so, I'd just use a couple of boolean variables. When the first button is clicked, set variable bool1 to true, then when the second optionbox is checked set variable bool2 to true IFF bool1 is true (so you have to press the button first.)
Then when the "generate" button is hit just check whether bool2 is true, and if so show whatever output you want to show.
Seems like a bit of a bizarre program though, any reason for it?
Save the whales, feed the hungry, free the mallocs.