James Hunkins writes: > In C68 when I set things to a window using wm.swinf or wm.swapp, any > printf statement after that goes into the proper window within my app. > > When I do a drop down menu (window), doing the same call and clearing > the window with the returned channel works just fine. > > But when I do another printf, the text ends up at the 0,0 location in > the primary (owner) window, not in the drop down menu area at all or > any sub-window element. > > Any idea what is going on and how I can write to a info window within > a drop down menu? I want to do some information updates quickly > while copies and things are happening.
(Jim probably knows most of the below already ;o) but others wont.) Its probably happening because a sub-window is not really a fully-fledged window, with its own channel no. etc. You need to make the window think it is the sub-window. There is a call to do this. In EasyPtr for S*Basic the one call MWINDOW does this for all elements. In C look for a routine called something like WM_SWDEF. Other calls, such as WM_SWLIT and WM_SWSEC, set the window to the size of a LI or a sub-window menu section respectively. (These routine names are taken from EP's C library). Ive noticed that PE sometimes gets in a muddle (I always thought this was an EP peculiarity, but perhaps it isnt). Certain actions and errors seem to reset the window (eg malformed windows, window or element too large, writing to a different element in between writes,..). You could also try to re-assert the setting each time just before you print to the window. Per _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
