Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone ,

As per project(using MFC) requirement i need to implement tabbed dialog box so i chose the property sheet with property page . But below are my requirements can you please help out.

1. It should have only Ok and Cancel buttons
2. Should n't close the page while click on enter in editcontrol.

Thanks in advance

What I have tried:

I tried for Apply button by using
CMySheet mySheet(L"Property Sheet Demo");

	mySheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
IT works fine for apply but i need to know same like for help button
Posted
Updated 6-May-20 22:43pm

I resolved to hide or remove the help button in propertysheet and propertypage.
Below is the code part
mySheet.m_psh.dwFlags &= ~PSH_HASHELP;
	page1.m_psp.dwFlags &= ~PSP_HASHELP;
	
	
	page2.m_psp.dwFlags &= ~PSP_HASHELP;
 
Share this answer
 
For closing property page when hit on edit control to resolve the below code:
if (pMsg->message == WM_KEYDOWN)
	{
		switch( pMsg->wParam )
		{
			case VK_RETURN:
				pMsg->wParam = VK_TAB;
				break;

		}
	}
	return CPropertySheet::PreTranslateMessage(pMsg);
 
Share this answer
 

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