使用护士刷新重叠的窗口
Refresh overlapping windows using ncurses
我创建了一个与其他窗口重叠的弹出窗口,我修改了它,然后删除了它。但是当我这样做的时候,背景窗口保持空白。
popup(){
WINDOW* backgroundWin = subwin(stdscr,0,0,100,100);
//fill it with something
WINDOW* popupWin = subwin(stdscr,50,50,10,10);
werase(popupWin); //so it doesn't look 'transparent'
box(popupWin,0,0);
wrefresh(popupWin);
getch();
werase(popupWin);
delwin(popupWin);
refresh(); //when I do this refresh the contents of the popup window stay, in this case blank spaces because I used werase
}
编辑:根据这个使用touchwin(stdscr)刷新之前应该工作,但它没有http://linux.die.net/man/3/touchwin
我看到了我的问题,当我需要创建一个新窗口时,我正在创建一个子窗口。当我测试主窗口被改变的地方,使用is_wintouch,它只在删除子窗口后返回true,我不知道为什么。
窗口位于窗口原点的中间,因此对一个窗口的更改将影响两个窗口。http://linux.die.net/man/3/subwin
相关文章:
- Ardunio UNO解决了多个重叠的定时器循环
- 如何在Qt窗口小部件中使用QStringView(或QStringRef)
- 问:如何使用C++中的按钮从窗口打开窗口
- 在c++中检查长方体是否尽可能快地重叠(无迭代)
- SDL 窗口不会弹出
- 在createdialog创建的窗口中捕获用于编辑控件的OnMouseMove消息
- 如何在cpp文件之间切换窗口?在Qt中
- QuadTree只在窗口的右上角绘制
- 算术序列与区间的最大重叠
- Xlib.检查窗口是否重叠
- 如何在使用网格布局时重叠qwidgets,并将重叠的widget定位在距离窗口边界特定距离的位置
- pdcurses/ncurses中的重叠窗口
- C++Win32窗口重叠事件
- CreateEx()创建的子窗口与同级窗口重叠
- 检测窗口何时被来自相同或不同进程的另一个窗口重叠
- 停止应用程序窗口重叠窗口开始栏
- 创建最小化重叠窗口(Win32)
- 使用护士刷新重叠的窗口
- 窗口标题重叠Opengl渲染
- Win32窗口样式重叠问题