Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Gerald Bates

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Re: Issues copying and pasting text into a console screen buffer

    A big thanks to 2kaud and VictorN for all your help. I have made the changes as recommended by 2kaud and both functions work correctly if you remember that the console is 0,0 based!

    The...
  2. Re: Issues copying and pasting text into a console screen buffer

    Thanks 2kaud, I have corrected the code but still getting a segmentation fault. Will run this through the debugger and see what is going on again!
  3. Re: Issues copying and pasting text into a console screen buffer

    After making changes, I now get a segmentation fault reported from the debugger. I have nailed this down to the char *buf[] within a loop in GetText(). I have miss-understood how to increment the...
  4. Re: Issues copying and pasting text into a console screen buffer

    I have been working on this code since 9 am this morning and run it through the debugger many times. It has dawned on me that memory is contiguous and that's how the computer views it. This had led...
  5. Re: Issues copying and pasting text into a console screen buffer

    Indeed, I could not agree more. I have very little experience of debugging but I am going to give it a go. Have made significant changes to the code as I think I understand what VictorN was hinting...
  6. Re: Issues copying and pasting text into a console screen buffer

    CHAR_INFO lpBuffer[width][height];

    I take this to be a local variable that creates an array of structures of type CHAR_INFO. So each lpBuffer[x][x] location stores the character and it's...
  7. Re: Issues copying and pasting text into a console screen buffer

    I am using Codeblocks 13.12 and GNU GCC compiler.
  8. Re: Issues copying and pasting text into a console screen buffer

    I am getting Hello placed back on the screen but in different colours and a background colour with that text. GetText() is copying the screen and does not produce any errors. The same is for...
  9. [RESOLVED] Issues copying and pasting text into a console screen buffer

    I have spent 3 days trying to get two new functions - GetText() and PutText() to function correctly with no success. Would someone be kind enough to look over my code and see why they do not work. ...
  10. Replies
    2
    Views
    8,170

    Re: Test post with code or php?

    code is better.
  11. Replies
    2
    Views
    8,170

    Re: Test post with code or php?

    int main(){ CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
    int width = csbi.dwSize.X; int height = csbi.dwSize.Y;
    char...
  12. Replies
    2
    Views
    8,170

    Test post with code or php?

    int main()
    {
    CONSOLE_SCREEN_BUFFER_INFO csbi;
    GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);


    int width = csbi.dwSize.X;
    int height = csbi.dwSize.Y;
  13. Re: Largest Console window supported?

    My apologies, this method is returning the correct values. I was playing around with the screen buffer. Thanks for your reply.
  14. [RESOLVED] Largest Console window supported?

    I am having issues with establishing the largest console window supported on my system. I have written this code:



    void vmApp::GetMaxConsoleAppSize()
    {
    COORD maxConsoleSize;


    ...
  15. Replies
    5
    Views
    396

    Re: Simple Handle question

    I understand. Thanks for the replies.
  16. Replies
    5
    Views
    396

    Re: Simple Handle question

    What is the standard error device? Is this not just outputting an error message to the screen using (I am guessing) GetLastError()? It's clear to me with respect to the other 2 handles what they...
  17. Replies
    5
    Views
    396

    [RESOLVED] Simple Handle question

    When using GetStdHandle() function I can understand you need to make sure that you have a valid Handle to be able to write (output) and read (input) to the console. What I don't understand, is...
  18. Replies
    8
    Views
    683

    Re: Design advice required

    I never considered composition in this case, but now I think it makes more sense. The trouble I have at times is understanding the 3 relationships my book refers too; "Has-A", "Is-A" and "Knows-A". ...
  19. Replies
    8
    Views
    683

    Re: Design advice required

    Thanks Laserlight. I have looked at abstract classes and it does not really fit into my design. I have not got any virtual functions and don't understand them at this time. I have decided to look...
  20. Replies
    8
    Views
    683

    [RESOLVED] Design advice required

    I am trying to design and implement a program that consists of two classes. The Base class A is purely for supporting class B. I do not want to be able to create an object of class A. When object...
  21. Re: Basic classes to develop console programs

    Looking into this and I have found that it's not possible to have more than one console per process so I have decided to only allow for one console window to be created. I am thinking that perhaps...
  22. [RESOLVED] Basic classes to develop console programs

    I am fairly new to C++ programming and wish to start learning the language properly. Recently I have started to write some classes that allow me to create console programs. The issue I am having is...
  23. Re: using composition with scope issue

    Paul, I am no expert so I thought it was better just to post what I did. In future I will try to replicate issues in a more compact way. I noticed you made vmColor c; public in vmConsoleApp so I...
  24. [RESOLVED] using composition with scope issue

    Following on from my console project I decided to change a line in my method for SetColor() in my color class that calls a public method in my ConsoleApp class. I now get an error 35...
  25. Replies
    2
    Views
    454

    Re: Composition Issue

    Thanks Mybowlcut,

    this works correctly now.
Results 1 to 25 of 26
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center