topic
stringlengths
1
63
text
stringlengths
1
577k
About : tracing GDI resources
Rao, Uwe, It was a bug in Class TDialog. This is the fix <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:137r4jel]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span> nResult <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDialog<br />   ...<br />      EndDialog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, nResult <span style="color: #000000;">&#41;</span><br />      <span style="color: #B900B9;">// ::hWnd = 0  // A.L. 22/04/03     Comment this line !!!</span><br />   ...<br /> </div>[/code:137r4jel] [img:137r4jel]http&#58;//img252&#46;imageshack&#46;us/img252/7051/capturexf&#46;jpg[/img:137r4jel] Fix included for next FWH 9.11
About : tracing GDI resources
Many Thanks Mr. Antonio This is really a very important fix.
About : tracing GDI resources
There is still one Question about the BMP'S, defined for Folder-Tabs. After reopening a Dialog I can see, the 8 BMP's are doubled inside the List. Always 8 Times as BMP and 8 Times as PAL from : Dialog opened the first Time, Lines : 48 - 63 [img:19m72oom]http&#58;//www&#46;pflegeplus&#46;com/pictures/FolderTab1&#46;jpg[/img:19m72oom] Dialog opend the second Time, Lines Lines : 48 - 63 and Lines 98 - 113 [img:19m72oom]http&#58;//www&#46;pflegeplus&#46;com/pictures/FolderTab2&#46;jpg[/img:19m72oom] in Function [color=#FF0000:19m72oom]Tools[/color:19m72oom] => Line [b:19m72oom][color=#FF0000:19m72oom]584[/color:19m72oom][/b:19m72oom] ACTIVATE DIALOG oDlg CENTERED ; ON INIT SetImages(oDlg,oFld) -------------------------------- function SetImages(oDlg, oFld) local oImageList DEFINE IMAGELIST oImageList SIZE 16, 16 oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oImageList:AddMasked( TBitmap():Define( "show",, oDlg ), nRGB( 192, 192, 192 ) ) oFld:SetImageList( oImageList ) return nil Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About : tracing GDI resources
Uwe, Please modify Class TFolder Method Destroy() this way: [code=fw:3ce9szy7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TFolder<br /><br />   ...<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oImageList</span> != <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">oImageList</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span>   <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3ce9szy7] That should solve it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
About : tracing GDI resources
Antonio, Thank You very much. The Change works perfect. The Folder-Tab BMP's are not counted anymore. I still added a Main-Dialog-Counter. Brushes are excluded from the 1. Browser. Í'm working on a Solution, to show them inside a extra Browser. [img:2r0wauq4]http&#58;//www&#46;pflegeplus&#46;com/pictures/Foldtest1&#46;jpg[/img:2r0wauq4] Still 14 Positions after 3 Dialog-openings on Mainwindow-Level. [img:2r0wauq4]http&#58;//www&#46;pflegeplus&#46;com/pictures/Foldtest2&#46;jpg[/img:2r0wauq4] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About : tracing GDI resources
Uwe, Many thanks for your great feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
About ADO & MySql
Dear friends:As a christmas gift, you can read in my spanish blog[url:kez4zq7s]http&#58;//sqlcmd&#46;blogspot&#46;com/[/url:kez4zq7s]all you need to start with ADO, MySql, xHarbour andour lovely FWH.Ahhh, no DbfsEnjoy it.Merry christmas
About ADO & MySql
Dear Armando,I really appreciate your effort. I am a frequent visitor in your blog and have learned a lot from your blog regarding the usage of MySQL with FWH.RegardsAnser
About ADO & MySql
[quote="Armando":drzflxzz]Dear friends: As a christmas gift, you can read in my spanish blog [url:drzflxzz]http&#58;//sqlcmd&#46;blogspot&#46;com/[/url:drzflxzz] all you need to start with ADO, MySql, xHarbour and our lovely FWH. Ahhh, no Dbfs Enjoy it. Merry christmas[/quote:drzflxzz]ArmandoCan this be provided in English.Merry ChristmasColin
About ADO & MySql
Colin:I'm afraid not, because my english is not enought to do that. Perhaps somebody can make the translation.I'm so sorry.Regards
About BMP PNG
Guys, my doubt is quite impossible, but come to my dream.   Would you like to upload a png (obeying the transparencies image) on top of a bmp. (it's easy)   Difficult for me would be to do this in a progress, meter, or meterex know what else it.   Accepted @ x, y and 'REDEFINES'
About CheckRes()?
Hi, I want to use CheckRes() function but there is no result in checkres.txt. Is there any compiler switch for it? I use Harbour latest 2015.07 for vs2013 and fwh 1507. [code=fw:qjz9awjo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// program startup</span><br />SetResDebug<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />..<br />..<br /><span style="color: #B900B9;">// At the middle of the program ---- (Not end) ... it should be some lines.</span><br />   <br />FErase<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"checkres.txt"</span> <span style="color: #000000;">&#41;</span><br />CheckRes<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"notepad checkres.txt"</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:qjz9awjo] Result is [code=fw:qjz9awjo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">31</span>/<span style="color: #000000;">08</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">58</span>: <span style="color: #000000;">C</span>:\PrgW\Icra\IcraW.exe -- ==================================================================================================== <br /> </div>[/code:qjz9awjo] Any comments?
About CheckRes()?
Hakan, It means that your app is properly releasing all the resources <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> When checkres.txt is empty then it means all is ok
About CheckRes()?
[quote="Antonio Linares":2w5wab5m]Hakan, It means that your app is properly releasing all the resources <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> When checkres.txt is empty then it means all is ok[/quote:2w5wab5m] You are right if i call at the end of my application. I call it in the one account card of my application. at least 2 windows should be. is there any condition to add object ids into aResources array. I have suspect there are some resources.
About CheckRes()?
Hakan, > I have suspect there are some resources Why do you think so ?
About CheckRes()?
Hi Antonio, There are some procedures that works wery well. But after 1-2 hours from starting application, these procedures does not work. There is not any error. User exits the application and try to same procedures. The problems goes on. User reboot the computer, run application. There is no problem for 1-2 hours. That is the problem.
About CheckRes()?
Hakan, You can use SetResDebug( .T. ) and CheckRes() in just a portion of your app Do you allocate memory in some way in your app ? Do you manage bitmaps, fonts, etc ?
About CheckRes()?
Also, use Windows task manager to review the handles that your app is using: [img:3do78yr6]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/handles&#46;JPG[/img:3do78yr6]
About CheckRes()?
[quote="Antonio Linares":zwliok8o]Hakan, You can use SetResDebug( .T. ) and CheckRes() in just a portion of your app Do you allocate memory in some way in your app ? Do you manage bitmaps, fonts, etc ?[/quote:zwliok8o] I dont allocate any memory in my application.
About FWSavePreviewToPDF
Hello Doesn't exist a way to convert an EMF to PDF but retaining original vector, text and graphics information <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> When use the FWSavePreviewToPDF function this convert the EML to JPG and then JPG into PDF, with this we get: 1) Text in the PDF dont selectable. 2) A file sooo bigggger than source EML. Is not possible to enhance the "FWPDF" class to let create the PDF step by step and build the PDF manually from the information inside the EMF <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Regards
About FWSavePreviewToPDF
Technically it must be possible, because there is a dll called "image2pdf" from Utilitywarrior (<!-- m --><a class="postlink" href="http://www.utilitywarrior.com/">http://www.utilitywarrior.com/</a><!-- m -->) that does exactly this. It also can be integrated into Fivewin applications, but I am also still hoping, this will be possible from within Fivewin.
About FiveWin ODBC
FW, May I know those who had experienced using FiveODBC. Thanks, Jose
About FiveWin ODBC
What I mean is how's the performance, specially with MS SQL server. Thanks.
About FiveWin ODBC
It works fine, but you should upgrade to FWH 32 bits, as it offers a much better integration with the operating system.
About FiveWin ODBC
Antonio, Our base code is in Clipper 5.2. I tried to convert them to xHarbour but there are issues like Telepathy lib which don't have 32 bits version and several C codes that generates errors, when linked. I looked for 32 bit version as you suggested but Extransensory Software do not have 32 bit version of Telepathy. For now, we are trying to connect our program to SQL server for possible enhancement. I am able to connnect using FiveODBC but it returns only one record. Heres the code taken from your example. ****************** Function LS_odbc() ****************** Local oODBC := TOdbc():New "DsnEntry", "YourName", "YourPassword") If !oOdbc:lSuccess oOdbc:ShowErrorList("ODBC session not successfully initialized, aborting...") oOdbc:End() return nil Endif *oDbf := oOdbc:Query( "SELECT * FROM JOURNAL" ) Odbf := TdbOdbcDirect():New("SELECT * FROM JOURNAL WHERE JRDATE = '10/6/06' ORDER BY JRDATE, JRTIME", oOdbc) if oOdbc:IsError() oOdbc:ShowErrorList() oOdbc:aErrors := {} oDbf:End() return nil endif oDbf:Open() *oDBF:goBottom() *msginfo(str(ODbf:recNO())) *msgInfo(oDBF:jrzday) *Browse( cTitle, cListName, bNnew, bModify, bDelete, bSearch, bList ) copy to tmp Browse("Journal") return nil Note: The browse shows one record only. The tmp file contain one record only. Can we keep clipper 5.2 and accomplish FiveODBC? Just let me know if it possible. We don't need to convert to 32 bit right now since Clipper 5.2 version looks stable. Gracias, -jose
About FiveWin ODBC
Jose, Have you checked at the ODBC database that there are more than one record matching that SQL sentence ?
About FiveWin ODBC
Antonio, Thanks for the quick reply. Yes, there are over 60 rows when I querry it from SQL.
About FiveWin ODBC
Jose after line oDbf:Open() you must add oDbf:Complete() regards Eugeniusz
About FiveWin ODBC
Eugeniusz, Thanks for the hint. It works. Regards, Jose
About METRO and MDI
Hello, I have a question about METRO and using MDI With my first tests, it works but closing a child doesn't return to button-level. I used oMetro:Show(), but doesn't work. [img:35yz2jiv]http&#58;//www&#46;pflegeplus&#46;com/pictures/metrodbu1&#46;jpg[/img:35yz2jiv] Closing the Child, returns to oMWnd. How to stay inside the defined Panel ? DEFINE WINDOW oMWnd TITLE "FiveMDbu" [color=#FF0000:35yz2jiv]MDI[/color:35yz2jiv] MENU BuildMenu() STYLE nOr( WS_POPUP, WS_MAXIMIZE ) ; COLOR CLR_WHITE, CLR_GREEN oMetro := MPANEL( oMWnd:oWndClient, oMetro ) .... .... // -------------------------- static function MPANEL( oWnd, oMetro ) local oBtn[11] DEFINE METROPANEL oMetro OF oWnd TITLE "DBF-Editor 1.0" ; COLOR CLR_WHITE, CLR_GREEN ; ON CLICK oWnd:End() ... ... DEFINE METROBUTTON oBtn[2] OF oMetro ; COLOR RGB( 128, 0, 255 ),RGB( 181, 31, 60 ) ; CAPTION "Open" ; ALIGN "BOTTOMCENTER" ; BITMAP "D:\P_METRUSER\Bitmaps\stock.bmp " ; BMPALIGN "BOTTOMRIGHT" ; SIZE 48, 48 ; BODYTEXT "DBF" ; TEXTALIGN "MIDDLELEFT" ; BACKGROUND "D:\P_METRUSER\BITMAPS\MSpec6.png " ; LARGE ; ACTION Open() oBtn[2]:nClrCaption := CLR_BLACK Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
About SQLMIX
someone used already tried to use, this DDD harbour
About SQLMIX
abandoned for not finding information.
About TCalendar
Hello, In our program we ask for a range di date, using 2 DatePicker, I would like change it using the [url=https&#58;//docs&#46;microsoft&#46;com/en-us/windows/win32/controls/month-calendar-controls:i4rog9ad]Month Calendar Control[/url:i4rog9ad] that is supported by FiveWin by the TCalendar class. What I saw, trying the testcal sample is the some animations are missing, I fixed it adding these pieces of code on the sample (and on every use) [code=fw:i4rog9ad]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #B900B9;">// my fix</span><br />   __objDelMethod<span style="color: #000000;">&#40;</span>oCal, <span style="color: #ff0000;">"HandleEvent"</span> <span style="color: #000000;">&#41;</span><br />   __objAddMethod<span style="color: #000000;">&#40;</span>oCal, <span style="color: #ff0000;">"HandleEvent"</span>, @simplyNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   __objDelMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"HandleEvent"</span> <span style="color: #000000;">&#41;</span><br />   __objAddMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"HandleEvent"</span>, @simplyNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">// *** ***</span></div>[/code:i4rog9ad] and [code=fw:i4rog9ad]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> simplyNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:i4rog9ad] another way is overriding HandleEvent in TCalendar, of course. Here a couple of video with the missing animations :[url:i4rog9ad]https&#58;//imgur&#46;com/a/vA0lNfn[/url:i4rog9ad] Another piece that is missing is the query for size of the control, that I would implement in this way: [code=fw:i4rog9ad]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETMINREQRECT <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd  -->  { nTop, nLeft, nBottom, nRight }</span><br /><span style="color: #000000;">&#123;</span><br />   HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   RECT rct;<br /><br />   rct.top    = <span style="color: #000000;">0</span>;<br />   rct.<span style="color: #0000ff;">left</span>   = <span style="color: #000000;">0</span>;<br />   rct.bottom = <span style="color: #000000;">0</span>;<br />   rct.<span style="color: #0000ff;">right</span>  = <span style="color: #000000;">0</span>;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />      MonthCal_GetMinReqRect<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />   hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.top,    <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>,  <span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_SIZERECTTOMIN <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd,{ nTop, nLeft, nBottom, nRight }  -->  { nTop, nLeft, nBottom, nRight }</span><br /><span style="color: #000000;">&#123;</span><br />   HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   RECT rct;<br /><br />   rct.top    = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   rct.<span style="color: #0000ff;">left</span>   = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   rct.bottom = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />   rct.<span style="color: #0000ff;">right</span>  = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />      MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />   hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.top,    <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />   hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>,  <span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:i4rog9ad] From MSDN: [url=https&#58;//docs&#46;microsoft&#46;com/en-us/windows/win32/api/commctrl/nf-commctrl-monthcal_getminreqrect:i4rog9ad]MonthCal_GetMinReqRect[/url:i4rog9ad] Retrieves the minimum size required to display a full month in a month calendar control. Size information is presented in the form of a RECT structure. [url=https&#58;//docs&#46;microsoft&#46;com/en-us/windows/win32/api/commctrl/nf-commctrl-monthcal_getminreqrect:i4rog9ad]MonthCal_SizeRectToMin[/url:i4rog9ad] Calculates how many calendars will fit in the given rectangle, and then returns the minimum size that a rectangle needs to be to fit that number of calendars.
About TCalendar
another problem: [code=fw:l2ge6j5d]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalendar<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> dOldDate<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span> .and. dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span></div>[/code:l2ge6j5d] In case of multiselect, if change only the Date end bChange is not called
About TCalendar
Antonino, Many thanks for your feedback and help. It will be included in the next FWH build. We have implemented it this way: In class TCalendar: METHOD HandleEvent() VIRTUAL METHOD GetMinReqRect() INLINE MonthCal_GetMinReqRect( ::hWnd ) METHOD SizeRectToMin( aSize ) INLINE MonthCal_SizeRectToMin( ::hWnd, aSize ) [code=fw:2f1bqpgf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalendar<br /><br />   <span style="color: #00C800;">local</span> aTmp<br />   <br />   <span style="color: #00C800;">static</span> dOldDate, dOldDate2<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span><br />      Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMultiselect</span><br />         aTmp = ::<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> dOldDate != aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> .or. dOldDate2 != aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />            Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />            dOldDate  = aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />            dOldDate2 = aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">else</span><br />         <span style="color: #00C800;">if</span> dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />            dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2f1bqpgf]
About TCalendar
Hello Antonio, I'm afraid the class has several unpolished aspects. If you post the complete source code we can help you with the testing. Thank you!
About TCalendar
hello, here a modifed version of testcal.prg from sample folder [code=fw:bo36olq7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"calendar.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"wcolors.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oCal, oDtp1, oDtp2, oDtp3, oDtp4, oCbx<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oSayClr<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nColor<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dDate1, dDate2, dDate3, dDate4, dDate5, dDate6<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cItemClr<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lWeekNumbers &nbsp; := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lNoTodayCircle := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lNoToday &nbsp; &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lDayState &nbsp; &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oRange3, aRanges2 := <span style="color: #000000;">&#123;</span> , <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oRange4<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aColorItems &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MCSC_BACKGROUND &nbsp;"</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MCSC_TEXT &nbsp; &nbsp; &nbsp; &nbsp;"</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MCSC_TITLEBK &nbsp; &nbsp; "</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MCSC_TITLETEXT &nbsp; "</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MCSC_MONTHBK &nbsp; &nbsp; "</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"MCSC_TRAILINGTEXT"</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDayOfWeek, cDayOfWeek:=<span style="color: #ff0000;">"Monday"</span>, aDayOfWeek:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Monday"</span>,<span style="color: #ff0000;">"Tuesday"</span>,<span style="color: #ff0000;">"Wednesday"</span>,<span style="color: #ff0000;">"Thursday"</span>,<span style="color: #ff0000;">"Friday"</span>,<span style="color: #ff0000;">"Saturday"</span>,<span style="color: #ff0000;">"Sunday"</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCal2<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oRange1, aRanges := <span style="color: #000000;">&#123;</span> , <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oRange2<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMax, nMax<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lSunday &nbsp; := .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lSaturday := .T.<br /><br /><br /><br />&nbsp; &nbsp; &nbsp;SET DATE <span style="color: #0000ff;">TO</span> BRITISH<br />&nbsp; &nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1980</span><br />&nbsp; &nbsp;dDate1 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;dDate2 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;dDate3 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;dDate4 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">7</span><br />&nbsp; &nbsp;dDate5 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;dDate6 = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Calendar"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">600</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Start Calendar 1</span><br /><br /><br />&nbsp; @ <span style="color: #000000;">001</span>, <span style="color: #000000;">205</span> CALENDAR oCal <span style="color: #0000ff;">VAR</span> dDate1 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DBLCLICK <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> oDtp2:<span style="color: #000000;">cText</span> := oCal:<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">170</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WEEKNUMBER<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">001</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get Today"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span> oDtp1:<span style="color: #000000;">cText</span> := oCal:<span style="color: #000000;">GetToday</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">025</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set Today"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span> oCal:<span style="color: #000000;">SetToday</span><span style="color: #000000;">&#40;</span> dDate1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">012</span>, <span style="color: #000000;">105</span> DTPICKER oDtp1 <span style="color: #0000ff;">VAR</span> dDate1 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">050</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get Color"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oSayClr:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_BLACK, oCal:<span style="color: #000000;">GetColors</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">nAt</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oSayClr:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">050</span>, <span style="color: #000000;">105</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set Color"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> nColor := ChooseColor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCal:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">nAt</span> - <span style="color: #000000;">1</span>, nColor <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSayClr:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_BLACK, nColor <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSayClr:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">075</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx <span style="color: #0000ff;">VAR</span> cItemClr <span style="color: #0000ff;">PROMPTS</span> aColorItems <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">205</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oWnd<br />&nbsp; &nbsp;@ <span style="color: #000000;">100</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">SAY</span> oSayClr <span style="color: #0000ff;">VAR</span> <span style="color: #ff0000;">" &nbsp; &nbsp; &nbsp; &nbsp;"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">OF</span> oWnd BORDER<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">125</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get 1 Day Week"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> cDayofWeek := aDayOfWeek<span style="color: #000000;">&#91;</span> oCal:<span style="color: #000000;">GetFirstDayOfWeek</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, oDayOfWeek:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">125</span>, <span style="color: #000000;">105</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set 1 Day Week"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">SetFirstDayOfWeek</span><span style="color: #000000;">&#40;</span> oDayOfWeek:<span style="color: #000000;">FindString</span><span style="color: #000000;">&#40;</span> cDayOfWeek <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">150</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">COMBOBOX</span> oDayOfWeek <span style="color: #0000ff;">VAR</span> cDayofWeek <span style="color: #0000ff;">ITEMS</span> aDayOfWeek <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">205</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">175</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get Selected Day"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">200</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set Selected Day"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span> oCal:<span style="color: #000000;">SetDate</span><span style="color: #000000;">&#40;</span> dDate2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">186</span>, <span style="color: #000000;">105</span> DTPICKER oDtp2 <span style="color: #0000ff;">VAR</span> dDate2 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">175</span>, <span style="color: #000000;">210</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get Range"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> aRanges2 := oCal:<span style="color: #000000;">GetRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange3:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange4:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">175</span>, <span style="color: #000000;">310</span> <span style="color: #0000ff;">GET</span> oRange3 <span style="color: #0000ff;">VAR</span> aRanges2<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">175</span>, <span style="color: #000000;">420</span> <span style="color: #0000ff;">GET</span> oRange4 <span style="color: #0000ff;">VAR</span> aRanges2<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">200</span>, <span style="color: #000000;">210</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set Range"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">020</span> <span style="color: #0000ff;">ACTION</span> oCal:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span> dDate5, dDate6 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">200</span>, <span style="color: #000000;">315</span> DTPICKER oDtp3 <span style="color: #0000ff;">VAR</span> dDate5 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">200</span>, <span style="color: #000000;">420</span> DTPICKER oDtp4 <span style="color: #0000ff;">VAR</span> dDate6 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">001</span>, <span style="color: #000000;">410</span> <span style="color: #0000ff;">CHECKBOX</span> oCal:<span style="color: #000000;">lWeekNumbers</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Week Numbers"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> &nbsp;oCal:<span style="color: #000000;">SetWeekNumbers</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">lWeekNumbers</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">025</span>, <span style="color: #000000;">410</span> <span style="color: #0000ff;">CHECKBOX</span> oCal:<span style="color: #000000;">lNoTodayCircle</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"No Today Circle"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> &nbsp;oCal:<span style="color: #000000;">SetNoTodayCircle</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">lNoTodayCircle</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">050</span>, <span style="color: #000000;">410</span> <span style="color: #0000ff;">CHECKBOX</span> oCal:<span style="color: #000000;">lNoToday</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"No Today"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> &nbsp;oCal:<span style="color: #000000;">SetNoToday</span><span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">lNoToday</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;oCal:<span style="color: #000000;">bGotFocus</span> &nbsp;:= <span style="color: #000000;">&#123;</span>|| oCal:<span style="color: #000000;">SetTitleBk</span><span style="color: #000000;">&#40;</span> CLR_YELLOW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp;oCal:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| oCal:<span style="color: #000000;">SetTitleBk</span><span style="color: #000000;">&#40;</span> GetSysColor<span style="color: #000000;">&#40;</span> COLOR_ACTIVECAPTION <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Start Calendar 2</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">250</span>, <span style="color: #000000;">001</span> CALENDAR oCal2 <span style="color: #0000ff;">VAR</span> dDate3, dDate4 <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> MULTISELECT DAYSTATE;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DBLCLICK <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oCal2:<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">550</span>, <span style="color: #000000;">170</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_HRED ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">change</span> iif<span style="color: #000000;">&#40;</span>empty<span style="color: #000000;">&#40;</span>oCal2<span style="color: #000000;">&#41;</span>,,<span style="color: #000000;">&#40;</span> aRanges := oCal2:<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// I Added On Change</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">230</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"MONTHS DISPLAYED: "</span> + StrZero<span style="color: #000000;">&#40;</span> ocal2:<span style="color: #000000;">GetVisibleMonths</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">COLOR</span> CLR_WHITE, CLR_BLACK<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">430</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Get Selected Range"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> aRanges := oCal2:<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oRange2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">430</span>, <span style="color: #000000;">105</span> <span style="color: #0000ff;">GET</span> oRange1 <span style="color: #0000ff;">VAR</span> aRanges<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">430</span>, <span style="color: #000000;">210</span> <span style="color: #0000ff;">GET</span> oRange2 <span style="color: #0000ff;">VAR</span> aRanges<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp; &nbsp;oCal2:<span style="color: #000000;">bGotFocus</span> &nbsp;:= <span style="color: #000000;">&#123;</span>|| oCal2:<span style="color: #000000;">SetTitleBk</span><span style="color: #000000;">&#40;</span> CLR_YELLOW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp;oCal2:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| oCal2:<span style="color: #000000;">SetTitleBk</span><span style="color: #000000;">&#40;</span> CLR_HRED <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;nMax = oCal2:<span style="color: #000000;">GetMaxSelCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">455</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Set Max Selected Day"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oCal2:<span style="color: #000000;">SetMaxSelCount</span><span style="color: #000000;">&#40;</span> nMax <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">455</span>, <span style="color: #000000;">155</span> <span style="color: #0000ff;">GET</span> oMax <span style="color: #0000ff;">VAR</span> nMax <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> SPINNER ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">60</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">480</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">CHECKBOX</span> oCal2:<span style="color: #000000;">lDayState</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Day State"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span><span style="color: #000000;">&#40;</span> oCal2:<span style="color: #000000;">SetDayStateStyle</span><span style="color: #000000;">&#40;</span> oCal2:<span style="color: #000000;">lDayState</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oCal2:<span style="color: #000000;">lDayState</span>, <span style="color: #000000;">&#40;</span> OnGetState<span style="color: #000000;">&#40;</span> oCal2, lSunday, lSaturday <span style="color: #000000;">&#41;</span>, oCal2:<span style="color: #000000;">SetDayState</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">505</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">CHECKBOX</span> lSunday <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Bold Sunday"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">530</span>, <span style="color: #000000;">001</span> <span style="color: #0000ff;">CHECKBOX</span> lSaturday <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Bold Saturday"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp; OnGetState<span style="color: #000000;">&#40;</span> oCal2, lSunday, lSaturday <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCal2:<span style="color: #000000;">SetDayState</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oCal2:<span style="color: #000000;">bOnGetState</span> = <span style="color: #000000;">&#123;</span> | oCal | OnGetState<span style="color: #000000;">&#40;</span> oCal, lSunday, lSaturday <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// my fixes</span><br />&nbsp; &nbsp;__objDelMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"HandleEvent"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;__objAddMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"HandleEvent"</span>, @simplyNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;__objDelMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"Change"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;__objAddMethod<span style="color: #000000;">&#40;</span>oCal2, <span style="color: #ff0000;">"Change"</span>, @TCal_Method_Change<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// *** ***</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> simplyNil<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> TCal_Method_Change<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> <span style="color: #00C800;">Self</span> := QSelf<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, aTmp<br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> dOldDate, dOldDate2<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMultiselect</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aTmp := ::<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> dOldDate != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .or. dOldDate2 != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate2 := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">Function</span> OnGetState<span style="color: #000000;">&#40;</span> oCal, lSun, lSat <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> i, imax, j, jmax, nDay, nDayState, nMonth<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dStartDate<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dCurrentDay := oCal:<span style="color: #000000;">dDate</span><br /><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">GetMonthRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;dStartDate = oCal:<span style="color: #000000;">dDate</span><br /><br />&nbsp; &nbsp;imax &nbsp; := Len<span style="color: #000000;">&#40;</span> oCal:<span style="color: #000000;">aDayState</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nMonth := Month<span style="color: #000000;">&#40;</span> dStartDate <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> imax<br />&nbsp; &nbsp; &nbsp; nDayState := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> j:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">31</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nDay := DoW<span style="color: #000000;">&#40;</span> dStartDate <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> nDay < <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nDay += <span style="color: #000000;">7</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> nDay == <span style="color: #000000;">5</span> .AND. lSat<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCal:<span style="color: #000000;">SetArrayDayState</span><span style="color: #000000;">&#40;</span> i, j <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> nDay == <span style="color: #000000;">6</span> .AND. lSUN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCal:<span style="color: #000000;">SetArrayDayState</span><span style="color: #000000;">&#40;</span> i, j <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dStartDate ++<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> Month<span style="color: #000000;">&#40;</span> dStartDate <span style="color: #000000;">&#41;</span> <> nMonth<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; &nbsp; nMonth &nbsp; &nbsp; &nbsp; := Month<span style="color: #000000;">&#40;</span> dStartDate <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">SetDate</span><span style="color: #000000;">&#40;</span> dCurrentDay <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:bo36olq7] Without the lines that overwrites HandleEvent andCheck we can see the bugs I already pointed out: [list:bo36olq7] [*:bo36olq7] No animation clicking on mount title[/*:m:bo36olq7] [*:bo36olq7] No selection on click and drag on range mode[/*:m:bo36olq7] [*:bo36olq7] No change event changing only end date (it is visible very well if the previous one is fixed)[/*:m:bo36olq7][/list:u:bo36olq7] Regards
About TCalendar
ops, there is a bug, bChange is called 2 time by Change method, here the fix: [code=fw:1ggtxmfb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCalendar<br /><br />   <span style="color: #00C800;">local</span> aTmp<br />   <br />   <span style="color: #00C800;">static</span> dOldDate, dOldDate2<br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMultiselect</span><br />         aTmp = ::<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> dOldDate != aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> .or. dOldDate2 != aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />            Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />            dOldDate  = aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />            dOldDate2 = aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">else</span><br />         <span style="color: #00C800;">if</span> dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />            dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1ggtxmfb] It is a mistake of my code
About TCalendar
thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
About TCalendar
Hello, I share my Last test, where added [b:1f5ciicb]bViewChanged[/b:1f5ciicb] called when the view changes, [b:1f5ciicb]SetCurrentView[/b:1f5ciicb] and [b:1f5ciicb]GetCurrentView[/b:1f5ciicb] to set and get the current view. I tried to do a only month selection, but id does a little weird animation: [code=fw:1f5ciicb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <fivewin.ch><br /><span style="color: #00D7D7;">#include</span> <calendar.ch><br /><br /><span style="color: #B900B9;">// MyCalendar</span><br /><span style="color: #00D7D7;">#define</span> MCMV_MONTH &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> MCMV_YEAR &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> MCMV_DECADE &nbsp; &nbsp; <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> MCMV_CENTURY &nbsp; &nbsp;<span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> MCMV_MAX &nbsp; &nbsp; &nbsp; &nbsp;MCMV_CENTURY<br /><br /><span style="color: #B900B9;">// TEST CODE</span><br />proc main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oMonth, dData1 := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,dData2 := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oMonth2, dMese := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test MonthCal"</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 10,10 CALENDAR oMonth VAR dData1,dData2 PIXEL NOTADAY NOTODAYCIRCLE SIZE 500,20</span><br />&nbsp; &nbsp;oMonth := MyCalendar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dData1, dData1:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dData2, dData2:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,, <span style="color: #000000;">500</span>, <span style="color: #000000;">20</span>,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// only month calendar test</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 210,10 CALENDAR oMonth2 VAR dMese PIXEL NOTADAY NOTODAYCIRCLE SIZE 700,20</span><br />&nbsp; &nbsp;oMonth2 := MyCalendar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dMese, dMese:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #00C800;">nil</span>,, <span style="color: #000000;">700</span>, <span style="color: #000000;">20</span>,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oMonth2:<span style="color: #000000;">bViewChanged</span> := <span style="color: #000000;">&#123;</span>|Self,nOld,nNew| iif<span style="color: #000000;">&#40;</span>nNew<MCMV_YEAR,::<span style="color: #000000;">SetCurrentView</span><span style="color: #000000;">&#40;</span>MCMV_YEAR<span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oMonth2:<span style="color: #000000;">SetCurrentView</span><span style="color: #000000;">&#40;</span>MCMV_YEAR<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #B900B9;">// MyCalendar</span><br /><span style="color: #00D7D7;">#define</span> SWP_NOSIZE &nbsp; &nbsp; &nbsp; &nbsp;0x0001<br /><span style="color: #00D7D7;">#define</span> SWP_NOMOVE &nbsp; &nbsp; &nbsp; &nbsp;0x0002<br /><span style="color: #00D7D7;">#define</span> SWP_NOZORDER &nbsp; &nbsp; &nbsp;0x0004<br /><br /><span style="color: #00D7D7;">#define</span> MCN_VIEWCHANGE &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span><span style="color: #000000;">-750</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">CLASS</span> MyCalendar <span style="color: #0000ff;">FROM</span> TCalendar<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> bViewChanged<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Notify<span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// use SetGet?</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">id</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> MonthCal_SetCurrentView<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #0000ff;">id</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> MonthCal_GetCurrentView<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">endclass</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> rc<br />&nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; rc := MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetWindowPos<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span>SWP_NOZORDER, SWP_NOMOVE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #00C800;">CLASS</span> MyCalendar<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> rc<br />&nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span>hDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; rc := MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetWindowPos<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span>SWP_NOZORDER, SWP_NOMOVE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />&nbsp; &nbsp;<span style="color: #B900B9;">// TODO: Verify others messages</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMsg==WM_LBUTTONUP<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aTmp<br />&nbsp; &nbsp;<span style="color: #00C800;">static</span> dOldDate, dOldDate2<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMultiselect</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aTmp := ::<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> dOldDate != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .or. dOldDate2 != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate2 := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> Notify<span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCode := GetNMHDRCode<span style="color: #000000;">&#40;</span> nPtrNMHDR <span style="color: #000000;">&#41;</span>, nOld, nNew<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nCode == MCN_VIEWCHANGE<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">bViewChanged</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MonthCal_GetViewChangeValues<span style="color: #000000;">&#40;</span>nPtrNMHDR, @nOld, @nNew<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;eval<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">bViewChanged</span>, <span style="color: #00C800;">self</span>, nOld, nNew<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Notify</span><span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <Windows.h><br /><span style="color: #00D7D7;">#include</span> <CommCtrl.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbdate.h><br /><span style="color: #00D7D7;">#include</span> <fwh.h><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETMINREQRECT <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;hWnd &nbsp;--> &nbsp;{ nTop, nLeft, nBottom, nRight }</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;RECT rct;<br /><br />&nbsp; &nbsp;rct.top &nbsp; &nbsp;= <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp;rct.<span style="color: #0000ff;">left</span> &nbsp; = <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp;rct.bottom = <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp;rct.<span style="color: #0000ff;">right</span> &nbsp;= <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; MonthCal_GetMinReqRect<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.top, &nbsp; &nbsp;<span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>, &nbsp; <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>, &nbsp;<span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_SIZERECTTOMIN <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;hWnd,{ nTop, nLeft, nBottom, nRight } &nbsp;--> &nbsp;{ nTop, nLeft, nBottom, nRight }</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;RECT rct;<br /><br />&nbsp; &nbsp;rct.top &nbsp; &nbsp;= hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;rct.<span style="color: #0000ff;">left</span> &nbsp; = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;rct.bottom = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;rct.<span style="color: #0000ff;">right</span> &nbsp;= hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.top, &nbsp; &nbsp;<span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>, &nbsp; <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>, &nbsp;<span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_SETCURRENTVIEW <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;hWnd, id</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;MonthCal_SetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETCURRENTVIEW <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;hWnd -> id</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;hb_retni<span style="color: #000000;">&#40;</span>MonthCal_GetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETVIEWCHANGEVALUES <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;NMVIEWCHANGE, @bOld, @nNew</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;LPNMVIEWCHANGE lParam = <span style="color: #000000;">&#40;</span>LPNMVIEWCHANGE<span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storni<span style="color: #000000;">&#40;</span>lParam->dwOldView, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;hb_storni<span style="color: #000000;">&#40;</span>lParam->dwNewView, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:1f5ciicb] I added some code to automatic resize to best dimension at init
About TCalendar
Antonino, many thanks. We have included the new DATA and the new Methods SetCurrentView() and GetCurrentView() for the next FWH build When we run your posted code we get this: [img:3i9opots]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/antonino1&#46;JPG?raw=true[/img:3i9opots]
About TCalendar
I just re-try with FiveWin 18.01 [img:m6mopnik]https&#58;//i&#46;imgur&#46;com/lbdqUqy&#46;png[/img:m6mopnik] in your screenshot these lines are not executed: [code=fw:m6mopnik]<div class="fw" id="{CB}" style="font-family: monospace;">      rc := MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      SetWindowPos<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span>SWP_NOZORDER, SWP_NOMOVE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:m6mopnik] I did put them on New and on Initiate
About TCalendar
A question.. I have the calendar on my Project as you see on this picture I use sample01.prg , if I resize the splitter on right [img:1j3wy5op]https&#58;//i&#46;postimg&#46;cc/ryHCtp2L/agenda2&#46;jpg[/img:1j3wy5op] I wish the calendar resize until the splitter, showing 3 months per row or depending on the space created up to the splitter How can I solve? probable on dialog tcalendar not resize good?
About TCalendar
I tried oPanel := ::oExBar:AddPanel( Upper( "Jump To Date" ), "d:\fwh\bitmaps\32x32\calendar.bmp", 480 ) // @ 40, 15 CALENDAR ::oDtPick VAR ::dDateStart OF oPanel PIXEL SIZE 220, 157 WEEKNUMBER DAYSTATE [b:k4q7ewpe] ::oDtPick := MyCalendar():New( 40, 10, { | u | If( PCount()==0, ::dDateStart, ::dDateStart:= u ) }, nil,oPanel, 700, 520,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. ) ::oDtPick:bViewChanged := {|Self,nOld,nNew| iif(nNew<MCMV_YEAR,::SetCurrentView(MCMV_YEAR),) }[/b:k4q7ewpe] ::oDtPick:bChange = { | o | ::ChangeDate( o ) } but I have this result [img:k4q7ewpe]https&#58;//i&#46;postimg&#46;cc/yxLtCgfd/vvv&#46;png[/img:k4q7ewpe] then if I resize the splitter I have this result not seeing the sequence of the mounths [img:k4q7ewpe]https&#58;//i&#46;postimg&#46;cc/rsGWD56V/ccc&#46;png[/img:k4q7ewpe]
About TCalendar
Now I tried with ::oDtPick := MyCalendar():New( 30, 1, { | u | If( PCount()==0, ::dDateStart, ::dDateStart:= u ) }, nil,oPanel, 200, 160,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. ) ::oDtPick:bViewChanged := {|Self,nOld,nNew| iif(nNew<MCMV_YEAR,::SetCurrentView(MCMV_YEAR),) } ::oDtPick:bChange = { | o | ::ChangeDate( o ) } oPanel:bResized := <|| local oRect :=oPanel:GetCliRect() ::oDtPick:nWidth := oRect:nRight return nil > seem to run , but there is something bad
About TCalendar
the test of Antonino run ok I add resizable system to resize the calendar [img:1u1svfhd]https&#58;//i&#46;postimg&#46;cc/XYwGrfYL/jkk&#46;gif[/img:1u1svfhd] [code=fw:1u1svfhd]<div class="fw" id="{CB}" style="font-family: monospace;">    <span style="color: #00D7D7;">#include</span> <fivewin.ch><br />    <span style="color: #00D7D7;">#include</span> <calendar.ch><br /><br />    <span style="color: #B900B9;">// MyCalendar</span><br />    <span style="color: #00D7D7;">#define</span> MCMV_MONTH      <span style="color: #000000;">0</span><br />    <span style="color: #00D7D7;">#define</span> MCMV_YEAR       <span style="color: #000000;">1</span><br />    <span style="color: #00D7D7;">#define</span> MCMV_DECADE     <span style="color: #000000;">2</span><br />    <span style="color: #00D7D7;">#define</span> MCMV_CENTURY    <span style="color: #000000;">3</span><br />    <span style="color: #00D7D7;">#define</span> MCMV_MAX        MCMV_CENTURY<br /><br />    <span style="color: #B900B9;">// TEST CODE</span><br />    proc main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">LOCAL</span> oDlg, oMonth, dData1 := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,dData2 := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oMonth2, dMese := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL;<br />          <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test MonthCal"</span>   RESIZABLE<br />       <span style="color: #B900B9;">//@ 10,10 CALENDAR oMonth VAR dData1,dData2 PIXEL NOTADAY NOTODAYCIRCLE SIZE 500,20</span><br />       oMonth := MyCalendar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dData1, dData1:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dData2, dData2:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,, <span style="color: #000000;">500</span>, <span style="color: #000000;">20</span>,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. <span style="color: #000000;">&#41;</span><br />       <span style="color: #B900B9;">// only month calendar test</span><br />       <span style="color: #B900B9;">//@ 210,10 CALENDAR oMonth2 VAR dMese PIXEL NOTADAY NOTODAYCIRCLE SIZE 700,20</span><br />       oMonth2 := MyCalendar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, dMese, dMese:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #00C800;">nil</span>,, <span style="color: #000000;">700</span>, <span style="color: #000000;">160</span>,,,,, .F.,, .T.,, .F., .F.,,,,,, .F., .T., .T., .F. <span style="color: #000000;">&#41;</span><br />       oMonth2:<span style="color: #000000;">bViewChanged</span> := <span style="color: #000000;">&#123;</span>|Self,nOld,nNew| iif<span style="color: #000000;">&#40;</span>nNew<MCMV_YEAR,::<span style="color: #000000;">SetCurrentView</span><span style="color: #000000;">&#40;</span>MCMV_YEAR<span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />                           oDlg:<span style="color: #000000;">bResized</span>  := <||<br />                           <span style="color: #00C800;">local</span> oRect       := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                              oMonth2:<span style="color: #000000;">nWidth</span>     := oRect:<span style="color: #000000;">nRight</span><br />                           <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />                     ><br /><br />       <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>;<br />       <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oMonth2:<span style="color: #000000;">SetCurrentView</span><span style="color: #000000;">&#40;</span>MCMV_YEAR<span style="color: #000000;">&#41;</span>,EVAL<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">bResized</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br />    <span style="color: #B900B9;">// MyCalendar</span><br />    <span style="color: #00D7D7;">#define</span> SWP_NOSIZE        0x0001<br />    <span style="color: #00D7D7;">#define</span> SWP_NOMOVE        0x0002<br />    <span style="color: #00D7D7;">#define</span> SWP_NOZORDER      0x0004<br /><br />    <span style="color: #00D7D7;">#define</span> MCN_VIEWCHANGE      <span style="color: #000000;">&#40;</span><span style="color: #000000;">-750</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">CLASS</span> MyCalendar <span style="color: #0000ff;">FROM</span> TCalendar<br />       <span style="color: #00C800;">DATA</span> bViewChanged<br /><br />       <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />       <span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">METHOD</span> Notify<span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #B900B9;">// use SetGet?</span><br />       <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">METHOD</span> SetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">id</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> MonthCal_SetCurrentView<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #0000ff;">id</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">METHOD</span> GetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> MonthCal_GetCurrentView<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">endclass</span><br /><br />    <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />       <span style="color: #00C800;">LOCAL</span> rc<br />       ::<span style="color: #00C800;">Super</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span>...<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />          rc := MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />          SetWindowPos<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span>SWP_NOZORDER, SWP_NOMOVE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br />    <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">CLASS</span> MyCalendar<br />       <span style="color: #00C800;">LOCAL</span> rc<br />       ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span>hDlg<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />          rc := MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />          SetWindowPos<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, rc<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span>SWP_NOZORDER, SWP_NOMOVE<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />    <span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />       <span style="color: #B900B9;">// TODO: Verify others messages</span><br />       <span style="color: #00C800;">if</span> nMsg==WM_LBUTTONUP<br />          ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />    <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Change</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />       <span style="color: #00C800;">local</span> aTmp<br />       <span style="color: #00C800;">static</span> dOldDate, dOldDate2<br /><br />       <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bChange</span> != <span style="color: #00C800;">nil</span><br />          <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMultiselect</span><br />             aTmp := ::<span style="color: #000000;">GetDateRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />             <span style="color: #00C800;">if</span> dOldDate != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> .or. dOldDate2 != aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />                Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />                dOldDate := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />                dOldDate2 := aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />             <span style="color: #00C800;">endif</span><br />          <span style="color: #00C800;">else</span><br />             <span style="color: #00C800;">if</span> dOldDate != ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bChange</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />                dOldDate = ::<span style="color: #000000;">GetDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />             <span style="color: #00C800;">endif</span><br />          <span style="color: #00C800;">endif</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br />    <span style="color: #00C800;">METHOD</span> Notify<span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyCalendar<br />       <span style="color: #00C800;">local</span> nCode := GetNMHDRCode<span style="color: #000000;">&#40;</span> nPtrNMHDR <span style="color: #000000;">&#41;</span>, nOld, nNew<br />       <span style="color: #00C800;">if</span> nCode == MCN_VIEWCHANGE<br />          <span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">bViewChanged</span><span style="color: #000000;">&#41;</span><br />             MonthCal_GetViewChangeValues<span style="color: #000000;">&#40;</span>nPtrNMHDR, @nOld, @nNew<span style="color: #000000;">&#41;</span><br />             eval<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">bViewChanged</span>, <span style="color: #00C800;">self</span>, nOld, nNew<span style="color: #000000;">&#41;</span><br />          <span style="color: #00C800;">endif</span><br />          <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />       <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Notify</span><span style="color: #000000;">&#40;</span> nIdCtrl, nPtrNMHDR <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br />    <span style="color: #00D7D7;">#include</span> <Windows.h><br />    <span style="color: #00D7D7;">#include</span> <CommCtrl.h><br />    <span style="color: #00D7D7;">#include</span> <hbapi.h><br />    <span style="color: #00D7D7;">#include</span> <hbdate.h><br />    <span style="color: #00D7D7;">#include</span> <fwh.h><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETMINREQRECT <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd  -->  { nTop, nLeft, nBottom, nRight }</span><br />    <span style="color: #000000;">&#123;</span><br />       HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       RECT rct;<br /><br />       rct.top    = <span style="color: #000000;">0</span>;<br />       rct.<span style="color: #0000ff;">left</span>   = <span style="color: #000000;">0</span>;<br />       rct.bottom = <span style="color: #000000;">0</span>;<br />       rct.<span style="color: #0000ff;">right</span>  = <span style="color: #000000;">0</span>;<br /><br />       <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />          MonthCal_GetMinReqRect<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />       hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.top,    <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>,  <span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_SIZERECTTOMIN <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd,{ nTop, nLeft, nBottom, nRight }  -->  { nTop, nLeft, nBottom, nRight }</span><br />    <span style="color: #000000;">&#123;</span><br />       HWND hWnd = <span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       RECT rct;<br /><br />       rct.top    = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       rct.<span style="color: #0000ff;">left</span>   = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />       rct.bottom = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />       rct.<span style="color: #0000ff;">right</span>  = hb_parvni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />       <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span><br />          MonthCal_SizeRectToMin<span style="color: #000000;">&#40;</span> hWnd, &rct <span style="color: #000000;">&#41;</span>;<br /><br />       hb_reta<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.top,    <span style="color: #000000;">-1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">left</span>,   <span style="color: #000000;">-1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.bottom, <span style="color: #000000;">-1</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storvni<span style="color: #000000;">&#40;</span> rct.<span style="color: #0000ff;">right</span>,  <span style="color: #000000;">-1</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_SETCURRENTVIEW <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd, id</span><br />    <span style="color: #000000;">&#123;</span><br />       MonthCal_SetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETCURRENTVIEW <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  hWnd -> id</span><br />    <span style="color: #000000;">&#123;</span><br />       hb_retni<span style="color: #000000;">&#40;</span>MonthCal_GetCurrentView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> HWND <span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> MONTHCAL_GETVIEWCHANGEVALUES <span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">//  NMVIEWCHANGE, @bOld, @nNew</span><br />    <span style="color: #000000;">&#123;</span><br />       LPNMVIEWCHANGE lParam = <span style="color: #000000;">&#40;</span>LPNMVIEWCHANGE<span style="color: #000000;">&#41;</span> fw_parH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storni<span style="color: #000000;">&#40;</span>lParam->dwOldView, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />       hb_storni<span style="color: #000000;">&#40;</span>lParam->dwNewView, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:1u1svfhd] When I put the resize system on sample01 ( tcalex) not run !!
About TCalendar
Antonino, function MonthCal_SizeRectToMin() seems not to be working at all, in example: rc := MonthCal_SizeRectToMin( ::hWnd, { 1, 1, 20, 20 } ) XBrowse( rc ) // you get { 1, 1, 20, 20 } It seems to be working fine this way: rc := MonthCal_GetMinReqRect( ::hWnd ) XBrowse( rc )
About TCalendar
I see, it works only on Vista and later, are you trying with win 7? see requirement section on [url:2h9p7y2g]https&#58;//docs&#46;microsoft&#46;com/en-us/windows/win32/api/commctrl/nf-commctrl-monthcal_sizerecttomin[/url:2h9p7y2g]. It is a shame,
About TCalendar
Antonino, We have modified methods New() and Initiate() using this code: [code=fw:2zq4hqnz]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; aRect = MonthCal_GetMinReqRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SetWindowPos<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nLeft</span>, ::<span style="color: #000000;">nTop</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span>, aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span> * <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, nOr<span style="color: #000000;">&#40;</span> SWP_NOZORDER, SWP_NOMOVE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:2zq4hqnz] many thanks
About TMeterEx - Gradient
Daniel, I did some Tests ( changes ) with Class TMeterEx, to create a Vertical running Gradient. It works, but stops at the End at Center ( must be complete Green ). Is it possible to add this Function to the Class ? [img:3pj8s4s9]http&#58;//www&#46;pflegeplus&#46;com/pictures/meter1&#46;jpg[/img:3pj8s4s9] @ 280, 40 METEREX oMeter3 VAR nActual3 SIZE 135, 20 TOTAL 50 PIXEL; GRADIENT CHUNK { [color=#0000FF:3pj8s4s9]{ 0, 255, 6472704 }, { 0, 6472704, 255 }[/color:3pj8s4s9] }; // Defined Red / Green GRADIENT TRACK { [color=#FF0000:3pj8s4s9]{ 0, 255, 255 }, { 0, 255, 255 }[/color:3pj8s4s9] }; // Start with 100 % red ROUND LINECOLORS CLR_BLACK, CLR_WHITE For my Test I changed in Method Paint : GradientFill( ::hDC, 0, 0, ::nHeight, ::nWidth, ::aGrad,[color=#FF0000:3pj8s4s9][b:3pj8s4s9] .F.[/b:3pj8s4s9][/color:3pj8s4s9] ) // ! ::lVertical ) GradientFill( ::hDC, nTop, nLeft, nHeight, nWidth, ::aGradMet, [color=#FF0000:3pj8s4s9][b:3pj8s4s9].F.[/b:3pj8s4s9][/color:3pj8s4s9] ) // ! ::lVertical ) Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
About TMeterEx - Gradient
Uwe sure... please send me the class modified...
About TMeterEx - Gradient
Daniel, I only changed the 2 Gradientlines in Method PAINT and defined the Start Gradient ( posted above ). Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About TMeterEx - Gradient
Daniel, maybe a better looking Solution for a colored Meter : using Your TSelex-class ( works the same ) moving the Button in Relation to a Counter ? [img:2ijhcksu]http&#58;//www&#46;pflegeplus&#46;com/pictures/meter2&#46;jpg[/img:2ijhcksu] [code=fw:2ijhcksu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">260</span>, <span style="color: #000000;">40</span> SELEX oSelex  <span style="color: #0000ff;">VAR</span> nOption <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">135</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">OF</span> oDlgChild <span style="color: #0000ff;">PIXEL</span>  ;<br /><span style="color: #0000ff;">ITEMS</span> <span style="color: #ff0000;">"0"</span>, <span style="color: #ff0000;">"10"</span>, <span style="color: #ff0000;">"20"</span>, <span style="color: #ff0000;">"30"</span>, <span style="color: #ff0000;">"40"</span>, <span style="color: #ff0000;">"50"</span>, <span style="color: #ff0000;">"60"</span>, <span style="color: #ff0000;">"70"</span>, <span style="color: #ff0000;">"80"</span>, <span style="color: #ff0000;">"90"</span>, <span style="color: #ff0000;">"100"</span> ;<br />GRADIENT OUTTRACK <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16770250</span>, <span style="color: #000000;">16312263</span> <span style="color: #000000;">&#125;</span>, ;<br />                       <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16312263</span>, <span style="color: #000000;">16770250</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> ;<br />GRADIENT INTRACK  <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">6472704</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> ;<br />THUMBSIZE <span style="color: #000000;">15</span>, <span style="color: #000000;">50</span> ROUNDSIZE <span style="color: #000000;">5</span> ;<br /><span style="color: #0000ff;">COLOR</span> THUMB <span style="color: #000000;">16770250</span> ;<br />COLORTEXT <span style="color: #000000;">128</span>, <span style="color: #000000;">32768</span> ; <br /><span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Progress-counter ..."</span> TOP ;<br /><span style="color: #0000ff;">FONT</span> oFont<br /><br />@ <span style="color: #000000;">260</span>,  <span style="color: #000000;">180</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"+"</span> <span style="color: #0000ff;">ACTION</span> ;<br />IIF<span style="color: #000000;">&#40;</span>nOption < <span style="color: #000000;">11</span>,<span style="color: #000000;">&#40;</span>nOption++, oSelex:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span>nOption<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br />@ <span style="color: #000000;">260</span>,  <span style="color: #000000;">205</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"-"</span> <span style="color: #0000ff;">ACTION</span>  ;<br />IIF<span style="color: #000000;">&#40;</span>nOption > <span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>nOption--, oSelex:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span>nOption<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br />@ <span style="color: #000000;">260</span>,  <span style="color: #000000;">230</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Rst"</span> <span style="color: #0000ff;">ACTION</span> oSelex:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br />@ <span style="color: #000000;">260</span>,  <span style="color: #000000;">255</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Auto"</span> <span style="color: #0000ff;">ACTION</span> Automatic<span style="color: #000000;">&#40;</span>oSelex, <span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br />..<br />..<br /><span style="color: #B900B9;">// --------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Automatic<span style="color: #000000;">&#40;</span> oSelex, nMax <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> n := <span style="color: #000000;">1</span><br /><br /><span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nMax<br />      oSelex:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <br />      n++<br /><span style="color: #00C800;">NEXT</span><br />   <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2ijhcksu] Best Regards uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
About UNICODE
Hi Antonio, I saw new FWH902 below: [quote:3jx7aggx] * Enhancement: More changes in several classes for Unicode support. Modified Classes: TButton, TComboBox, TControl, TDialog, TListBox, TSay, TWindow, TBar. [/quote:3jx7aggx] This version support input Chinese with Themes and show Chinese UNICODE words? Any EXE sample let our testing? Regards, Richard
About UNICODE
Richard, We are implementing many changes to have full unicode support soon, but it is not fully available yet.
About UNICODE
[quote="Antonio Linares":25j0zz0f]We are implementing many changes to have full unicode support soon, but it is not fully available yet.[/quote:25j0zz0f] Dear Antonio, this is a big notice. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> There is a prevision for the release this features?
About UNICODE
Antonio, Half year has pasted, how about Unicode support progress? Regards.
About UNICODE
We are delayed, our apologizes <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> We have been very busy on many new developments, but we promise that we will offer FWH with unicode. Hopefully this same year <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
About UNICODE
Antonio, FWH newest version is 10.3, but still not yet support unicode <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> ??
About UNICODE
No, not yet
About asort
Hi all, I need to order a multidimensional array with two criterias. Is there a way to make an order this I use for a dbf sort on lb02/a,lb11/a to &filelb on an Array using asort ? Thanks in advance.
About asort
Marco, Maybe this old message will help. James ---------------------------------------- From: "Victor Spiridonov" <dicch@mail.ru> Subject: Re: Sorting multidimensional array Date: Wednesday, November 05, 2003 11:06 PM "Stephen Quinn" <steveqNOSPAM@integritynet.com.au> wrote in message news:<bobukt$1d6h8g$1@ID-88745.news.uni-berlin.de>... > decray > > > I'm trying to sort multidimensional arrays. > > I have tried with asort(aarray,,,{|x,y| x[1] >y[1]}); but this only > > change the column order and it doesnt work. > It does - your just NOT getting the result you want <g> > > If you want to sort each dimension then try sorting them individually > > Eg - Untested > for i := 1 to len( aArray ) > aArray1 := aArray[i] > asort( aArray1,,,{|x,y| x[1] >= y[1] } ) > aArray[i] := aArray1 > next Decray Below is the function you are looking for (in my previous message I've not replace 2 recursive calls to the new function name and parameters order) [code=fw:1npltbps]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> mFaSo2Dim<span style="color: #000000;">&#40;</span>mAr,mColumn,mL,mR<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// fast sorting of two-dimentional array mAr</span><br /><span style="color: #B900B9;">// mAr &nbsp; &nbsp; - array to be sorted</span><br /><span style="color: #B900B9;">// mColumn - column array to be sorted on</span><br /><span style="color: #B900B9;">// mL &nbsp; &nbsp; &nbsp;- index of the first element of area to be sorted</span><br /><span style="color: #B900B9;">// mR &nbsp; &nbsp; &nbsp;- index of the last element of the area to sort</span><br /><br /><span style="color: #B900B9;">//Function returns Nil</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> mSrtFlg,mI,mJ,mX,mW,mV,mT<br /><br /><span style="color: #00C800;">if</span> mL=<span style="color: #00C800;">nil</span>; mL=<span style="color: #000000;">1</span>; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">if</span> mR=<span style="color: #00C800;">nil</span>; mR=len<span style="color: #000000;">&#40;</span>mAr<span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">if</span> mR><span style="color: #000000;">1</span><br />&nbsp; &nbsp;mSrtFlg=.t.<br />&nbsp; &nbsp;mI=mL<br />&nbsp; &nbsp;mJ=mR<br />&nbsp; &nbsp;mX=mAr<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#40;</span>mL+mR<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>,mColumn<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>mI<mJ<span style="color: #000000;">&#41;</span>.or.mSrtFlg<span style="color: #000000;">&#41;</span>`&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;mSrtFlg = .f.<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> <span style="color: #000000;">&#40;</span>mAr<span style="color: #000000;">&#91;</span>mI,mColumn<span style="color: #000000;">&#93;</span><mX<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;mI++<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndDo</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> <span style="color: #000000;">&#40;</span>mAr<span style="color: #000000;">&#91;</span>mJ,mColumn<span style="color: #000000;">&#93;</span>>mX<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;mJ--<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndDo</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> mI <= mJ<br />&nbsp; &nbsp; &nbsp; &nbsp;mW = mAr<span style="color: #000000;">&#91;</span>mI<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;mAr<span style="color: #000000;">&#91;</span>mI<span style="color: #000000;">&#93;</span> = mAr<span style="color: #000000;">&#91;</span>mJ<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;mAr<span style="color: #000000;">&#91;</span>mJ<span style="color: #000000;">&#93;</span> = mW<br />&nbsp; &nbsp; &nbsp; &nbsp;mI++<br />&nbsp; &nbsp; &nbsp; &nbsp;mJ--<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp;<span style="color: #00C800;">EndDo</span><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> mL < mJ<br />&nbsp; &nbsp; &nbsp;mFaSo2Dim<span style="color: #000000;">&#40;</span>mAr,mColumn,mL,mR<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> mR > mI<br />&nbsp; &nbsp; &nbsp;mFaSo2Dim<span style="color: #000000;">&#40;</span>mAr,mColumn,mL,mR<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><span style="color: #00C800;">Endif</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span></div>[/code:1npltbps]
About asort
Hello Marco, [quote="Marco Turco":1bf4hu1r]Hi all, I need to order a multidimensional array with two criterias. Is there a way to make an order this I use for a dbf sort on lb02/a,lb11/a to &filelb on an Array using asort ?[/quote:1bf4hu1r] ASORT(<aTarget>, [<nStart>],[<nCount>], [<bOrder>]) --> aTarget The trick is made by bOrder. It recives 2 row like arrays , so you have to compare first column and IF IT DOESNT SOLVES ORDER (The fisrt compared element are equal) then solve the comparision with the second. Said in code: [code=fw:1bf4hu1r]<div class="fw" id="{CB}" style="font-family: monospace;">aSort<span style="color: #000000;">&#40;</span> aArray,,,<span style="color: #000000;">&#123;</span>|x,y| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> == y<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, x<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><y<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, x<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><y<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:1bf4hu1r] you should adjust the indexes to match your array columns. Hope it helps
About asort
It runs well. Thank you Carlos.
About box
Guys: What would be the easiest way to build an about box for a program ? Alert, a dialog, MsgInfo, etc ? I'd tried using a Dialog and the CENTER() function for each SAY but the text does not get centered. Any ideas ? Thank you.
About box
I think a VTitle can do the Job : [img:30i2oe97]http&#58;//www&#46;pflegeplus&#46;com/pictures/about&#46;jpg[/img:30i2oe97] [color=#0000FF:30i2oe97] @ 15, 15 BUTTON "&About" SIZE 100,50 OF oWnd1 PIXEL ; FONT oFont1 ; ACTION SHOW_TITLE(oWnd1, 100, 100) // ----------------- FUNCTION SHOW_TITLE(oContrl, nTop, nLeft) Local oBar1 @ nTop, nLeft TITLE oBar1 size 300, 80 of oContrl SHADOW BOTTOMLEFT SHADOWSIZE 10 BOTTOMRIGHT @ 10, 20 TITLEIMG OF oBar1 BITMAP c_path + "\Bitmaps\Info.bmp" SIZE 45, 45 ANIMA LEVEL 255 ; ACTION ( NIL) // can have a Action !!! @ 20, 100 TITLETEXT OF oBar1 TEXT "About-message" FONT oFont1 COLOR 128 @ 40, 100 TITLETEXT OF oBar1 TEXT "Testing Windows and Dialogs" FONT oFont1 COLOR 128 oBar1:lRound := .T. oBar1:aGrdBack := { { 0.95, 14853684, 16314573 },{ 0.95, 16314573, 14853684 } } [/color:30i2oe97] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About box
Uwe: Thank you for your answer. The compiler gives me an error with the @ nTop, nLeft TITLE, TITLEIMG, TITLETEXT commands. I'm using FWH 10.6. Can the TITLE control be centered no matter the screen resolution ? Thank you my friend. Gustavo
About box
There is a built-in FWH function MsgAbout( cAbout, cCopyRight ) This function uses the standard Microsoft Windows About dialog, which looks like any other standard about dialog of other windows software.
About box
Rao: Thank you for your response. Can MsgAbout() display more than one line ?
About box
I don't know whether it differs by region but MsgAbout() on my PC would show everything belongs to Microsoft. Clicking on the End-User License Agreement seems to bring up standard Microsoft's EULA. Might be better to spend some time and write your own About dialog box for full control. [img:fdeh76fo]http&#58;//img98&#46;imageshack&#46;us/img98/4816/tmp123w&#46;jpg[/img:fdeh76fo]
About box
Hua: Thank you for your response. Same results here. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
About box
In case, You agree with a VTitle-solution, just give me a little bit Time and we will have a nice visual painter for it, that will create a working EXE-file of the Results. The Message will have a Headline, Image and up to 5 Textlines. You can test the Message on any Position and Window-background. The Main-window includes a Painter-button, that will open a Dialog to do all needed Settings / Selections. It can be used as a Message-editor for any Message You need. Includes : Window- and About (VTitle)-background-painter About(VTitle)-settings like Size, BMP-selection, Text, ... Font-painter [img:1w9s4m2l]http&#58;//www&#46;pflegeplus&#46;com/pictures/about1&#46;jpg[/img:1w9s4m2l] [img:1w9s4m2l]http&#58;//www&#46;pflegeplus&#46;com/pictures/about2&#46;jpg[/img:1w9s4m2l] Some more Options added : [img:1w9s4m2l]http&#58;//www&#46;pflegeplus&#46;com/pictures/about3&#46;jpg[/img:1w9s4m2l] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About box
Uwe: Great idea and visuals ! I can't wait to test your solution. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> PD.: Does the @ x,y TITLE, TITLEIMB, TITLETXT works in FWH 10.06 or do I have to upgrade ?
About box
Gustavo, I think Your Version will work [color=#FF0000:27ig1pu6]10.6[/color:27ig1pu6] Have a look at : [color=#0000FF:27ig1pu6]\samples\testtitl.prg [/color:27ig1pu6] Last changes of VTiles [color=#FF0000:27ig1pu6]10.4[/color:27ig1pu6] : April 2010 ========== ..... ..... * New: Class TTitleText to use in class TTITLE, create an object with the properties of the text added to TTITLE * New: Class TTitleImg to use in class TTITLE, create an object with properties of the image added to TTITLE modified xcommand, TITLEIMG and TITLETEXT to return the object created in each case All Styles are working : [img:27ig1pu6]http&#58;//www&#46;pflegeplus&#46;com/pictures/about4&#46;jpg[/img:27ig1pu6] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About box
Uwe: The first example worked ok. Now, how do I close the Vtitle ? Thank you. PD: Your prototypes look awesome !
About box
Gustavo, Include a Button to the Function. The Position is calculated to the Right- / Bottom-corner : [color=#0000FF:1wiq24yk]@ nHeight - 40, nWidth - 45 BUTTON "&OK" SIZE 40,30 OF oBar1 PIXEL ; FONT oFont1 ; ACTION oBar1:End()[/color:1wiq24yk] In case You don*t want a extra Button, You can use the ACTION of the Info.bmp : ( It would be great, Daniel could add TOOLTIPS to the Image ) @ 10, 20 TITLEIMG OF oBar1 BITMAP c_path + "\Bitmaps\Info.bmp" SIZE 45, 45 ANIMA LEVEL 255 ; ACTION [color=#FF0000:1wiq24yk]oBar1:End() [/color:1wiq24yk]// can have a Action !!! Just give You a Idea. Using a Logo as Background and NO extra Bmp. [img:1wiq24yk]http&#58;//www&#46;pflegeplus&#46;com/pictures/about5&#46;jpg[/img:1wiq24yk] The Painter : You can change everything : Fonts and Text, Backgrounds, Sizes, Message-Bmp, Shadow- Size / Position / Color ..... Switch BMP On / Off, to show just the Background and Text. Empty Textlines are not used inside the Message. Any Changes from the Folder, shows the Result inside the Painter. The Window-message is updated, after closing the Painter. Message-Top/Left is fixed to the left upper Corner. Calculated Top-textlinepositions from given distance (nTextT) and Fonthight (nFontH1 and nFontH2) Local nTop1 := 2 * nTextT + nFontH1 // Top of 1. Textline uses Hight of Headline-font Local nTop2 := 3 * nTextT + 2 * nFontH2 // Top of 2. Textline Local nTop3 := 4 * nTextT + 3 * nFontH2 // Top of 3. Textline Local nTop4 := 5 * nTextT + 4 * nFontH2 // Top of 4. Textline Local nTop5 := 6 * nTextT + 5 * nFontH2 // Top of 5. Textline [img:1wiq24yk]http&#58;//www&#46;pflegeplus&#46;com/pictures/about8&#46;jpg[/img:1wiq24yk] Change the Text and define a Dialog-size for the Dialog-preview : [img:1wiq24yk]http&#58;//www&#46;pflegeplus&#46;com/pictures/about9&#46;jpg[/img:1wiq24yk] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About box
Uwe: Great job ! How can I download the painter ?
About box
Gustavo, there is still something to do. As more time I work on it, I getting more and more Ideas. Funny Things can be done. I think it will be ready next week for Download. There will be a extra Toppic < Message paint > I think without a visual Preview in Realtime, it would be a hard Job, to get the desired Result. In the meantime another Preview from the Image / brush-section : You can Resize the Logo to a Size from 20 - 70 Pixel ( also a Logo could be a Message-background ). A < 0 > Value shows the original Size. [img:2pm9tioa]http&#58;//www&#46;pflegeplus&#46;com/pictures/about10&#46;jpg[/img:2pm9tioa] [img:2pm9tioa]http&#58;//www&#46;pflegeplus&#46;com/pictures/about11&#46;jpg[/img:2pm9tioa] The Logo used before as Background with another Logo on Top / left-corner and changed Text : I could show the small Logo-preview transparent, but I want to show a used Alpha-channel ( Black Background ) [img:2pm9tioa]http&#58;//www&#46;pflegeplus&#46;com/pictures/about12&#46;jpg[/img:2pm9tioa] I finished the Color-section : [img:2pm9tioa]http&#58;//www&#46;pflegeplus&#46;com/pictures/about13&#46;jpg[/img:2pm9tioa] Added a new Option [color=#FF0000:2pm9tioa]BASE[/color:2pm9tioa] ( there is no extra work ) : must be selected as a Option from the Message-background. only 2 extra Lines needed : [color=#0000FF:2pm9tioa]1. @ nTop, nLeft TITLE oBar1 SIZE nWidth, nHeight OF oContrl TRANSPARENT BORDER BASE SHADOWSIZE 0 2. oBar1:aGrdBase := { { nGradPos, nColor1, nColor2 } , ; { 10 - nGradPos, nColor2, nColor1 } }[/color:2pm9tioa] [img:2pm9tioa]http&#58;//www&#46;pflegeplus&#46;com/pictures/about14&#46;jpg[/img:2pm9tioa] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
About combobox
Why combobox (DropDown List) dont display selected dot lines? if they give focus i use the arrows up and down and the elements changes but dont display a dot lines, in this case is too dificult to knows where is the focus. Thanks in advance.
About copyfile: checking results
Hi,I use in my app (FWH 8.05) the function CopyFile (<orig.file>,<dest.file>,.f.) to make a backup of some archive files.The problem is that I have a customer where some files are (randomly) not copied. I cheked that copyfile return (.f.) on those files so an error occurred.I would like have an extended error code (like ferror() to be clear) in order to know the origin of this problem. Is it possibile to make this using copyfile or is there any other copy function with an extended error code manager that can I use ?Thanks.
About copyfile: checking results
Marco,Use GetLastError()<!-- m --><a class="postlink" href="http://msdn.microsoft.com/en-us/library/ms679360(VS.85">http://msdn.microsoft.com/en-us/library/ms679360(VS.85</a><!-- m -->).aspx
About copyfile: checking results
I tracked the COPYFILE function errors using GetLastError() and an 1006 error appairs randomly copying files from an hard disk to a pen drive.This is the Microsoft error code:---ERROR_FILE_INVALID10060x3EE The volume for a file has been externally altered so that the opened file is no longer valid.---Is there anyone that already had this error copying data on a pen drive ?Any ideas ?Thanks.
About copyfile: checking results
I use CopyFile() intensively to copy from hard disk to USB devices and never noticed any problems. This is the CopyFile() definition I'm using:[code:28t3avu2]DLL32 FUNCTION COPYFILE&#40; cExistingFileName AS LPSTR, cNewFileName AS LPSTR, lFailIfExists AS LONG &#41; AS BOOL; PASCAL FROM "CopyFileA" LIB "kernel32&#46;dll"[/code:28t3avu2]EMG
About copyfile: checking results
[quote="Enrico Maria Giordano":2r62rvgm]I use CopyFile() intensively to copy from hard disk to USB devices and never noticed any problems. This is the CopyFile() definition I'm using: [code:2r62rvgm]DLL32 FUNCTION COPYFILE&#40; cExistingFileName AS LPSTR, cNewFileName AS LPSTR, lFailIfExists AS LONG &#41; AS BOOL; PASCAL FROM "CopyFileA" LIB "kernel32&#46;dll"[/code:2r62rvgm] EMG[/quote:2r62rvgm]Hi Enrico, thanks for your reply.I am using the standard copyfile provided from FWH and the DLL32 code is the same.I think it could be an OS/Hardware issue due to the fact that I also have a lot of customers that never reported me this problem but I would like give a suggest to this customer in order to solve/bypass this problem.
About copyfile: checking results
Sorry, I can't imagine why a simple API would GPF...EMG
About copyfile: checking results
Enrico,It seems as there is no a GPF but an error returned code.Marco, maybe you could try it for n times, in case that another try is able to do it.
About copyfile: checking results
Ops! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->EMG
About copyfile: checking results
[quote="Antonio Linares":2dkd2c91]Enrico, It seems as there is no a GPF but an error returned code. Marco, maybe you could try it for n times, in case that another try is able to do it.[/quote:2dkd2c91]Yes, in the meantime I asked the customer to format this pen drive and if the problem still remains I will try the copyfile 3 times before to stop the routine and display the error code.Thanks to all.
About copyfile: checking results
Marco,You might also suggest that your customer try another pen drive--the one they are using could be defective.James
About copyfile: checking results
Marco,I had a problem with USB drive on my VISTA PC, too.<!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?t=10541&start=0">http://forums.fivetechsoft.com/viewtopi ... 41&start=0</a><!-- m -->What is ISREADY( cDrive ) returning?Here it errored out with this error screen. As a solution I deinstalled all the USB ports and drivers and installed the USB ports again.Regards,Otto [img:2iby8ux2]http&#58;//www&#46;atzwanger&#46;com/fw/errorcheckdisk&#46;jpg[/img:2iby8ux2]
About copyfile: checking results
Otto,Have you located what exact function call is generating the GPF ? thanks,
About copyfile: checking results
Hello Antonio,I am sorry but I don't have done more tests as I reported in the thread.Now as I have reinstalled the USB ports I can't reproduce the error.Regards,Otto
About defining fonts
Hi to all. I'm rewriting some functions of a big procedure and I'm trying to optimize some parts of it. I have a procedure that launch another one that make a big use of several fonts and opening and closing them for 70000 times sometimes gives memory problems. That second procedure defines nearly 50 fonts, than prints some pages and than closes the print process. The printer is PdfCreator that when the print process is closed creates a PDF on a certain folder. The problem is that every time the second procedure is called, at the beginning defines all the fonts, and before the return to the main procedure ends all the fonts. I wish the define all the fonts in the main procedure, but they they can't be connected to the printer with the OF Oprn because the printer is not yet used. And i can't define the open in the main procedure because if I make this I can't make a PDF of every print process closing. Have you some ideas on how to make something like this ? Thanks a lot Massimo
About defining fonts
[code=fw:2wyw5uuv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Your Print Module</span><br /><br /><span style="color: #00C800;">static</span> aFont<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> YourPrintFunction<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oPrn<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oPrn<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> aFont == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> .... <span style="color: #0000ff;">OF</span> oPrn<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> .... <span style="color: #0000ff;">OF</span> oPrn<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #B900B9;">//</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Printing routine</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINT</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> ReleasePrinterFonts<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> aFont != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aFont, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; aFont := <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> nik<br /><br />END PROCEDURE printFuncsEnd<br /><br />&nbsp; &nbsp;ReleasePrinterFonts<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:2wyw5uuv] In the main program, after you close the main window call [code=fw:2wyw5uuv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ReleasePrinterFonts<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2wyw5uuv]
About defining fonts
Hi Nages. YourPrintFuncion is called by a previous procedure, that is in another PRG that can't see the aFont array.
About end of file (txt)
Hello Look that code pleaseResp := LOpen("TEXTO.TXT",0)Do While .t. Resp1 := cFReadLine(Resp) ========> why i can test end of file to abort this while? LoopEnddoThanksWanderson.
About end of file (txt)
I modify incoming formats this waygetcFile := cGetFile32("Print Files (*.ofx; *.ofc)| *.ofx; *.ofc |" ,"Please select a file",1)nBinary := FOPEN(getcFile)IF (nError := FERROR()) # 0 MsgInfo('Cannot open '+getcFile+CRLF+::FError(nError))ELSE MEMORY(-1) // Maybe not necessary now IF FREADln(nBinary, @cBuffer, 32768, CHR(0)) // CR & LF is stripped out and LF placed in the correct position // STRTRAN( <cString>, <cLocString>, <cRepString>, <nPos>, <nOccurences> ) --> cReturn cBuffer := STRTRAN(cBuffer, CHR(13)) //replace CR with Null cBuffer := STRTRAN(cBuffer, CHR(10)) //replace LF with Null cXML := STRTRAN(cBuffer, '<', CHR(10)+'<') //replace < with <LFENDIFFCLOSE(nBinary)// then saved to a new filecXMLBnkStment := SUBSTR(getcFile,1,RAT('\',getcFile))+'BNKSTMT.XML'nHandle:=FCREATE(cXMLBnkStment)FWRITE(nHandle, cXML)FCLOSE(nHandle)It's very fast with xHarbourHope this helpsJH
About end of file (txt)
Wanderson,This is a real fast way to do it:[code:dpjrf4wf] cTxtFile = MemoRead&#40; cRCFile &#41; nFrom = 1 while nFrom < Len&#40; cTxtFile &#41; cLine = ExtractLine&#40; cTxtFile, @nFrom &#41; &#46;&#46;&#46; SysRefresh&#40;&#41; end [/code:dpjrf4wf]
About end of file (txt)
Thanks Antonio and JH.
About font. Differences beetween FWH font and Windows font
Hi all,I need to know the exact font size needed to print a certain number o chars.I made the following function with these parameters:- cFontName, that is the font name - n_ColRequired that is the number of chars that I want to print in a single printer row- nMaxSize, the size of the paperIt seem to runs, however I receive a font number value different that the same I use in Word to print the same number of chars.I need to know the font in a Microsoft Word-like formatAny ideas ?Thanks in advance------------? GetFontSize("Arial",136,"210") Function GetFontSize(cFontName,n_ColRequired,nMaxSize) oPrn:=PrintBegin("") aPoints:=oPrn:Cmtr2Pix(0,nMaxSize/10) for nFontWidth:=90 to 1 step -1 oFont:=Tfont():New(cFontName,-nFontWidth) oPrn:SetFont(oFont) llv:=oPrn:GetTextWidth(replicate("B",n_ColRequired),oFont) llv2:=oPrn:Pix2mmtr(0,llv) if llv2[2]<nMaxSize && exit endif oFont:End() sysrefresh() next oPrn:End() return(nFontWidth)