comctl32: Assign to structs instead of using memcpy.
This commit is contained in:
parent
ec086f77e3
commit
8d555e825b
|
@ -243,7 +243,7 @@ static INT COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LP
|
|||
} else {
|
||||
NMCBEENDEDITA neea;
|
||||
|
||||
memcpy (&neea.hdr, &neew->hdr, sizeof(NMHDR));
|
||||
neea.hdr = neew->hdr;
|
||||
neea.fChanged = neew->fChanged;
|
||||
neea.iNewSelection = neew->iNewSelection;
|
||||
WideCharToMultiByte (CP_ACP, 0, wstr, -1, neea.szText, CBEMAXSTRLEN, 0, 0);
|
||||
|
|
|
@ -2423,7 +2423,7 @@ REBAR_MoveBand (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
/* save one to be moved */
|
||||
memcpy (&holder, &oldBands[uFrom], sizeof(REBAR_BAND));
|
||||
holder = oldBands[uFrom];
|
||||
|
||||
/* close up rest of bands (pseudo delete) */
|
||||
if (uFrom < infoPtr->uNumBands - 1) {
|
||||
|
@ -2442,7 +2442,7 @@ REBAR_MoveBand (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
/* set moved band */
|
||||
memcpy (&infoPtr->bands[uTo], &holder, sizeof(REBAR_BAND));
|
||||
infoPtr->bands[uTo] = holder;
|
||||
|
||||
/* post copy */
|
||||
if (uTo < infoPtr->uNumBands - 1) {
|
||||
|
|
|
@ -2087,7 +2087,7 @@ static void TOOLBAR_Cust_AddButton(const CUSTDLG_INFO *custInfo, HWND hwnd, INT
|
|||
|
||||
/* duplicate 'separator' button */
|
||||
btnNew = (PCUSTOMBUTTON)Alloc(sizeof(CUSTOMBUTTON));
|
||||
memcpy(btnNew, btnInfo, sizeof(CUSTOMBUTTON));
|
||||
*btnNew = *btnInfo;
|
||||
btnInfo = btnNew;
|
||||
}
|
||||
|
||||
|
@ -2370,7 +2370,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
IDC_TOOLBARBTN_LBOX, LB_GETITEMDATA, index, 0);
|
||||
}
|
||||
|
||||
memcpy (&btnInfo->btn, &nmtb.tbButton, sizeof(TBBUTTON));
|
||||
btnInfo->btn = nmtb.tbButton;
|
||||
if (!(nmtb.tbButton.fsStyle & BTNS_SEP))
|
||||
{
|
||||
if (lstrlenW(nmtb.pszText))
|
||||
|
@ -6455,7 +6455,7 @@ TOOLBAR_Paint (HWND hwnd, WPARAM wParam)
|
|||
PAINTSTRUCT ps;
|
||||
|
||||
/* fill ps.rcPaint with a default rect */
|
||||
memcpy(&(ps.rcPaint), &(infoPtr->rcBound), sizeof(infoPtr->rcBound));
|
||||
ps.rcPaint = infoPtr->rcBound;
|
||||
|
||||
hdc = wParam==0 ? BeginPaint(hwnd, &ps) : (HDC)wParam;
|
||||
|
||||
|
@ -7179,7 +7179,7 @@ static BOOL TOOLBAR_GetButtonInfo(const TOOLBAR_INFO *infoPtr, NMTOOLBARW *nmtb)
|
|||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmtba.pszText, -1,
|
||||
nmtb->pszText, nmtb->cchText);
|
||||
|
||||
memcpy(&nmtb->tbButton, &nmtba.tbButton, sizeof(TBBUTTON));
|
||||
nmtb->tbButton = nmtba.tbButton;
|
||||
bRet = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue