mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[RAPPS] Fixes
- Minor style improvements - Not resizing with GetBuffer() calls where not nessesary - loaddlg.cpp: Wrong logic fixed - rosui.h: Fixed length determination svn path=/branches/GSoC_2017/rapps/; revision=75317
This commit is contained in:
parent
c8a43ce2d1
commit
09da413dc8
3 changed files with 8 additions and 12 deletions
|
@ -1148,12 +1148,12 @@ private:
|
||||||
|
|
||||||
/* Get version info */
|
/* Get version info */
|
||||||
GetApplicationString(ItemInfo->hSubKey, L"DisplayVersion", szText);
|
GetApplicationString(ItemInfo->hSubKey, L"DisplayVersion", szText);
|
||||||
ListView_SetItemText(hListView, Index, 1, szText.GetBuffer(MAX_PATH));
|
ListView_SetItemText(hListView, Index, 1, szText.GetBuffer());
|
||||||
szText.ReleaseBuffer();
|
szText.ReleaseBuffer();
|
||||||
|
|
||||||
/* Get comments */
|
/* Get comments */
|
||||||
GetApplicationString(ItemInfo->hSubKey, L"Comments", szText);
|
GetApplicationString(ItemInfo->hSubKey, L"Comments", szText);
|
||||||
ListView_SetItemText(hListView, Index, 2, szText.GetBuffer(MAX_PATH));
|
ListView_SetItemText(hListView, Index, 2, szText.GetBuffer());
|
||||||
szText.ReleaseBuffer();
|
szText.ReleaseBuffer();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1163,8 +1163,7 @@ private:
|
||||||
INT Index;
|
INT Index;
|
||||||
HICON hIcon = NULL;
|
HICON hIcon = NULL;
|
||||||
ATL::CStringW szIconPath;
|
ATL::CStringW szIconPath;
|
||||||
HIMAGELIST hImageListView = NULL;
|
HIMAGELIST hImageListView = ListView_GetImageList(hListView, LVSIL_SMALL);
|
||||||
hImageListView = ListView_GetImageList(hListView, LVSIL_SMALL);
|
|
||||||
|
|
||||||
if (!SearchPatternMatch(Info->szName, szSearchPattern) &&
|
if (!SearchPatternMatch(Info->szName, szSearchPattern) &&
|
||||||
!SearchPatternMatch(Info->szDesc, szSearchPattern))
|
!SearchPatternMatch(Info->szDesc, szSearchPattern))
|
||||||
|
@ -1195,10 +1194,10 @@ private:
|
||||||
Index = ListViewAddItem(Info->Category, Index, Info->szName, (LPARAM) Info);
|
Index = ListViewAddItem(Info->Category, Index, Info->szName, (LPARAM) Info);
|
||||||
hImageListView = ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
|
hImageListView = ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
|
||||||
|
|
||||||
ListView_SetItemText(hListView, Index, 1, Info->szVersion.GetBuffer(MAX_PATH));
|
ListView_SetItemText(hListView, Index, 1, Info->szVersion.GetBuffer());
|
||||||
Info->szVersion.ReleaseBuffer();
|
Info->szVersion.ReleaseBuffer();
|
||||||
|
|
||||||
ListView_SetItemText(hListView, Index, 2, Info->szDesc.GetBuffer(MAX_PATH));
|
ListView_SetItemText(hListView, Index, 2, Info->szDesc.GetBuffer());
|
||||||
Info->szDesc.ReleaseBuffer();
|
Info->szDesc.ReleaseBuffer();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,11 +366,8 @@ ThreadFunc(LPVOID Context)
|
||||||
|
|
||||||
memset(&urlComponents, 0, sizeof(urlComponents));
|
memset(&urlComponents, 0, sizeof(urlComponents));
|
||||||
urlComponents.dwStructSize = sizeof(urlComponents);
|
urlComponents.dwStructSize = sizeof(urlComponents);
|
||||||
|
|
||||||
if (AppInfo->szUrlDownload.GetLength() > urlLength)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
urlLength /= sizeof(WCHAR);
|
urlLength = AppInfo->szUrlDownload.GetLength();
|
||||||
urlComponents.dwSchemeLength = urlLength + 1;
|
urlComponents.dwSchemeLength = urlLength + 1;
|
||||||
urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
|
urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
|
||||||
urlComponents.dwHostNameLength = urlLength + 1;
|
urlComponents.dwHostNameLength = urlLength + 1;
|
||||||
|
|
|
@ -495,8 +495,8 @@ public:
|
||||||
|
|
||||||
void GetWindowTextW(ATL::CStringW& szText)
|
void GetWindowTextW(ATL::CStringW& szText)
|
||||||
{
|
{
|
||||||
INT length = CWindow::GetWindowTextLengthW();
|
INT length = CWindow::GetWindowTextLengthW() + 1;
|
||||||
CWindow::GetWindowText(szText.GetBuffer(length), length);
|
CWindow::GetWindowTextW(szText.GetBuffer(length), length);
|
||||||
szText.ReleaseBuffer();
|
szText.ReleaseBuffer();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue