Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabControl ENTER Key Makes Contents disappear

Status
Not open for further replies.

Captrick458

Programmer
Mar 27, 2005
37
US
I have a TabControl that is working, for the most part, but whenever I press the ENTER key, the contents of the particular tab disappear. If I select another tab, then come back they re-appear.

I have tried WantReturn, and have tried

virtual void OnOK(){};

Neither seems to work.

Incidently, the last page of the TabControl seems to work properly.

Thanks, Rick
 
I found a solution; however, I have no idea why it works.

With the dialogs attached to the second and third tab, placing the following function in the Message Map works just fine.

virtual void OnOK(){};

Put in the dialog attached to the first tab, I had to declare the function in the message map

virtual void OnOK();

and then actually define the function as in

void CMyClass::OnOK()
{
return;
}

I have absolutely no idea why this was required for dialog attached to tab 1, but was not required for the dialogs attached to tabs 2 and 3.

Does anyone know why?

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top