ola ... würde Pablo sagen und dir das vor den Latz knallen ... http://msdn.microsoft.com/en-us/library ... 85%29.aspxbrandelh hat geschrieben:Womit wieder bewiesen ist, wenn es gut werden soll (unabhängig von der Installation), muss man es selber machen
nach Xbase++ müsste das so aussehen
Code: Alles auswählen
CLASS MyDatePick FROM XbpStatic
...
INLINE CLASS STRUCTURE DATETIMEPICKERINFO
http://msdn.microsoft.com/en-us/library/bb761729%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS STRUCTURE NMDATETIMECHANGE
http://msdn.microsoft.com/en-us/library/bb761730%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS STRUCTURE NMDATETIMEFORMAT
http://msdn.microsoft.com/en-us/library/bb761731%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS STRUCTURE NMDATETIMEFORMATQUERY
http://msdn.microsoft.com/en-us/library/bb761732%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS STRUCTURE NMDATETIMESTRING
http://msdn.microsoft.com/en-us/library/bb761733%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS STRUCTURE NMDATETIMEWMKEYDOWN
http://msdn.microsoft.com/en-us/library/bb761734%28v=VS.85%29.aspx
END STRUCTURE
INLINE CLASS METHOD initclass()
@comctl32:InitCommonControlsEx({8,ICC_DATE_CLASSES})
_fp_SendMessageA_ := nGetProcAddress("user32","SendMessageA")
return Self
INLINE METHOD init(p1,p2,p3,p4,p5,p6)
::XbpStatic:init(p1,p2,p3,p4,p5,p6)
return Self
INLINE METHOD Create(p1,p2,p3,p4,p5,p6)
::clipChildren := .T.
::XbpStatic:Create(p1,p2,p3,p4,p5,p6)
::hXbp := ::GetHWnd()
ot4xb_subclasswindow(::hXbp,Self,,"xbp_wndproc")
@user32:SendMessageA(::hXbp,WM_USER+1,0,0)
return Self
INLINE METHOD xbp_wndproc(hWnd,nMsg,wp,lp,ctx)
local rc,n
if nMsg == (WM_USER + 1 )
::hDPick := @User32:CreateWindowExA(0,; // extended styles
DATETIMEPICK_CLASS,; // control 'class' name "SysDateTimePick32"
"DateTime",; // control caption
nOr(WS_BORDER,WS_CHILD,WS_VISIBLE,DTS_SHOWNONE),; // wnd Style
20,50,220,20,; // position: left,top,width,height
::hXbp,; // parent window handle
4711,; // control's ID
AppInstance(),; // instance Ot4Xb -> GetModuleHandleA()
0) // user defined info
ot4xb_subclasswindow(::DPick,Self,,"DatePick_wndproc")
elseif nMsg == WM_SIZE
// hier resize
elseif nMsg == WM_NOTIFY
// hier ::_HandleListViewNotify_()
end
return NIL
ja angedeutet das man damit "native" Controls selbst machen kann.
die M$C*.OCX sind "überflüssig" als "Wrapper" ! ( und ausserdem langsam ... )
Für "Date and Time Picker" sieht das so aus
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Macros, Messages, Notifications und Structure findet man hier
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
viel Spass
Nachtrag :
Korrektur fehlendes "return Self" in init()
CreateWindowEx() -> @User32:CreateWindowExA()
und "DateTime) -> "DateTime"