Research Article

Development of the Object-Oriented Dynamic Simulation Models Using Visual C++ Freeware

Algorithm 4

The resource script file script.rc for the modal dialog.
  1.4#include<windows.h>
  2.4#include"resource.h"
  3.4
  4.4MYDIALOG DIALOGEX 0, 0, zW, yW
  5.4STYLE DS_MODALFRAME|WS_CAPTION|WS_SYSMENU| WS_MINIMIZEBOX
  6.4CAPTION "MyDialogWindow"
  7.4FONT 8, "MS Shell Dlg"
  8.4
  9.4PUSHBUTTON "Create a new particle", IDB_NewParticle,
10.4                        210, 363, 70, 14
11.4PUSHBUTTON "Confirm",  IDB_Confirm,    310, 400, 50, 14
12.4PUSHBUTTON "Run",     IDB_Run,        50, 430, 50, 14
13.4PUSHBUTTON "Pause",    IDB_Pause,      135, 430, 50, 14
14.4PUSHBUTTON "Cancel",      IDB_Cancel      220, 430, 50, 14
15.4EDITTEXT IDC_EDIT_W0      150, 353, 40, 15, ES_CENTER
16.4EDITTEXT IDC_EDIT_kVy     150, 375, 40, 15, ES_CENTER
17.4EDITTEXT IDC_EDIT_PartNum390,363,25,15, ES_CENTER|ES_READONLY
18.4EDITTEXT IDC_EDIT_ParticleToModelessBox  270,400,30,15,ES_CENTER
19.4EDITTEXT IDC_EDIT_Sleep570,400,40,15, ES_CENTER|ES_READONLY
20.4LISTBOX IDC_ListBox   550, 70, 200, 250, WS_VSCROLL
21.4CONTROL "" IDC_UpDown, "msctls_updown32",
22.4         UDS_SETBUDDYINT|UDS_ALIGNRIGHT, 0, 0, 0, 0
23.4CONTROL "" IDC_Trackbar, "msctls_trackbar32", WS_VISIBLE|
24.4              WS_TABSTOP|TBS_HORZ, 400, 400, 150, 30
25.4LTEXT "Set initial datanfor a new particle:", 99, 50,360,65,20
26.4LTEXT "W0 = ",  100, 118, 356, 30, 10
27.4LTEXT "Vy/Vz = ",101, 118, 378, 30, 10
28.4LTEXT "Total number Nnof created particles:", 102,
29.4                        315, 360, 70, 20
30.4LTEXT "Indicate the particle ( from 0 to N-1 )
31.4   whose data you want to display: ", 103, 50, 400, 220, 10
32.4LTEXT "Displaying data of the first selected particle:", 104,
33.4                       550, 55, 160, 10
34.4LTEXT "0 V",105,           150,58, 25, 10
35.4LTEXT "-1000 V", 106,           360,58, 25, 10
36.4LTEXT "Simulation speed", 107,       445, 385, 70, 10
37.4LTEXT "Increase”, 108,            410, 420, 35, 10
38.4LTEXT Slowdown", 109,            508, 420, 35, 10
39.4LTEXT "Delay, ms", 110,           570, 385,  40, 10
40.4LTEXT "z, m", 111,               463, 169,15, 10
41.4LTEXT "y, m", 112,             60,52,15, 10
42.4LTEXT "0", 113,                 70, 162,5, 10
43.4//Two sets of LTEXT controls for displaying the numerical
44.4//values for both y-gridlines and z-tick marks of the plot.
45.4//Relating to the y-gridline:
46.4LTEXT "0.01", 114,    62, 129, 15, 10
47.4...
48.4LTEXT "-0.03", 119,    60, 255, 16, 10
49.4//Relating to the z-tick marks:
50.4LTEXT "0.00", 120,    73, 288, 15, 10
51.4...
52.4LTEXT "0.11", 131,    438, 288, 15, 10
53.4