/*
*******************************************************************************
*
- * Copyright (C) 1999-2003, International Business Machines
+ * Copyright (C) 1999-2005, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
si.nMin = 0;
si.nMax = context->paragraph->getLineCount() - 1;
si.nPage = context->height / context->paragraph->getLineHeight();
- SetScrollInfo(hwnd, SB_VERT, &si, true);
+ SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
}
}
if (LE_FAILURE(fontStatus)) {
ReleaseDC(hwnd, hdc);
- return 0;
+ return -1;
}
context = new Context();
}
si.fMask = SIF_POS;
- SetScrollInfo(hwnd, SB_VERT, &si, true);
+ SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
GetScrollInfo(hwnd, SB_VERT, &si);
context = (Context *) GetWindowLong(hwnd, 0);
context->paragraph = newParagraph;
InitParagraph(hwnd, context);
PrettyTitle(hwnd, szTitleName);
- InvalidateRect(hwnd, NULL, true);
+ InvalidateRect(hwnd, NULL, TRUE);
}
}
case IDM_HELP_ABOUTLAYOUTSAMPLE:
MessageBox(hwnd, TEXT("Windows Layout Sample 0.1\n")
- TEXT("Copyright (C) 1998-2002 By International Business Machines Corporation and others.\n")
+ TEXT("Copyright (C) 1998-2005 By International Business Machines Corporation and others.\n")
TEXT("Author: Eric Mader"),
szAppName, MB_ICONINFORMATION | MB_OK);
return 0;
{
context = (Context *) GetWindowLong(hwnd, 0);
- if (context->paragraph != NULL) {
+ if (context != NULL && context->paragraph != NULL) {
delete context->paragraph;
}