Hi, WCenter() does not seem to work properly, at least in my installation. The problem arises when I pass the parameter [.t.], in order to obtain a real centering, that is, in the center of 'physical screen' (or terminal window). Although the wrow() wcol() coordinates seems to been updated correctly, the window's region does not move to the center of screen. The result is corrupted / mispositioned text, leaking out of the viewable margins of the window. The interesting thing, which (maybe) could help to isolate the problem, is that if you call alert() and then close it, immediately after the previously unsuccessfully 'centered' window, moves to the correct place in the center and everything looks ok. The other "collateral damage" is that (portion of) the alert() is not displayed on the topmost screen layer, but overlapped beneath the 'non-centered' window. However, after the "alert() trick" the overlap problem vanish.
Below is a small prog, showing the problem. (Tested with both MingW and BCC, using Pritpal Bedi's latest distro.) /*----------------------- code -------------------------*/ PROC Main() SetColor("W+/B") Scroll(); DevPos(0,0) ? "Hello Harbour.." ? "It was a long time............................." @ Row()+2, 0 Say "Ok! now let's open a win. (press a key..)" Inkey(0) SetColor("W/BG") wopen( 0,0,10,40 ) wbox("ÚÄ¿³ÙÄÀ³") WinMess("This is a window. Press a key to center it, please.") Inkey( 0 ) wcenter(.T.) Alert(" Hmmm! <wcenter()> doesn't seem to work properly..; ..not to mention that <alert()> is being overlapped!") winMess("The very same window again. It must be centered now. (or not?)") Inkey(0) Alert("How about alert position?") return ******************** PROC WinMess(cMess) *** Scroll() DevPos((MaxRow()/2)-1, 0) ? cMess RETURN /*----------------------- End code -------------------------*/ --- Pete ___________________________________________________________ Χρησιμοποιείτε Yahoo!; Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour