>>> 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?
Hm, can't see much against it, if it works properly. [ Update: After reading the ChangeLog entry, the Win95 weirdness makes this feature rather strange. I'd guess that this omission have a proper solution, and always assuming that user clicked 'OK' (IOW ignoring what user selected) is not the right thing to do. IMO this needs to fixed to be true to Harbour quality. It's also better solution to not present the windows on Win9x systems at all. This way at least users are free of surprises. ] > 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 No, this is an ugly hack which we have a much better solution for. Anyway such low-level details should never be propagated to .prg level, otherwise we lose the major advantage of such high-level language as Harbour. > 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. Yes. > 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. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
