getmaxyx - get size of a window
#include <curses.h> void getmaxyx(WINDOW *win, int y, int x);
Refer to getbegyx().