A: |
I was also very surprised when I noticed this. After some investigations,
I concluded that the window passed to TE_open must not be
"dirty" (i.e. it must not have WF_DIRTY flag set), but
windows created by WinOpen are "dirty" by default. So, you
need to clear "dirty" flag manually before calling TE_open.
This is straightforward. For example,
WIN_RECT myRect = {0, 16, 159, 92};
WINDOW myWin;
TEXT_EDIT te;
...
WinOpen (&myWin, &myRect, WF_NOBORDER);
myWin.Flags &= ~WF_DIRTY;
TE_open (&te, &myWin, &myRect, ...);
Anyway, there is no strong reasons to use any windows other than DeskTop
as a parent window, except if you want to use the whole screen for the editing area (the desktop
window is clipped in the toolbar area). But, note that using whole screen for editing is not so
good idea. The editor expects that the menu is on the top. So, if you press F1 etc. while doing
"full-screen" editing, your screen will be trashed, because the editor will open the menu, and
it will expect that the toolbar is at the top, etc. etc. Try to see. The solution? Disable all
keys like F1, etc. in the event handler (e.g. do not pass them to TE_handleEvent)
if you really want to do full screen editing...
|