发新话题
打印

TEdit内实现右对齐

TEdit内实现右对齐

转载CSDN的,
DWORD ExStyle;
ExStyle = DWORD(::GetWindowLong(Edit1->Handle, GWL_EXSTYLE)) &(~WS_EX_RIGHT) &(~WS_EX_RTLREADING) &(~WS_EX_LEFTSCROLLBAR);
ExStyle =ExStyle | WS_EX_RIGHT;
::SetWindowLong(Edit1->Handle, GWL_EXSTYLE, ExStyle );
Edit1->Invalidate();

TOP

发新话题