Commit b12fbe16 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32: HANDLE/HGLOBAL are basically just void pointers. No casts to other pointers are needed.

parent 09802e2c
...@@ -889,7 +889,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags, ...@@ -889,7 +889,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
else else
nColorTableSize = 0; nColorTableSize = 0;
nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD); nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc (GMEM_FIXED, nSize); lpBitmapInfo = GlobalAlloc (GMEM_FIXED, nSize);
if (lpBitmapInfo == NULL) if (lpBitmapInfo == NULL)
return 0; return 0;
RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize); RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
...@@ -1117,7 +1117,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, ...@@ -1117,7 +1117,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
* from there. */ * from there. */
/* See if we have been called for this window */ /* See if we have been called for this window */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); stack = GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) { if (!stack) {
/* allocate stack */ /* allocate stack */
stack = Alloc (sizeof(SUBCLASS_INFO)); stack = Alloc (sizeof(SUBCLASS_INFO));
...@@ -1196,7 +1196,7 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, ...@@ -1196,7 +1196,7 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef); TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
/* See if we have been called for this window */ /* See if we have been called for this window */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); stack = GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) if (!stack)
return FALSE; return FALSE;
...@@ -1239,7 +1239,7 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u ...@@ -1239,7 +1239,7 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID); TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
/* Find the Subclass to remove */ /* Find the Subclass to remove */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); stack = GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) if (!stack)
return FALSE; return FALSE;
...@@ -1292,7 +1292,7 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA ...@@ -1292,7 +1292,7 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam); TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); stack = GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) { if (!stack) {
ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd); ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
return 0; return 0;
...@@ -1343,7 +1343,7 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar ...@@ -1343,7 +1343,7 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam); TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
/* retrieve our little stack from the Properties */ /* retrieve our little stack from the Properties */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass); stack = GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) { if (!stack) {
ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd); ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
return 0; return 0;
......
...@@ -1604,8 +1604,7 @@ static BOOL PROPSHEET_Back(HWND hwndDlg) ...@@ -1604,8 +1604,7 @@ static BOOL PROPSHEET_Back(HWND hwndDlg)
{ {
PSHNOTIFY psn; PSHNOTIFY psn;
HWND hwndPage; HWND hwndPage;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
LRESULT result; LRESULT result;
int idx; int idx;
...@@ -1644,8 +1643,7 @@ static BOOL PROPSHEET_Next(HWND hwndDlg) ...@@ -1644,8 +1643,7 @@ static BOOL PROPSHEET_Next(HWND hwndDlg)
PSHNOTIFY psn; PSHNOTIFY psn;
HWND hwndPage; HWND hwndPage;
LRESULT msgResult = 0; LRESULT msgResult = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
int idx; int idx;
TRACE("active_page %d\n", psInfo->active_page); TRACE("active_page %d\n", psInfo->active_page);
...@@ -1684,8 +1682,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg) ...@@ -1684,8 +1682,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
PSHNOTIFY psn; PSHNOTIFY psn;
HWND hwndPage; HWND hwndPage;
LRESULT msgResult = 0; LRESULT msgResult = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("active_page %d\n", psInfo->active_page); TRACE("active_page %d\n", psInfo->active_page);
if (psInfo->active_page < 0) if (psInfo->active_page < 0)
...@@ -1723,8 +1720,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam) ...@@ -1723,8 +1720,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam)
int i; int i;
HWND hwndPage; HWND hwndPage;
PSHNOTIFY psn; PSHNOTIFY psn;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("active_page %d\n", psInfo->active_page); TRACE("active_page %d\n", psInfo->active_page);
if (psInfo->active_page < 0) if (psInfo->active_page < 0)
...@@ -1787,8 +1783,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam) ...@@ -1787,8 +1783,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam)
*/ */
static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam) static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndPage; HWND hwndPage;
PSHNOTIFY psn; PSHNOTIFY psn;
int i; int i;
...@@ -1831,8 +1826,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam) ...@@ -1831,8 +1826,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
*/ */
static void PROPSHEET_Help(HWND hwndDlg) static void PROPSHEET_Help(HWND hwndDlg)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndPage; HWND hwndPage;
PSHNOTIFY psn; PSHNOTIFY psn;
...@@ -1855,8 +1849,7 @@ static void PROPSHEET_Help(HWND hwndDlg) ...@@ -1855,8 +1849,7 @@ static void PROPSHEET_Help(HWND hwndDlg)
static void PROPSHEET_Changed(HWND hwndDlg, HWND hwndDirtyPage) static void PROPSHEET_Changed(HWND hwndDlg, HWND hwndDirtyPage)
{ {
int i; int i;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("\n"); TRACE("\n");
if (!psInfo) return; if (!psInfo) return;
...@@ -1888,8 +1881,7 @@ static void PROPSHEET_UnChanged(HWND hwndDlg, HWND hwndCleanPage) ...@@ -1888,8 +1881,7 @@ static void PROPSHEET_UnChanged(HWND hwndDlg, HWND hwndCleanPage)
int i; int i;
BOOL noPageDirty = TRUE; BOOL noPageDirty = TRUE;
HWND hwndApplyBtn = GetDlgItem(hwndDlg, IDC_APPLY_BUTTON); HWND hwndApplyBtn = GetDlgItem(hwndDlg, IDC_APPLY_BUTTON);
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("\n"); TRACE("\n");
if ( !psInfo ) return; if ( !psInfo ) return;
...@@ -1961,8 +1953,7 @@ static void PROPSHEET_PressButton(HWND hwndDlg, int buttonID) ...@@ -1961,8 +1953,7 @@ static void PROPSHEET_PressButton(HWND hwndDlg, int buttonID)
*/ */
static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg) static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndPage; HWND hwndPage;
PSHNOTIFY psn; PSHNOTIFY psn;
BOOL res = FALSE; BOOL res = FALSE;
...@@ -2005,7 +1996,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, ...@@ -2005,7 +1996,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
HPROPSHEETPAGE hpage HPROPSHEETPAGE hpage
) )
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
HWND hwndHelp = GetDlgItem(hwndDlg, IDHELP); HWND hwndHelp = GetDlgItem(hwndDlg, IDHELP);
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
...@@ -2120,8 +2111,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, ...@@ -2120,8 +2111,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
static void PROPSHEET_SetCurSelId(HWND hwndDlg, int id) static void PROPSHEET_SetCurSelId(HWND hwndDlg, int id)
{ {
int idx; int idx;
PropSheetInfo* psInfo = PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
(PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
idx = PROPSHEET_FindPageByResId(psInfo, id); idx = PROPSHEET_FindPageByResId(psInfo, id);
if (idx < psInfo->nPages ) if (idx < psInfo->nPages )
...@@ -2154,8 +2144,8 @@ static void PROPSHEET_SetTitleA(HWND hwndDlg, DWORD dwStyle, LPCSTR lpszText) ...@@ -2154,8 +2144,8 @@ static void PROPSHEET_SetTitleA(HWND hwndDlg, DWORD dwStyle, LPCSTR lpszText)
*/ */
static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText) static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
WCHAR szTitle[256]; WCHAR szTitle[256];
TRACE("%s (style %08x)\n", debugstr_w(lpszText), dwStyle); TRACE("%s (style %08x)\n", debugstr_w(lpszText), dwStyle);
if (HIWORD(lpszText) == 0) { if (HIWORD(lpszText) == 0) {
...@@ -2185,7 +2175,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText) ...@@ -2185,7 +2175,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
*/ */
static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText) static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
TRACE("'%s'\n", lpszText); TRACE("'%s'\n", lpszText);
...@@ -2214,7 +2204,7 @@ static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText) ...@@ -2214,7 +2204,7 @@ static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
*/ */
static void PROPSHEET_SetFinishTextW(HWND hwndDlg, LPCWSTR lpszText) static void PROPSHEET_SetFinishTextW(HWND hwndDlg, LPCWSTR lpszText)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
TRACE("%s\n", debugstr_w(lpszText)); TRACE("%s\n", debugstr_w(lpszText));
...@@ -2247,7 +2237,7 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg, ...@@ -2247,7 +2237,7 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
int i = 0; int i = 0;
HWND hwndPage; HWND hwndPage;
LRESULT msgResult = 0; LRESULT msgResult = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
while ((i < psInfo->nPages) && (msgResult == 0)) while ((i < psInfo->nPages) && (msgResult == 0))
{ {
...@@ -2267,8 +2257,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg, ...@@ -2267,8 +2257,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg,
HPROPSHEETPAGE hpage) HPROPSHEETPAGE hpage)
{ {
PropPageInfo * ppi; PropPageInfo * ppi;
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
TCITEMW item; TCITEMW item;
LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage; LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
...@@ -2329,8 +2318,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg, ...@@ -2329,8 +2318,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
int index, int index,
HPROPSHEETPAGE hpage) HPROPSHEETPAGE hpage)
{ {
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
PropPageInfo* oldPages; PropPageInfo* oldPages;
...@@ -2439,8 +2427,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg, ...@@ -2439,8 +2427,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
*/ */
static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags) static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndBack = GetDlgItem(hwndDlg, IDC_BACK_BUTTON); HWND hwndBack = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON); HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
...@@ -2543,8 +2530,7 @@ static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, int iPageIndex, LPCSTR ps ...@@ -2543,8 +2530,7 @@ static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, int iPageIndex, LPCSTR ps
static LRESULT PROPSHEET_HwndToIndex(HWND hwndDlg, HWND hPageDlg) static LRESULT PROPSHEET_HwndToIndex(HWND hwndDlg, HWND hPageDlg)
{ {
int index; int index;
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("(%p, %p)\n", hwndDlg, hPageDlg); TRACE("(%p, %p)\n", hwndDlg, hPageDlg);
...@@ -2560,8 +2546,7 @@ static LRESULT PROPSHEET_HwndToIndex(HWND hwndDlg, HWND hPageDlg) ...@@ -2560,8 +2546,7 @@ static LRESULT PROPSHEET_HwndToIndex(HWND hwndDlg, HWND hPageDlg)
*/ */
static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex) static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex)
{ {
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("(%p, %d)\n", hwndDlg, iPageIndex); TRACE("(%p, %d)\n", hwndDlg, iPageIndex);
if (iPageIndex<0 || iPageIndex>=psInfo->nPages) { if (iPageIndex<0 || iPageIndex>=psInfo->nPages) {
WARN("%d out of range.\n", iPageIndex); WARN("%d out of range.\n", iPageIndex);
...@@ -2576,8 +2561,7 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex) ...@@ -2576,8 +2561,7 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex)
static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage) static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage)
{ {
int index; int index;
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("(%p, %p)\n", hwndDlg, hPage); TRACE("(%p, %p)\n", hwndDlg, hPage);
...@@ -2593,8 +2577,7 @@ static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage) ...@@ -2593,8 +2577,7 @@ static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage)
*/ */
static LRESULT PROPSHEET_IndexToPage(HWND hwndDlg, int iPageIndex) static LRESULT PROPSHEET_IndexToPage(HWND hwndDlg, int iPageIndex)
{ {
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("(%p, %d)\n", hwndDlg, iPageIndex); TRACE("(%p, %d)\n", hwndDlg, iPageIndex);
if (iPageIndex<0 || iPageIndex>=psInfo->nPages) { if (iPageIndex<0 || iPageIndex>=psInfo->nPages) {
WARN("%d out of range.\n", iPageIndex); WARN("%d out of range.\n", iPageIndex);
...@@ -2610,8 +2593,7 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId) ...@@ -2610,8 +2593,7 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId)
{ {
int index; int index;
LPCPROPSHEETPAGEW psp; LPCPROPSHEETPAGEW psp;
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("(%p, %d)\n", hwndDlg, iPageId); TRACE("(%p, %d)\n", hwndDlg, iPageId);
for (index = 0; index < psInfo->nPages; index++) { for (index = 0; index < psInfo->nPages; index++) {
psp = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage; psp = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
...@@ -2627,8 +2609,7 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId) ...@@ -2627,8 +2609,7 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId)
*/ */
static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex) static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex)
{ {
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
LPCPROPSHEETPAGEW psp; LPCPROPSHEETPAGEW psp;
TRACE("(%p, %d)\n", hwndDlg, iPageIndex); TRACE("(%p, %d)\n", hwndDlg, iPageIndex);
if (iPageIndex<0 || iPageIndex>=psInfo->nPages) { if (iPageIndex<0 || iPageIndex>=psInfo->nPages) {
...@@ -2647,8 +2628,7 @@ static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex) ...@@ -2647,8 +2628,7 @@ static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex)
*/ */
static LRESULT PROPSHEET_GetResult(HWND hwndDlg) static LRESULT PROPSHEET_GetResult(HWND hwndDlg)
{ {
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
return psInfo->result; return psInfo->result;
} }
...@@ -2693,8 +2673,7 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psI ...@@ -2693,8 +2673,7 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psI
static void PROPSHEET_CleanUp(HWND hwndDlg) static void PROPSHEET_CleanUp(HWND hwndDlg)
{ {
int i; int i;
PropSheetInfo* psInfo = (PropSheetInfo*) RemovePropW(hwndDlg, PropSheetInfo* psInfo = RemovePropW(hwndDlg, PropSheetInfoStr);
PropSheetInfoStr);
TRACE("\n"); TRACE("\n");
if (!psInfo) return; if (!psInfo) return;
...@@ -2818,8 +2797,7 @@ static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode) ...@@ -2818,8 +2797,7 @@ static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode)
*/ */
INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh) INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR, PropSheetInfo* psInfo = GlobalAlloc(GPTR, sizeof(PropSheetInfo));
sizeof(PropSheetInfo));
UINT i, n; UINT i, n;
const BYTE* pByte; const BYTE* pByte;
...@@ -2860,8 +2838,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh) ...@@ -2860,8 +2838,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
*/ */
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh) INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR, PropSheetInfo* psInfo = GlobalAlloc(GPTR, sizeof(PropSheetInfo));
sizeof(PropSheetInfo));
UINT i, n; UINT i, n;
const BYTE* pByte; const BYTE* pByte;
...@@ -3100,7 +3077,7 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage) ...@@ -3100,7 +3077,7 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
*/ */
static BOOL PROPSHEET_IsDialogMessage(HWND hwnd, LPMSG lpMsg) static BOOL PROPSHEET_IsDialogMessage(HWND hwnd, LPMSG lpMsg)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
TRACE("\n"); TRACE("\n");
if (!psInfo || (hwnd != lpMsg->hwnd && !IsChild(hwnd, lpMsg->hwnd))) if (!psInfo || (hwnd != lpMsg->hwnd && !IsChild(hwnd, lpMsg->hwnd)))
...@@ -3166,8 +3143,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID) ...@@ -3166,8 +3143,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
if (wID == IDOK) if (wID == IDOK)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
PropSheetInfoStr);
/* don't overwrite ID_PSRESTARTWINDOWS or ID_PSREBOOTSYSTEM */ /* don't overwrite ID_PSRESTARTWINDOWS or ID_PSREBOOTSYSTEM */
if (psInfo->result == 0) if (psInfo->result == 0)
...@@ -3216,7 +3192,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID) ...@@ -3216,7 +3192,7 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
*/ */
static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
PAINTSTRUCT ps; PAINTSTRUCT ps;
HDC hdc, hdcSrc; HDC hdc, hdcSrc;
BITMAP bm; BITMAP bm;
...@@ -3537,7 +3513,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3537,7 +3513,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_COMMAND: case WM_COMMAND:
if (!PROPSHEET_DoCommand(hwnd, LOWORD(wParam))) if (!PROPSHEET_DoCommand(hwnd, LOWORD(wParam)))
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr); PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
if (!psInfo) if (!psInfo)
return FALSE; return FALSE;
...@@ -3577,8 +3553,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3577,8 +3553,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSM_GETCURRENTPAGEHWND: case PSM_GETCURRENTPAGEHWND:
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
PropSheetInfoStr);
HWND hwndPage = 0; HWND hwndPage = 0;
if (!psInfo) if (!psInfo)
...@@ -3642,8 +3617,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3642,8 +3617,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSM_RESTARTWINDOWS: case PSM_RESTARTWINDOWS:
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
PropSheetInfoStr);
if (!psInfo) if (!psInfo)
return FALSE; return FALSE;
...@@ -3657,8 +3631,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -3657,8 +3631,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSM_REBOOTSYSTEM: case PSM_REBOOTSYSTEM:
{ {
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
PropSheetInfoStr);
if (!psInfo) if (!psInfo)
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment