On Fri, 15 Jan 2010, Przemysław Czerpak wrote: > > > QUESTION: TextOut() method uses 4-th parameter to control text > > > alignment but it uses own constant values: > > > 0 == left, 1 == right, 2 == centered > > > instead of TA_* constants. Should we keep it or rather > > > use windows constant values adding also support for > > > vertical > > > alignment? In current xHarbour code this parameter was > > > changed > > > to accept windows constants and 5-th parameter was added > > > which > > > is OR-ed with the 4-th one but for me this part is > > > redundant. > > I vote for Windows constants (already in hbwin.ch) and > > only one parameter. Easy to add/or them, no need for two. > Thank you, I'll update the code.
Done. I have yet another question about one modification implemented in xHarbour. It supports yet: :AskProperties which allow to activate DocumentProperties dialog from :Create() method so user can make interactively his own settings. Below is xHarbour ChangeLog entry which introduced this feature. Question to windows users: Do you think it's valuable extension? Should we add it too? xHarbour also supports TextOutW() and TextOutWAt() methods but I do not want to implement them because they use HVM string items directly casted to windows wide char strings. For me it's rather a workaround for missing direct support for compilation with UNICODE macro and automatic HVM CP translation then final solution. Additionally we will have to remove it when we add support for UNICODE string items to HVM. Please note that when Harbour ms-windows build is compiled with UNICODE macro then all strings passed from user code are automatically translated to unicode values using current HVM codepage what effectively resolves encoding problems when user wants to print text encoded in the same CP as used by HVM. Anyhow if someone really needs above methods now then we can add WIN32PRN class to XHB library which will inherit from WIN_PRN and here we can implement them. best regards, Przemek 2007-11-10 23:30 UTC+0700 Budyanto Dj. <[email protected]> * source/rtl/win32prn.prg % Added ::AskProperties If it is assigned .t. prior to calling ::Create(), a DocumentProperties dialog will be displayed. Example: oPrinter:= Win32Prn():New(cPrinter) oPrinter:Landscape:= .t. oPrinter:AskProperties := .t. IF !oPrinter:Create() ... NOTES: For unknown reasons, Windows98/ME returns IDCANCEL if user clicks OK without changing anything in DocumentProperties. Therefore, we ignore the return value in Win9x, and assume user clicks OK. IOW, DocumentProperties is not cancelable in Win9X. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
