added recentfiles.cpp to vs2005 project, fixed some warnings, removed Release()-call that caused crash.

This commit is contained in:
Erik Faye-Lund 2008-10-14 23:55:09 +00:00
parent 1eb06de644
commit fe8d009a22
4 changed files with 8 additions and 5 deletions

View File

@ -194,6 +194,10 @@
>
</File>
<File
RelativePath=".\recentfiles.cpp"
>
</File>
<File
RelativePath=".\syncdocument.cpp"
>
</File>

View File

@ -128,7 +128,6 @@ bool SyncDocument::save(const std::string &fileName)
if (0 != getTrackCount()) rootNode->appendChild(doc->createTextNode(_T("\n")));
doc->save(fileName.c_str());
doc->Release();
savePointDelta = 0;
savePointUnreachable = false;

View File

@ -331,7 +331,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks)
{
RECT rightMargin;
rightMargin.top = getScreenY(0);
rightMargin.bottom = getScreenY(getRows());
rightMargin.bottom = getScreenY(int(getRows()));
rightMargin.left = getScreenX(getTrackCount());
rightMargin.right = rcTracks.right;
FillRect( hdc, &rightMargin, GetSysColorBrush(COLOR_APPWORKSPACE));
@ -339,7 +339,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks)
{
RECT bottomPadding;
bottomPadding.top = getScreenY(getRows());
bottomPadding.top = getScreenY(int(getRows()));
bottomPadding.bottom = rcTracks.bottom;
bottomPadding.left = rcTracks.left;
bottomPadding.right = rcTracks.right;
@ -512,7 +512,7 @@ void TrackView::setupScrollBars()
si.nPos = editRow;
si.nPage = windowRows;
si.nMin = 0;
si.nMax = getRows() - 1 + windowRows - 1;
si.nMax = int(getRows()) - 1 + windowRows - 1;
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL;

View File

@ -27,7 +27,7 @@ public:
SyncDocument *getDocument() { return document; }
void setRows(size_t rows);
int getRows() const
size_t getRows() const
{
if (NULL == document) return 0;
return document->getRows();