Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Friday Night Football...
#1
So I am interested in starting a program that will allow two different users in different studios record scores from area high school games and then post those games to a website.

My first thoughts are to use CreateControl to add new score cards to a dialog...from there on en_change data in edit boxes would be saved to a file on a network drive. Or is there a better theory all together?

I guess the questions I have are as follows...
1. How do I keep from problems of both users writing data simultaneously and corrupting data?
2. How do I keep the edit boxes straight? I understand how to create an index with CreateControl, but how would I use something like EN_CHANGE in that situation?

Thanks in advance.
Jimmy Vig.

Here is and example of the dialog format:
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "4 5 6 7 8 9 10 11 12 13 14 15 16 17"
str cb4 cb5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17
cb4="&Select Team[]Team A[]Team B[]Team C[]Team D[]Team E[]Team F[]Team G[]Team H"
cb5="&Select Team[]Team A[]Team B[]Team C[]Team D[]Team E[]Team F[]Team G[]Team H"
str a b
if(!ShowDialog("Friday_Night_Football" &Friday_Night_Football &controls)) ret
;BEGIN DIALOG
;0 "" 0x90ED0A44 0x100 0 0 387 164 "Friday Night Football Scores"
;1 Button 0x54030001 0x4 328 16 48 14 "Close"
;3 Button 0x54032000 0x0 328 32 48 14 "Add New"
;4 ComboBox 0x54230243 0x0 4 16 96 213 ""
;5 ComboBox 0x54230243 0x0 4 32 96 213 ""
;6 Edit 0x54032000 0x200 100 16 32 14 ""
;7 Edit 0x54032000 0x200 100 32 32 14 ""
;8 Edit 0x54032000 0x200 136 16 32 14 ""
;9 Edit 0x54032000 0x200 136 32 32 14 ""
;10 Edit 0x54032000 0x200 172 16 32 14 ""
;11 Edit 0x54032000 0x200 172 32 32 14 ""
;12 Edit 0x54032000 0x200 208 16 32 14 ""
;13 Edit 0x54032000 0x200 208 32 32 14 ""
;14 Edit 0x54032000 0x200 244 16 32 14 ""
;15 Edit 0x54032000 0x200 244 32 32 14 ""
;16 Edit 0x54032000 0x200 280 16 32 14 ""
;17 Edit 0x54032000 0x200 280 32 32 14 ""
;18 Static 0x54000000 0x0 108 4 16 16 "1/4"
;19 Static 0x54000000 0x0 144 4 16 21 "2/4"
;20 Static 0x54000000 0x0 180 4 16 16 "1/2"
;21 Static 0x54000000 0x0 216 4 16 16 "3/4"
;22 Static 0x54000000 0x0 252 4 16 21 "4/4"
;23 Static 0x54000000 0x0 284 4 24 13 "Final"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_SELENDOK<<16|4
,_i=CB_SelectedItem(lParam)
,a.getwintext(id(4 hDlg))
,b.getwintext(id(5 hDlg))
,out a
,out b
,if a=b
,,if a="Select Team"
,,,ret
,,mes "The Team cannot play itself!" "Friday Night Football"
,case CBN_SELENDOK<<16|5
,_i=CB_SelectedItem(lParam)
,a.getwintext(id(4 hDlg))
,b.getwintext(id(5 hDlg))
,out b
,out a
,if a=b
,,if a="Select Team"
,,,ret
,,mes "The Team cannot play itself!" "Friday Night Football"
,case IDOK
,case IDCANCEL
ret 1
#2
I don't like adding many controls at run time. Better use a grid control.
#3
Gintaras Wrote:Better use a grid control.

I think you mean 'grid-iron' control.
:lol: :lol: :lol: :lol: :lol: :lol:

I KILL ME!!!

i guess more of an American thing 80))
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 2 Guest(s)