Thread: Making a larger window with curses

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    21

    Making a larger window with curses

    Hello,

    I am working on a program at the moment in curses in c and I want to use a bigger window to work with, at the moment I am using the standard size which I believe is 80,25

    Code:
        initscr();
        keypad(stdscr, TRUE);
    The problem is that I can't initialise the screen to be larger and I can't drag it larger when the program starts (although I can shrink it). I'm not sure if this is a curses problem or a general C problem but any help would be appreciated.

    Thanks

  2. #2
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    What operating system and IDE are you using (assuming you're using an IDE)?
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    21
    Windows 7, Dev-C++

  4. #4
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    One thing you could do is to make a shortcut to the exe file (right click on the exe and choose "copy" (not "create shortcut"!) then right-click on your desktop and choose "paste as shortcut"). Then right-click on the shortcut and select properties. In the layout tab you can set the window size width and height. Start the program with the shortcut.

    Post back if that doesn't work.

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    21
    I want to be able to create the window the correct size based on variables I input so that it could be a different size each time. I have two values currently which I would want to use and these values can be changed either in code and hopefully later in the program. So I don't think this solution is what I'm looking for, I was hoping for a something I can put into my code.

    Thanks for the help so far though =)

  6. #6
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    There are several flavors of curses. Do you know which one you're using? Here's a reference for ncurses that may be enough to get you going: ncurses 3x. Look into some of the resize functions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. output an array to curses, or to another window?
    By trev456 in forum C++ Programming
    Replies: 2
    Last Post: 04-18-2007, 10:08 AM
  2. Making dialog box the only window
    By PJYelton in forum Windows Programming
    Replies: 2
    Last Post: 09-06-2005, 12:02 PM
  3. making a window
    By Rune Hunter in forum C# Programming
    Replies: 7
    Last Post: 07-06-2005, 05:31 PM
  4. making a window program
    By DDX in forum C++ Programming
    Replies: 30
    Last Post: 03-21-2005, 04:12 PM
  5. making a window 100% on top
    By Rare177 in forum Windows Programming
    Replies: 1
    Last Post: 10-10-2004, 05:53 AM