Solved

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

Posted on 2009-05-11
2
674 Views
Last Modified: 2013-12-21
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
Comment
Question by:Wanting2LearnMan
2 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 24354182
How about
::SHInitDialog(&shidi);

(stops it using the CDialog version)
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 24354266
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
A short article about problems I had with the new location API and permissions in Marshmallow
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now