get char on screen

早过忘川 提交于 2021-02-19 07:10:40

问题


I've looked through the NCurses function list, and I can't seem to find a function that returns the characters already printed on the screen. Is there an accessible value for the char stored in each character cell? If not, is there a similar function in the Windows terminal?

I want to use this to replace all the characters on the screen of a certain value (ex: all the a's) with a different character, or with new attributes.


回答1:


The function inch() gets the character and returns it as a chtype. Use winch() to get a character from a window other than stdscr.



来源:https://stackoverflow.com/questions/7072826/get-char-on-screen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!