void CMFCDemoDlg::OnClickedGetrand()
{
    wchar_t str[10];
    //srand((unsigned)time(NULL));
    int num = rand() ;
    _itow_s(num, str, 10);
    GetDlgItem(IDC_Rand)->SetWindowTextW(str);
}

_itow 与_wtoi 实现文本值与int值的转化

 

相关文章:

  • 2022-01-26
  • 2021-08-14
  • 2021-07-27
  • 2022-12-23
  • 2021-12-18
  • 2021-06-28
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2021-07-22
  • 2021-09-28
  • 2021-11-26
  • 2022-02-09
  • 2022-01-11
  • 2021-07-22
相关资源
相似解决方案