mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
GetDlgItem: Change to WINE's implementation as ours was incorrect. Remove function GetDlgItemEnumProc and struct GETDLGITEMINFO as they are no longer needed. Fixes drawing issues in Open and Save dialogs for OpenOffice.
svn path=/trunk/; revision=43392
This commit is contained in:
@@ -104,13 +104,6 @@ typedef struct
|
||||
BOOL dialogEx;
|
||||
} DLG_TEMPLATE;
|
||||
|
||||
/* GetDlgItem structure */
|
||||
typedef struct
|
||||
{
|
||||
INT nIDDlgItem;
|
||||
HWND control;
|
||||
} GETDLGITEMINFO;
|
||||
|
||||
/* CheckRadioButton structure */
|
||||
typedef struct
|
||||
{
|
||||
@@ -1461,22 +1454,6 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPWSTR str, INT len,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDlgItemEnumProc
|
||||
*
|
||||
* Callback for GetDlgItem
|
||||
*/
|
||||
BOOL CALLBACK GetDlgItemEnumProc (HWND hwnd, LPARAM lParam )
|
||||
{
|
||||
GETDLGITEMINFO * info = (GETDLGITEMINFO *)lParam;
|
||||
if(info->nIDDlgItem == GetWindowLongPtrW( hwnd, GWL_ID ))
|
||||
{
|
||||
info->control = hwnd;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
@@ -2029,13 +2006,16 @@ GetDlgItem(
|
||||
HWND hDlg,
|
||||
int nIDDlgItem)
|
||||
{
|
||||
GETDLGITEMINFO info;
|
||||
info.nIDDlgItem = nIDDlgItem;
|
||||
info.control = 0;
|
||||
if(hDlg && !EnumChildWindows(hDlg, (WNDENUMPROC)&GetDlgItemEnumProc, (LPARAM)&info))
|
||||
return info.control;
|
||||
else
|
||||
return 0;
|
||||
int i;
|
||||
HWND *list = WIN_ListChildren(hDlg);
|
||||
HWND ret = 0;
|
||||
|
||||
if (!list) return 0;
|
||||
|
||||
for (i = 0; list[i]; i++) if (GetWindowLongPtrW(list[i], GWLP_ID) == nIDDlgItem) break;
|
||||
ret = list[i];
|
||||
HeapFree(GetProcessHeap(), 0, list);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user