Re: XP skinned calendar with no skinned editor?
Posted: Wed Oct 21, 2009 6:19 pm
Nice try srod but that won't work. The themed border isn't actually supported by Windows for RichEdit controls so I'm pretty sure Fred uses an home-brew fix. What you can do is process the #WM_NCPAINT message and permit to draw the themed border.
Code: Select all
OpenWindow(0,450,200,400,453,"void",#PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
CalendarGadget(0,35,15,230,185)
PanelGadget(1,35,220,330,225)
AddGadgetItem(1,-1,"Tab #1")
EditorGadget(2,10,10,295,175)
Global lpPrevFunc
Procedure RichEditProc(hWnd,uMsg,wParam,lParam)
Select uMsg
Case #WM_NCPAINT
GetClientRect_(hwnd,crc.RECT)
hdc = GetWindowDC_(hWnd)
hPenBorder = CreatePen_(#PS_INSIDEFRAME,2,GetSysColor_(#COLOR_WINDOW))
SelectObject_(hdc,hPenBorder)
SelectObject_(hdc,GetStockObject_(#NULL_BRUSH))
Rectangle_(hdc,0,0,crc\right + 4,crc\bottom + 4)
DeleteObject_(hPenBorder)
ReleaseDC_(hwnd,hdc)
ProcedureReturn 0
EndSelect
ProcedureReturn CallWindowProc_(lpPrevFunc,hWnd,uMsg,wParam,lParam)
EndProcedure
lpPrevFunc = SetWindowLong_(GadgetID(2),#GWL_WNDPROC,@RichEditProc())
SetWindowPos_(GadgetID(2), 0, 0, 0, 0, 0,#SWP_NOSIZE | #SWP_NOMOVE | #SWP_FRAMECHANGED)
While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend