1

Topic: The project ceased to be compiled

At compilation of the project the compiler SUDDENLY began to produce an error on a call: pDialog-> Create ((LPCTSTR) CMyDialog:: IDD, this); that in the first parameter Create he wants to see UINT swears, and LPCTSTR it well in any way does not arrange. I tried  versions of the program of monthly and two-month prescription (I store the full not incremental copies of a folder with the project in separate ZIP-files) - the same hogwash. Regardless to say that one month ago they were compiled without problems. If in a call above to remove (LPCTSTR) the project is compiled, but by the first call CDialog:: Create in other place of the program falls somewhere in bowels MFC. What could I break in VS? In any adjustments VS I  not , but spoke on the phone the last some hours with clients much and upon I do not remember, I could push what buttons.

2

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> That I could break in VS? At me such sensation that something broke in MFC as such elementary code falls: CMFCApplication1Dlg *dlg = new CMFCApplication1Dlg (); dlg-> Create (IDD_MFCAPPLICATION1_DIALOG); m_pMainWnd = dlg; INT_PTR nResponse = dlg-> DoModal (); At what if to replace dynamic creation of dialogue on: CMFCApplication1Dlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg. DoModal (); That all perfectly works. Why falls, I and did not understand, walked by a debugger inside DoModal (), there is caused PreModal () and the first line of this function costs ASSERT (m_hWnd == NULL), on it and falls. In what the reason - me while it is not clear. It is added: in general as it appeared it is not necessary to cause Create (), it automatic machines is called now from the designer. THAT IS we change the code on: CMFCApplication1Dlg *dlg = new CMFCApplication1Dlg (); INT_PTR nResponse = dlg-> DoModal (); And all perfectly works. Apparently something got change in the logician of operation MFC and now for call DoModal () - it is not necessary to call Create () Any explanation yet did not find out.

3

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> S> pDialog-> Create ((LPCTSTR) CMyDialog:: IDD, this); S> S> that in the first parameter Create he wants to see UINT swears, and LPCTSTR it well in any way does not arrange. I will not tell for all Odessa, but at passage with VS 2013 on VS 2015 at me too was to steam of "actuatings" on ID'. There upon was more correct to use not (LPCTSTR) IDD, and MAKEINTRESOURCE (IDD). But I am am confused in your code with that you do (LPCTSTR) CMyDialog:: IDD. There two Create: virtual BOOL Create (LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL); virtual BOOL Create (UINT nIDTemplate, CWnd* pParentWnd = NULL); From time immemorial like was always: pDialog-> Create (CMyDialog:: IDD, this); e here (LPCTSTR)?

4

Re: The project ceased to be compiled

Hello, Nikolaz, you wrote: N> From time immemorial like was always: pDialog-> Create (CMyDialog:: IDD, this); N> Zachem here (LPCTSTR)? It is unimportant. The question is I could break in VStudio so, what before such code worked, and now at all ? And, as I already wrote, I not broke the project, namely the environment since the different projects compiled to those and stored in ZIP, to be compiled now refuse.

5

Re: The project ceased to be compiled

Hello, Evgeniy Skvortsov, you wrote: ES> Apparently something got change in the logician of operation MFC and now for call DoModal () - it is not necessary to call Create () ES> Any explanation yet did not find out. What means "changed"? It that, is updated now through the Internet irrespective of desire of the developer? Type - , update, and all projects ceased to be compiled?

6

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> It is unimportant. The question is I could break in VStudio so, what before such code worked, and now at all ? S> And as I already wrote, I not broke the project, namely the environment since the different projects compiled to those and stored in ZIP, to be compiled now refuse. The studio delivered an update what? Selected other version Platform SDK? It could is difficult to tell what to affect all projects at once.

7

Re: The project ceased to be compiled

Hello, bnk, you wrote: bnk> the Studio delivered an update what? I do not know, but IE suddenly led in another way. Probably, it was updated, a dog. bnk> selected other version Platform SDK? And where I was able to do it?

8

Re: The project ceased to be compiled

Hello, sushko, you wrote: bnk>> the Studio delivered an update what? S> I do not know, but IE suddenly led in another way. Probably, it was updated, a dog. Look that recently it was put in updates. It is possible to try to be rolled away on a state "to". bnk>> Selected other version Platform SDK? S> And where I was able to do it? To launch Windows SDK Configuration Tool and to select other version SDK?

9

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> That means "changed"? It that, is updated now through the Internet irrespective of desire of the developer? Type - , update, and all projects ceased to be compiled? Here . Most likely version SDK exchanged somewhere and now does not want to be compiled. In projects MFC in a file stfafx.h is such  - targetver.h in which version SDK is automatically defined and the compiler It is possible to try to put the necessary values manually.//Switching-on SDKDDKVer.h provides determination of the latest accessible platform Windows.//If it is required to fulfill the assembly of application for prior version Windows, include WinSDKVer.h and//set for a macro definition _WIN32_WINNT value of a supported platform before entrance SDKDDKVer.h.

10

Re: The project ceased to be compiled

Hello, Evgeniy Skvortsov, you wrote: ES> Here . Most likely version SDK exchanged somewhere and now does not want to be compiled. Already more warmly. I say that at me too since what time began to swear on function from Win API which work with resources. Helped  MAKEINTRESOURCE () instead of (LPCTSTR). And MAKEINTRESOURCE (), as it is known, lies in Platform SDK. I noted it at passage to a Visual Studio 2015. For certain SDK too it was updated.

11

Re: The project ceased to be compiled

Hello, sushko, you wrote: I Report: fulfilled reinstallation VStudio - did not help. Took down VStudio, anew it installed - helped, now projects are compiled. Specially checked up: yesterday - after problem origin - in a file afxwin.h class CDialog had only a method virtual BOOL Create (UINT nIDTemplate, CWnd* pParentWnd = NULL); now, after removal and setting VStudio, appeared also a method virtual BOOL Create (LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL); P.S. 8 working hours are spent for senseless dancings with a tambourine

12

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> I Report: fulfilled reinstallation VStudio - did not help. Took down VStudio, anew it installed - helped, now projects are compiled. So what version VStudio all the same? Do not inform us? From the compiler still to look at the error report Reinstallation is probably something like Upgrade/Refresh? Then, the last updates which were at VStudio in any way probably have not been affected. Anew is to take down and deliver a certain version without its actual updates. From this an output - wait for problems again. The studio in silent to update something and there will be the same. S> now, after removal and setting VStudio, appeared also method S> S> virtual BOOL Create (LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL); S> It there all life was, therefore as: S> S> virtual BOOL Create (UINT nIDTemplate, CWnd* pParentWnd = NULL); S> It simply wrapper over virtual BOOL Create (LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);: //CDialog _AFXWIN_INLINE BOOL CDialog:: Create (UINT nIDTemplate, CWnd* pParentWnd) {return CDialog:: Create (ATL_MAKEINTRESOURCE (nIDTemplate), pParentWnd);}

13

Re: The project ceased to be compiled

Hello, Nikolaz, you wrote: S>> I Report: fulfilled reinstallation VStudio - did not help. Took down VStudio, anew it installed - helped, now projects are compiled. N> so what version VStudio all the same? Do not inform us? 2010 N> at the error report from the compiler still to look Cannot convert LPCTSTR to UINT or something in this spirit. Word-for-word any more I will not result, since all was corrected. N> reinstallation is probably something like Upgrade/Refresh? Then, the last updates which were at VStudio in any way probably have not been affected. N> anew is to take down and deliver a certain version without its actual updates. From this an output - wait for problems again. The studio in silent to update something and there will be the same. Will beat - we will cry. S>> now, after removal and setting VStudio, appeared also method S>> S>> virtual BOOL Create (LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL); S>> N> It there all life was, therefore as: . I say that when I looked last night these lines in this file this method this line there was not. So was not that I on a trick tried even to add it there. After adding it , but at program execution fell at creation of the first dialog box. To try to create new dialog based application and to look that from this quits, did not guess

14

Re: The project ceased to be compiled

Hello, sushko, you wrote: N>> So what version VStudio all the same? Do not inform us? S> 2010 old cotton wool however... S> Rrrr. I say, what when I looked last night these lines in this file, Can there what MFC Extention Pack "got"? 2010 version - like just then there was MFC Ext on the basis of the code from BCGControlBar I grazed... But you keep keep us informed!

15

Re: The project ceased to be compiled

Hello, Nikolaz, you wrote: N>>> So what version VStudio all the same? Do not inform us? S>> 2010 N> old cotton wool however... Not so, to pay for

16

Re: The project ceased to be compiled

Hello, Nikolaz, you wrote: N> Hello, sushko, you wrote: S>> Rrrr. I say, what when I looked last night these lines in this file, N> Can there what MFC Extention Pack "got"? N> 2010 version - like just then quitted MFC Ext on the basis of the code from BCGControlBar There other titles of classes, in CDialog library MFC Feature Pack adds nothing. Instead of CDialog, there CDialogEx: http://mariusbancila.ro/blog/2008/03/13 … mentation/ Appeared for MSVC-2008 in composition SP1: http://ntcoder.com/bab/tutorial_mfc_feature_pack1_part1 All described - most likely result of an update which M $ does "on the sly". In general - like  to "please" user P.S. From MSVC-2010, , it was necessary to leave for a long time. It is most  studio from which I ever worked. It is already better to sit on MSVC-2008.

17

Re: The project ceased to be compiled

Hello, sushko, you wrote: S> Not so to pay for  Community Edition like as "is free enough": For individuals: Any individual developer can use Visual Studio Community to create their own free or paid apps. For organizations: An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects. For all other usage scenarios: In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with> 250 PCs or> $1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.