I thought I had this whole MFC thing down. I was completely wrong.
I s开发者_运维知识库tarted a VS 2008 project, MFC Application, Dialog Based, Shared DLL. I've made all the dialogs I want to add to the tabbed control and I'm at the step where (as far as I can tell) I add a variable to the tab control to do things with it. But "Add Variable" is greyed out and I cannot select it.
Basically I'm at the second step of this,
Any idea why I can't add a variable to the tab control?
Thank you!
Edit: I have just noticed that if I added a tab control in the default dialog I CAN add a variable. The dialog I'm trying to put this tab control into is NOT the main dialog.
Okay - it's simple. All the examples I were looking at were using the default dialog with the tab control. To make it possible to add a variable to the tab control of the dialog I needed to first add a class to the dialog (base class: CDialog).
Haven't actually got the tabs working yet, but I'll do that tomorrow, for now I can add variables to the tab control.
tl;dr - Add class - base class: CDialog - to the dialog. Then you can add variables to tab control
精彩评论