Solved

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

Posted on 2009-05-11
2
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect file exist or not 3 202
Dialogbox API leak? 18 109
What is sub-make ? 2 88
Are the two lines the same? If not what is the difference? 2 29
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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

733 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