| |
|
|
Rainer Hoefs | Hello together, need time again Your Help, I not any more moreover white.
In one Program stand 2 DateEdits next to each other. After selection the Datums in DateEdit1 should the same date (later 1 day plus) tuned go.
though reacted the IF CLICKED DateEdit1% not around the suitable commands to execute.
in a Why.
for each Help grateful.
here the code:
Declare dateedit1%, dateedit2%
Def GetStockObject(1) !"GDI32","GetStockObject"
Def GetSysColor(1) !"USER32","GetSysColor"
Def GetParent(1) !"USER32","GetParent"
Def &COLOR_BTNFACE $F
Def &DEFAULT_GUI_FONT $11
Proc CreateElements
Window Style 26 | 512 | 2048
Window Title "Arbeitsfenster"
Window 280, 0 - 318, 188
Cls GetSysColor(&COLOR_BTNFACE)
SetDialogFont GetStockObject(&DEFAULT_GUI_FONT)
dateedit1% = Create("DateEdit", %hwnd, Date$(0), 24, 32, 120, 24)
dateedit2% = Create("DateEdit", %hwnd, Date$(0), 160, 32, 120, 24)
ENDPROC
Proc MainLoop
User Messages 16
ShowWindow(%hwnd, 1)
While 1
WaitInput
Case %umessage = 16 : BREAK
If Clicked(dateedit1%)'#window
SetText dateedit2%,GetText$(dateedit1%)
ElseIf Clicked(dateedit2%)'#window
Print GetText$(dateedit2%)+ "Von DateEdit1% übernommen!"
EndIf
EndWhile
ENDPROC
Proc Main
CreateElements
MainLoop
ENDPROC
Main
End
|
|
|
| |
|
|
|
H.Brill | this is the Problem with the zusammengesetzten Controls, How about the SpinEdits too.
Perhaps helps you that here moreover :
$H windows.ph
$H Messages.ph
$H commctrl.ph
Declare OldTest&,end%
Struct POINT = \
x&, \
y&
Struct SYSTEMTIME = \
wYear%, \
wMonth%, \
wDayOfWeek%, \
wDay%, \
wHour%, \
wMinute%, \
wSecond%, \
wMilliseconds%
Struct MCHITTESTINFO = \
cbSize&, \
pt!POINT, \
uHit&, \
st!SYSTEMTIME
Proc Get_MonthCalHit
Declare DATA#, HIT%
Dim DATA#,MCHITTESTINFO
DATA#.cbSize& = SizeOf(DATA#)
DATA#.pt!x& = %MouseX - 500
DATA#.pt!y& = %MouseY - 150
Var QT% = SendMessage(KAL1&,$100E,0,DATA#)' $100E = $1000 + 14 = HITTEST
Var TEXT$ = st$(DATA#.st!wDay%)+"."+st$(DATA#.st!wMonth%)+"."+st$(DATA#.st!wYear%)
Messagebox(TEXT$,"HITFLAG "+Str $(QT%),$40000)
Dispose DATA#
RETURN QT%
ENDPROC
WINDOW 0,0 - 800,600
Var KAL1& = Control("SysMonthCal32", "Kalender", 1342177280, 500, 150, 180, 406, %HWND, 0, %hInstance, 0)
WhileNot end%
Waitinput
If %Key = 2
end% = 1
Else
Get_MonthCalHit
EndIf
EndWhile
|
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 06/14/16 ▲ |
|
|
|
|
Rainer Hoefs | Hello H. Brill,
many Thanks for your Help.
unfortunately is it for a with Create("DateEdit",.....) control not The Solution.
naturally reacted this example likewise on one DateEdit, but unfortunately becomes the control weder to Datumsauswahl aufgeklappt, yet becomes (logischerweise) one date transfer, because one quite keines select can. at that Anklicken comes immediate The Messagebox and past is it.
for a so large Calendar, integrally aufgeklappter month or 2 How in Your example, is in the dialog no Space.
nevertheless thankyou.
Rainer |
|
|
| |
|
|