Which big help bai
The following code to run error is mostly a few questions about the ID value not statement.
Use the VS2010
#include
#include
# define IDC_DOB IDC_BUTTON1
# define IDC_LINPUTE IDC_EDIT1
# define IDC_RINPUTE IDC_EDIT2
# define IDC_OUTPUTE IDC_EDIT3
//window procedure function declaration
LRESULT a CALLBACK WndProc (HWND hDlgMain, UINT uMsg,
WPARAM WPARAM, LPARAM LPARAM);
//program entrance function
Int WINAPI WinMain (HINSTANCE hinstCurrent, HINSTANCE hinstPrevious,
LPSTR lpszCmdLine, int nCmdShow)
{
DialogBox (hInstance, MAKEINRESOURSE (IDD_DIALOG1), NULL, DLGPROC DLGPROC);
return 0;
}
//window procedure function
LRESULT a CALLBACK WndProc (HWND hDlgMain, UINT uMsg,
WPARAM WPARAM, LPARAM LPARAM)
{
LPTSTR linput rinput;
Int the output;
GetDlgItemText (hDlgMain, IDC_LINPUTE linput, 2);
GetDlgItemText (hDlgMain, IDC_RINPUTE rinput, 2);
The output=(int) linput + (int) rinput;
The switch (uMsg)
{
Case WM_COMMAND:
{
The switch (LOWORD (wParam))
{
Case IDC_DOB:
{
SetDlgItemText (hDlgMain IDC_OUTPUTE, the output);
}
break;
Case IDCANCEL:
Case WM_CLOSE:
{
EndDialog (hDlgMain, 0);
}
break;
}
}
}
return 0;
}
An error
1> -- -- -- -- -- - has started to generate: project: UIUIUI3, configuration: Debug Win32 -- -- -- -- -- --
1> Generate the start time for the 2020-12-7 23:27:35,
1> PrepareForBuild:
1> Is create the directory "E: \ \ new folder vs \ UIUIUI3 \ Debug ",
1> InitializeBuildStatus:
1> Is creating "Debug \ UIUIUI3 unsuccessfulbuild", because has designated "AlwaysCreate",
1> ClCompile:
1> 3. The CPP
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (17) : error C2065: "hInstance" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (17) : error C2065: "IDD_DIALOG1" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (17) : error C2065: "DlgProc" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (17) : error C3861: "MAKEINRESOURSE" : can't find the identifier
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (29) : error C2065: "IDC_EDIT1" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (30) : error C2065: "IDC_EDIT2" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (39) : error C2065: "IDC_BUTTON1" : no statement of identifiers
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (39) : error C2051: case expression is not constant
1> E: \ \ new folder vs \ uiuiui3 \ uiuiui3\3. CPP (41) : error C2065: "IDC_EDIT3" : no statement of identifiers
1>
1> Generate failure,
1>
1> Elapsed time 00:00:00. 78
==========: zero success, failure, latest 0, 0 skip==========
The properties of each part
See figure