상우 님이 쓰신 글 :
: 안녕하세요.
: TEdit 컴포넌트에서 KeyPress 이벤트에서 숫자만을 통과 시키고 영문자는 차단하려 합니다.
: TMaskEdit 를 사용하지 않고 처리 하려 합니다.
: 어떻게 해야 하는지요?
//-----------------------------------------------------------------------------
//in source...
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
//get the current style flags
LONG dwStyle = GetWindowLong(Edit1->Handle, GWL_STYLE);
//add ES_NUMBER to these
SetWindowLong(Edit1->Handle, GWL_STYLE, dwStyle | ES_NUMBER);
}
" http://bcbcaq.freeservers.com/"에서 퍼왔습니다.
|