Win32 - Dialog spawned from another dialog?
The Windows API is not something I specialize in...
Firstly, I'm not sure if this is the BEST way to go about solving this problem. So if you think of a better way, please don't hesitate to suggest it.
This is a tower defense game editor I'm working on.
Basically, I have a dialog.. the dialog, as a whole, edits a tower from the game. The dialog has a listbox in it, which is a list of other towers that the tower can upgrade to, and I have a button to "Add [an] Existing Tower" to the list. So, when the user clicks the button, a little message box or something should pop up, asking them which tower the user wants to add to the list of upgrades.
I know not a lot about the Win32 API, but I thought the best way to implement this would be to maybe have a small dialog box pop up, and that dialog box would have a dropdown list of existing towers in it. The user chooses a tower from that list, and clicks the OK button, and the focus goes back to the main tower-editing dialog, where the selected tower has been added to the list of possible upgrades.
To do that.. is there a way to spawn a dialog and have that dialog return a value? I.e., the selection mini-dialog pops up, the user selects a tower and clicks OK, and the mini-dialog "returns" the name of that tower to the main editing dialog.
Bottom line/question: How would I implement this, or is there a better way to implement this that I've overlooked? I'm guessing there probably is.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement