Click here to Skip to main content
15,888,000 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I created a tab with inside dialogs, and I do show and hide depending on index of tab with switch, my problem is that I can not put dimension of dialog equal to dimension of tab, when I press tab there is a row white of tab, and gray of dialog, How Can I solve this?

What I have tried:

I saw tutorial on youtube, but there isn't an explanation of layout of tab
Posted
Updated 20-Sep-19 5:51am

You can use GetClientRect on the tab, and GetWindowRect on the dialog. You can then adjust the dialog box dimensions to fit the tab, and use MoveWindow to reposition it.
 
Share this answer
 
Comments
Member 14594285 20-Sep-19 5:33am    
I wrote my answers
There are several articles about dialogs and tabs at this site. Here is the section for them : https://www.codeproject.com/KB/tabs/[^]. I recommend searching through them and you should be able to find one that is helpful.
 
Share this answer
 
but with GetClientRect I get dimension of tab, right? And with GetWindowRect I obtain dimension of dialog...dialog is already positioned well...Then to fix dimension of dialog is there a function?
 
Share this answer
 
Comments
Richard Deeming 20-Sep-19 9:38am    
You clearly know how to post a comment, and you you still chose to post your comment as a "solution"?!
Member 14594285 20-Sep-19 10:23am    
I mistake

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900