| |

VerySource

 Forgot password?
 Register
Search
Author: hailiu

The dialog edit control hexadecimal format input.

[Copy link]

4

Threads

16

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-11-28 07:00:01
| Show all posts
you should subclass your edit control and ...
case WM_CHAR:
if(wParam>='0'&&wParam<='9'||wParam>='a'&&wParam<='f')
{
        sprintf(buff,"%c",wParam);
         strcat(TempBuff,buff);
         SetWindowText(hwnd,TempBuff);
SendMessage(hwnd, EM_SETSEL,strlen(TempBuff),-1);

}
Reply

Use magic Report

0

Threads

1

Posts

68.00

Credits

Member

Rank: 2

Credits
68.00

 China

Post time: 2021-1-7 13:57:54
| Show all posts
Overload OnChar to deal with unnecessary characters.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list