下載本節(jié)例子程序和源代碼 (3.91 KB) |
Rand_Number = (Rand_Seed * X + Y) mod Z |
invoke iRand, 1, 100 |
#include "resource.h" #define IDC_BUTTON_GENERATE 3000 #define IDC_EDIT_FIRST 3001 #define IDC_EDIT_SECOND 3002 #define IDC_STATIC -1 LC_DIALOG DIALOGEX 10, 10, 210, 60 STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Rand Number Generator by LC, 2002-11-21" FONT 8, "MS Sans Serif" BEGIN LTEXT "Please input the range below:", IDC_STATIC, 5, 5, 200, 10 RTEXT "From:", IDC_STATIC, 10, 20, 20, 10 EDITTEXT IDC_EDIT_FIRST, 30, 20, 70, 10, ES_AUTOHSCROLL | NOT WS_BORDER, WS_EX_STATICEDGE RTEXT "To:", IDC_STATIC, 110, 20, 20, 10 EDITTEXT IDC_EDIT_SECOND, 130, 20, 70, 10, ES_AUTOHSCROLL | NOT WS_BORDER, WS_EX_STATICEDGE DEFPUSHBUTTON "Generate(&G)", IDC_BUTTON_GENERATE, 70, 40, 50, 13, BS_FLAT | BS_CENTER END |
聯(lián)系客服