added recentfiles.cpp to vs2005 project, fixed some warnings, removed Release()-call that caused crash.
This commit is contained in:
parent
1eb06de644
commit
fe8d009a22
@ -194,6 +194,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\recentfiles.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\syncdocument.cpp"
|
||||
>
|
||||
</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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user