Solved

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

Posted on 2009-05-11
2
679 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
fizzArray  challenge 1 58
How to convert MFC::CString to UTF8 wchar_t* 10 141
unix example issues 18 73
Embarcadero C++ Builder XE10.1 Berlin red arrow Indicator 2 16
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

911 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

20 Experts available now in Live!

Get 1:1 Help Now