taskmgr: Avoid using long.
This commit is contained in:
parent
15efbc892b
commit
efeb9ee4d2
@ -416,14 +416,14 @@ static void GraphCtrl_DrawPoint(TGraphCtrl* this)
|
|||||||
|
|
||||||
/* move to the previous point */
|
/* move to the previous point */
|
||||||
prevX = this->m_rectPlot.right-this->m_nPlotShiftPixels;
|
prevX = this->m_rectPlot.right-this->m_nPlotShiftPixels;
|
||||||
prevY = this->m_rectPlot.bottom -
|
prevY = this->m_rectPlot.bottom -
|
||||||
(long)((this->m_dPreviousPosition[i] - this->m_dLowerLimit) * this->m_dVerticalFactor);
|
(int)((this->m_dPreviousPosition[i] - this->m_dLowerLimit) * this->m_dVerticalFactor);
|
||||||
MoveToEx(this->m_dcPlot, prevX, prevY, NULL);
|
MoveToEx(this->m_dcPlot, prevX, prevY, NULL);
|
||||||
|
|
||||||
/* draw to the current point */
|
/* draw to the current point */
|
||||||
currX = this->m_rectPlot.right-this->m_nHalfShiftPixels;
|
currX = this->m_rectPlot.right-this->m_nHalfShiftPixels;
|
||||||
currY = this->m_rectPlot.bottom -
|
currY = this->m_rectPlot.bottom -
|
||||||
(long)((this->m_dCurrentPosition[i] - this->m_dLowerLimit) * this->m_dVerticalFactor);
|
(int)((this->m_dCurrentPosition[i] - this->m_dLowerLimit) * this->m_dVerticalFactor);
|
||||||
LineTo(this->m_dcPlot, currX, currY);
|
LineTo(this->m_dcPlot, currX, currY);
|
||||||
|
|
||||||
/* Restore the pen */
|
/* Restore the pen */
|
||||||
|
@ -56,7 +56,7 @@ void TaskManager_OnFileNew(void)
|
|||||||
static const WCHAR wszShell32[] = {'S','H','E','L','L','3','2','.','D','L','L',0};
|
static const WCHAR wszShell32[] = {'S','H','E','L','L','3','2','.','D','L','L',0};
|
||||||
|
|
||||||
hShell32 = LoadLibraryW(wszShell32);
|
hShell32 = LoadLibraryW(wszShell32);
|
||||||
RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (char*)((long)0x3D));
|
RunFileDlg = (void *)GetProcAddress(hShell32, (LPCSTR)61);
|
||||||
|
|
||||||
/* Show "Run..." dialog */
|
/* Show "Run..." dialog */
|
||||||
if (RunFileDlg)
|
if (RunFileDlg)
|
||||||
|
@ -754,7 +754,7 @@ LPWSTR GetLastErrorText(LPWSTR lpwszBuf, DWORD dwSize)
|
|||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
/* supplied buffer is not long enough */
|
/* supplied buffer is not long enough */
|
||||||
if (!dwRet || ( (long)dwSize < (long)dwRet+14)) {
|
if (!dwRet || ( dwSize < dwRet+14)) {
|
||||||
lpwszBuf[0] = '\0';
|
lpwszBuf[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
lpwszTemp[strlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */
|
lpwszTemp[strlenW(lpwszTemp)-2] = '\0'; /* remove cr and newline character */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user