ON_COMMAND(ID_DRAW_LINE,line)
ON_COMMAND(ID_DRAW_RECT,rect)
ON_COMMAND(ID_DRAW_ROUND_RECT,round_rect)
ON_COMMAND(ID_DRAW_CIRCLE,circle)
ON_COMMAND(ID_DRAW_CURVE,curve)
我们有消息映射,在添加消息映射处理函数
void line()
{
::MessageBox(0,"line","消息",MB_OK);
}
void rect()
{
::MessageBox(0,"rect","消息",MB_OK);
}
void round_rect()
{
::MessageBox(0,"round_rect","消息",MB_OK);
}
void circle()
{
::MessageBox(0,"circle","消息",MB_OK);
}
文章来源于领测软件测试网 https://www.ltesting.net/