dallas48 dallas48
关注数: 33 粉丝数: 0 发帖数: 1,805 关注贴吧数: 2
谁能帮忙看下随机数对话框程序的问题? #include "stdafx.h" #include <windows.h> #include <windowsx.h> #include "resource.h" #include "MainDlg.h" #include "time.h" #include "string.h" #include "malloc.h"     BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg,WPARAM wParam, LPARAM lParam) {        switch(uMsg)     {         HANDLE_MSG(hWnd, WM_INITDIALOG, Main_OnInitDialog);         HANDLE_MSG(hWnd, WM_COMMAND, Main_OnCommand);        HANDLE_MSG(hWnd,WM_CLOSE,Main_OnClose);     }     return FALSE; } BOOL Main_OnInitDialog(HWND hwnd, HWNDhwndFocus, LPARAM lParam) {     return TRUE; } void Main_OnCommand(HWND hwnd, int id, HWNDhwndCtl, UINT codeNotify) {        intRandomNum(int* );        inti,a[7],countNum=-1;        TCHARstr1[10],*last_save=NULL;        RandomNum(a);                                    switch(id)     {        caseIDC_BUTTON_ALL:               {                          intsort(int*);                                           sort(a);                      for(i=0;i<7;i++)                      {                             itoa(a[i],str1,10);                             SetDlgItemText(hwnd,IDC_RED1+i,str1);                             /*IDC_RED1+1,因为定义时按钮ID是连续的,所以可以以这种方式代表IDC_RED2……*/                      }           
1 下一页