• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 731
  • Last Modified:

'CDialog::SHInitDialog' : function does not take 1 arguments

I get error C2660: 'CDialog::SHInitDialog' : function does not take 1 arguments      
with the below code.
I am converting an eVC++ project to VS2005.  How can I solve this?


BOOL CMyClass::OnInitDialog()
{
      CDialog::OnInitDialog();
      
      SHINITDLGINFO shidi;

      shidi.dwMask = SHIDIM_FLAGS;
      shidi.dwFlags =SHIDIF_FULLSCREENNOMENUBAR;
      shidi.hDlg = m_hWnd;
      SHInitDialog(&shidi);

}
0
Wanting2LearnMan
Asked:
Wanting2LearnMan
1 Solution
 
AndyAinscowCommented:
How about
::SHInitDialog(&shidi);

(stops it using the CDialog version)
0
 
alexey_gusevCommented:
look into dlgcore.cpp in MFC sources, there is the method SHInitDialog() there, but it doesn't do what you'd expect from its name :)

actual SHInitDialog() is called from OnInitiDialog() later on, so you might want to use :: SHInitDialog() as previous post suggests
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now