Skip to content

Commit bcc559d

Browse files
author
mikeblome
committed
applied VS COde formatting to all snippets. some line lengths are too long now
1 parent c0fdd99 commit bcc559d

File tree

638 files changed

+4649
-4647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

638 files changed

+4649
-4647
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Print the application's executable filename.
2-
TRACE(_T("Executable filename = %s\n"), AfxGetApp()->m_pszExeName);
1+
// Print the application's executable filename.
2+
TRACE(_T("Executable filename = %s\n"), AfxGetApp()->m_pszExeName);
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
CString strMyClass;
1+
CString strMyClass;
22

3-
// load stock cursor, brush, and icon for
4-
// my own window class
3+
// load stock cursor, brush, and icon for
4+
// my own window class
55

6-
try
7-
{
8-
strMyClass = AfxRegisterWndClass(
9-
CS_VREDRAW | CS_HREDRAW,
10-
::LoadCursor(NULL, IDC_ARROW),
11-
(HBRUSH) ::GetStockObject(WHITE_BRUSH),
12-
::LoadIcon(NULL, IDI_APPLICATION));
13-
}
14-
catch (CResourceException* pEx)
15-
{
16-
AfxMessageBox(_T("Couldn't register class! (Already registered?)"));
17-
pEx->Delete();
18-
}
6+
try
7+
{
8+
strMyClass = AfxRegisterWndClass(
9+
CS_VREDRAW | CS_HREDRAW,
10+
::LoadCursor(NULL, IDC_ARROW),
11+
(HBRUSH)::GetStockObject(WHITE_BRUSH),
12+
::LoadIcon(NULL, IDI_APPLICATION));
13+
}
14+
catch (CResourceException *pEx)
15+
{
16+
AfxMessageBox(_T("Couldn't register class! (Already registered?)"));
17+
pEx->Delete();
18+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// This code is taken from CMyApp::InitInstance
2-
HINSTANCE hRes = NULL;
3-
hRes = LoadLibrary(_T("Resource.dll"));
4-
if(hRes)
5-
AfxSetResourceHandle(hRes);
1+
// This code is taken from CMyApp::InitInstance
2+
HINSTANCE hRes = NULL;
3+
hRes = LoadLibrary(_T("Resource.dll"));
4+
if (hRes)
5+
AfxSetResourceHandle(hRes);

docs/mfc/reference/codesnippet/CPP/application-information-and-management_13.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <afx.h>
22
#include <afxdb.h>
33

4-
int _tmain(int /*argc*/, TCHAR* /*argv[]*/, TCHAR* /*envp[]*/)
4+
int _tmain(int /*argc*/, TCHAR * /*argv[]*/, TCHAR * /*envp[]*/)
55
{
66
int nRetCode = 0;
77

@@ -25,11 +25,11 @@ int _tmain(int /*argc*/, TCHAR* /*argv[]*/, TCHAR* /*envp[]*/)
2525
// we shouldn't realistically get here
2626

2727
_tprintf_s(_T("Successful!\n")
28-
_T("Closing ...\n"));
28+
_T("Closing ...\n"));
2929
db.Close();
3030
_tprintf_s(_T("Closed!"));
3131
}
32-
catch (CDBException* pEx)
32+
catch (CDBException *pEx)
3333
{
3434
// we got an exception! print an error message
3535
// (this wouldn't work without initializing MFC)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Print the application name to the debugger output window.
2-
TRACE(_T("Application name is %s\n"), AfxGetAppName());
1+
// Print the application name to the debugger output window.
2+
TRACE(_T("Application name is %s\n"), AfxGetAppName());
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Print the application instance handle to the debugger output window.
2-
TRACE(_T("Application instance handle is 0x%0X\n"), AfxGetInstanceHandle());
1+
// Print the application instance handle to the debugger output window.
2+
TRACE(_T("Application instance handle is 0x%0X\n"), AfxGetInstanceHandle());
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//The following line send a WM_CLOSE message
2-
// to the Application's main window. This will cause the
3-
// Application to exit.
4-
AfxGetMainWnd()->PostMessage(WM_CLOSE, 0, 0);
1+
//The following line send a WM_CLOSE message
2+
// to the Application's main window. This will cause the
3+
// Application to exit.
4+
AfxGetMainWnd()->PostMessage(WM_CLOSE, 0, 0);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
//Load the menu specifying the module handle where resource is to be
2-
//found & resource ID
3-
HMENU hMenu = ::LoadMenu(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME));
1+
//Load the menu specifying the module handle where resource is to be
2+
//found & resource ID
3+
HMENU hMenu = ::LoadMenu(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME));
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
//Print the current thread ID in the Debug Window
2-
TRACE(_T("Current Thread ID = 0x%X\n"), AfxGetThread()->m_nThreadID);
1+
//Print the current thread ID in the Debug Window
2+
TRACE(_T("Current Thread ID = 0x%X\n"), AfxGetThread()->m_nThreadID);

docs/mfc/reference/codesnippet/CPP/application-information-and-management_7.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// using a generic CView derived class that is implemented in
33
// a dynamically loaded MFC Extension DLL.
44

5-
typedef CRuntimeClass * (*GETDLLVIEW)();
5+
typedef CRuntimeClass *(*GETDLLVIEW)();
66

77
BOOL CUserApp::InitInstance()
88
{

0 commit comments

Comments
 (0)