Tabbed Programs
I''m trying to do something like the Properties menu you get when you right click on the desktop. But my problem is I''m not sure where everything is supposed to go in the source files. I got the tab control page from MSDN Online but it doesn''t really state where all if it goes. And I''ve been unable to find anything on the MSDN CD. Would anybody be kind enough to show me some source code, or better yet a tutorial somewhere?
"I can''t work like this! Where are my fuzzy dice?"
"I can't work like this! Where are my fuzzy dice?"
Try looking up Property sheets. These seem to be easier to use.
You can create a property sheet, then add the pages, each with its own handler.
You can create a property sheet, then add the pages, each with its own handler.
Alright I found those but now I''ve got a problem and a question. The problem is when I try to use the property sheets I crash the computer. I usually have to manully reset it, I''ve isolated the problem to the actually calling of PropertySheet(). I think maybe I''m calling my dialog template wrong, for the psp.pszTemplate entry I got "TEST" (the dialog name), I also tried MAKEINTRESOURCE("TEST") this also crashed the computer. Is there another way that you are supposed to do this? My question is, is there anyway to get rid of all the buttons at the bottom? I''m not trying to make a program that edits properties just a program that has two different utilities on two different pages.
"I can''t work like this! Where are my fuzzy dice?"
"I can''t work like this! Where are my fuzzy dice?"
"I can't work like this! Where are my fuzzy dice?"
Bring to top.
Please, anybody know where there tutorials on doing this? If you could point out a book that would be fine as well.
"I can''t work like this! Where are my fuzzy dice?"
Please, anybody know where there tutorials on doing this? If you could point out a book that would be fine as well.
"I can''t work like this! Where are my fuzzy dice?"
"I can't work like this! Where are my fuzzy dice?"
Well I asked myself the very same question and found the answer
in MFC (but I guess it''s similar in WinAPI):
1- create your tab control and add your tab "names"
2- create some dialog boxes in resources corresponding to the tabs you created but be sure to set the properties to child window and no title
3- create your dialog boxes in your code with the Create function:
SomeDialog dialog;
dialog.Create(resource ID of dialog, pointer to ctrltab);
4- Do this for each dialog/tab and you can use the CenterWindow function to center each dialog on the corresponding tab:
dialog.CenterWindow(pointer to ctrltab);
5- Finally, you just have to add a "listener" for the tab changing event and hide/show dialogs corresponding to the tab.
case Tab1:
{
dialog2.ShowWindow(FALSE);
dialog1.ShowWindow(TRUE);
}
Well, that''s about it! Hope that helps
in MFC (but I guess it''s similar in WinAPI):
1- create your tab control and add your tab "names"
2- create some dialog boxes in resources corresponding to the tabs you created but be sure to set the properties to child window and no title
3- create your dialog boxes in your code with the Create function:
SomeDialog dialog;
dialog.Create(resource ID of dialog, pointer to ctrltab);
4- Do this for each dialog/tab and you can use the CenterWindow function to center each dialog on the corresponding tab:
dialog.CenterWindow(pointer to ctrltab);
5- Finally, you just have to add a "listener" for the tab changing event and hide/show dialogs corresponding to the tab.
case Tab1:
{
dialog2.ShowWindow(FALSE);
dialog1.ShowWindow(TRUE);
}
Well, that''s about it! Hope that helps
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement