|
我的代码也是这样写的,可是不起作用;
hMenu = CommandBar_GetMenu(GetDlgItem(hwnd, 0), 0);
HWND heidt;
long style;
heidt = GetDlgItem(hwnd, EBOOK_EDITID);
style = GetWindowLong(heidt, GWL_STYLE);
if(pData->bWrap)
{
pData->bWrap = FALSE;
CheckMenuItem(hMenu, ID_MENUWRAP, MF_UNCHECKED);
style |= WS_HSCROLL;
}
else
{
pData->bWrap = TRUE;
CheckMenuItem(hMenu, ID_MENUWRAP, MF_CHECKED);
style &= ~WS_HSCROLL;
}
SetWindowLong(heidt, GWL_STYLE, style);
SetWindowPos(heidt, 0, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED); |
|