 Klaus Müller | hello everyone together, I komm to Time not further and quäle me now already some days. If one whom untrigen code executing and on lay out clicking, should really the two values from whom Spinedits read and be so one hnewpic created go. The problem is now but not The values read go separate something. the whole geschiet in Proc NEUESPROJEKT what have I already erfolglos ausprobiert?: -Group boxes lane and everything aud the Dialogfeld -dialog lane and everything on %HWnd -replace the SpinEdits against normal Edits
Vielen Thanks Schonmal for Help. Greeting Thomas
here the code on one minimum minimizes:
{$iq}
Declare anzeige&
cls
NEUESPROJEKT()
DeleteObject anzeige&
end
Proc NEUESPROJEKT
var e%=0//preparing the hauptunterschleife
//construction the fensters
var dlg& = Create("Dialog",%HWnd,"Neues Projekt",(%MaxX-200)/2,(%MaxY-285)/2,200,285)
var boxA& = Create("GroupBox",dlg&,"Kartenname:",5,0,185,45)
var editA& = Create("Edit",boxA&,"neueKarte",5,15,175,25)
var boxB& = Create("GroupBox",dlg&,"Breite: (*100px)",5,50,185,45)
var editB& = Create("SpinEdits",boxB&,"50;5;500",5,15,175,25)//FALSCHER WERT NUMMER 1
var boxC& = Create("GroupBox",dlg&,"Höhe: (*100px)",5,100,185,45)
var editC& = Create("SpinEdits",boxC&,"20;2;200",5,15,175,25)//FALSCHER WERT NUMMER 2
var boxD& = Create("GroupBox",dlg&,"Texturkarte",5,150,185,45)
var editD& = Create("Edit",boxD&,"",5,15,140,25)
var butD& = Create("Button",boxD&,"...",150,15,30,25)
var endofnew& = Create("Button",dlg&,"Anlegen",5,200,185,25)
var abortofnew& = Create("Button",dlg&,"Abbrechen",5,230,185,25)
//hauptunterschleife
While e% = 0
If GetFocus(endofnew&)//ANLEGEN
e%=5
ElseIf GetFocus(abortofnew&)//ABBRECHEN
MessageBox("Wollen tappt im dunkeln Cancel?","FRAGE",4+32+0+262144)
If %Button = 6//[Yes]
e% = 6
EndIf
EndIf
EndWhile
If e%=5
var high! = Int(GetText$(editC&))//*100
var wide! = Int(GetText$(editB&))//*100
var cover$ = GetText$(editA&)
var texturkarte$ = GetText$(editD&)
MessageBox(Str$(high!),Str$(wide!),4096)//Why incorrect values?
anzeige& = Create("hNewPic", wide!, high!, RGB(255,150,150))
MessageBox("Daten get angelegt","",4096)
EndIf
e%=1 //important so programmhauptschleife moreover runs
DestroyWindow(dlg&)
ENDPROC
|
|