Various Questions

This is a discussion on Various Questions within the Game Programming forums, part of the General Programming Boards category; Okay, here are my questions: (For console mode) 1. On my windows 98 system, the dos box is 80*25 er, ...

  1. #1
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Various Questions

    Okay, here are my questions:
    (For console mode)
    1. On my windows 98 system, the dos box is 80*25 er, well squares. How do I make it larger?

    2. How and what does PeekConsoleInput do? I have tried and it doesn't do squat for me.

    3. If I put at the top of my main() function
    SetConsoleMode(hInput,ENABLE_PROCESSED_INPUT);
    ya know the thing that allows cnrl+C, if I try to enter a string via cin>> , the letters don't come up? What's up w/that?

    Thx
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Re: Various Questions

    1. On my windows 98 system, the dos box is 80*25 er, well squares. How do I make it larger?
    You can change the size of the font, but you can't change the "resolution" 80x25.

    2. How and what does PeekConsoleInput do? I have tried and it doesn't do squat for me.
    Borland help files

    The PeekConsoleInput function reads data from the specified console input buffer without removing it from the buffer.

    BOOL PeekConsoleInput(

    HANDLE hConsoleInput, // handle of a console input buffer
    PINPUT_RECORD pirBuffer, // address of the buffer for peek data
    DWORD cInRecords, // number of records to read
    LPDWORD lpcRead // address of number of records read
    );
    Parameters

    hConsoleInput

    Identifies the input buffer. The handle must have GENERIC_READ access.

    pirBuffer

    Points to an INPUT_RECORD buffer that receives the input buffer data.

    cInRecords

    Specifies the size, in records, of the buffer pointed to by the pirBuffer parameter.

    lpcRead

    Points to a 32-bit variable that receives the number of input records read.

    Return Value

    If the function succeeds, the return value is TRUE.
    If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

    Remarks

    If the number of records requested exceeds the number of records available in the buffer, the number available is read. If no data is available, the function returns immediately.

    See Also

    INPUT_RECORD, ReadConsoleInput, WriteConsoleInput
    3. If I put at the top of my main() function
    SetConsoleMode(hInput,ENABLE_PROCESSED_INPUT);
    ya know the thing that allows cnrl+C, if I try to enter a string via cin>> , the letters don't come up? What's up w/that?
    Borland help files

    ENABLE_PROCESSED_INPUT CTRL+C is processed by the system and is not placed in the input buffer. If the input buffer is being read by ReadFile or ReadConsole, other control keys are processed by the system and are not returned in the ReadFile or ReadConsole buffer. If the ENABLE_LINE_INPUT mode is also enabled, backspace, carriage return, and linefeed characters are handled by the system.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    to manually make the console fullscreen, just press alt+enter or shift+enter, something like that.

  4. #4
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Wink

    To magos:

    Yeah, I know what the help file says. But I was hoping for a human re-exclamation. Thx anyway about the first and lest question. I still don't really understand what the help file says regarding #3. So what about peekconsoleinput. How is it different from readconsoleinput
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  5. #5
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Originally posted by Stan100
    So what about peekconsoleinput. How is it different from readconsoleinput
    Peek* reads what is in the input buffer. Read* does the same, but also removes it from the buffer when done.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 08:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21