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>
|
||||||
<File
|
<File
|
||||||
|
RelativePath=".\recentfiles.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
RelativePath=".\syncdocument.cpp"
|
RelativePath=".\syncdocument.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@ -128,7 +128,6 @@ bool SyncDocument::save(const std::string &fileName)
|
|||||||
if (0 != getTrackCount()) rootNode->appendChild(doc->createTextNode(_T("\n")));
|
if (0 != getTrackCount()) rootNode->appendChild(doc->createTextNode(_T("\n")));
|
||||||
|
|
||||||
doc->save(fileName.c_str());
|
doc->save(fileName.c_str());
|
||||||
doc->Release();
|
|
||||||
|
|
||||||
savePointDelta = 0;
|
savePointDelta = 0;
|
||||||
savePointUnreachable = false;
|
savePointUnreachable = false;
|
||||||
|
|||||||
@ -331,7 +331,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks)
|
|||||||
{
|
{
|
||||||
RECT rightMargin;
|
RECT rightMargin;
|
||||||
rightMargin.top = getScreenY(0);
|
rightMargin.top = getScreenY(0);
|
||||||
rightMargin.bottom = getScreenY(getRows());
|
rightMargin.bottom = getScreenY(int(getRows()));
|
||||||
rightMargin.left = getScreenX(getTrackCount());
|
rightMargin.left = getScreenX(getTrackCount());
|
||||||
rightMargin.right = rcTracks.right;
|
rightMargin.right = rcTracks.right;
|
||||||
FillRect( hdc, &rightMargin, GetSysColorBrush(COLOR_APPWORKSPACE));
|
FillRect( hdc, &rightMargin, GetSysColorBrush(COLOR_APPWORKSPACE));
|
||||||
@ -339,7 +339,7 @@ void TrackView::paintTracks(HDC hdc, RECT rcTracks)
|
|||||||
|
|
||||||
{
|
{
|
||||||
RECT bottomPadding;
|
RECT bottomPadding;
|
||||||
bottomPadding.top = getScreenY(getRows());
|
bottomPadding.top = getScreenY(int(getRows()));
|
||||||
bottomPadding.bottom = rcTracks.bottom;
|
bottomPadding.bottom = rcTracks.bottom;
|
||||||
bottomPadding.left = rcTracks.left;
|
bottomPadding.left = rcTracks.left;
|
||||||
bottomPadding.right = rcTracks.right;
|
bottomPadding.right = rcTracks.right;
|
||||||
@ -512,7 +512,7 @@ void TrackView::setupScrollBars()
|
|||||||
si.nPos = editRow;
|
si.nPos = editRow;
|
||||||
si.nPage = windowRows;
|
si.nPage = windowRows;
|
||||||
si.nMin = 0;
|
si.nMin = 0;
|
||||||
si.nMax = getRows() - 1 + windowRows - 1;
|
si.nMax = int(getRows()) - 1 + windowRows - 1;
|
||||||
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
|
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
|
||||||
|
|
||||||
si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL;
|
si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ public:
|
|||||||
SyncDocument *getDocument() { return document; }
|
SyncDocument *getDocument() { return document; }
|
||||||
|
|
||||||
void setRows(size_t rows);
|
void setRows(size_t rows);
|
||||||
int getRows() const
|
size_t getRows() const
|
||||||
{
|
{
|
||||||
if (NULL == document) return 0;
|
if (NULL == document) return 0;
|
||||||
return document->getRows();
|
return document->getRows();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user