Subclass the edit control, and when WM_PASTE is received:
OpenClipboard
GetClipboardData
GlobalLock
Now use the returned pointer from GlobalLock to check for non numeric characters. If a non number is found, inform user then:
GlobalUnlock
CloseClipboard
and return 0 from the callback to prevent pasting the data into the edit control.
If it is all numbers, then GlobalUnlock
and CLoseClipboard
and pass message on with CallWindowProc
to allow paste.