Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Brett Peirce

@Brett Peirce
About
Posts
15
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Saving console's output buffer
    B Brett Peirce

    Sorry I took so long to respond. This looks like basically what I'm after, assuming I can figure it out (and the memory address is correct) - It'll take me a bit to figure it out. Thanks for your help; I hope I get it working - we'll see. I appreciate your time.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC c++ tutorial

  • New to VC++
    B Brett Peirce

    Though I personally use streams (cout) for my programs at school, and I am not familiar with the printf() function, If you are using VC++.Net, I think you actually have to put a system("pause"); at the end of your program or it will not remain open long enough for you to see anything... other than that, you'll have to wait for someone else to answer. I hope it helps! sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC question c++

  • Saving console's output buffer
    B Brett Peirce

    I am not attempting to start another application or window or process, unless that is the only way to accomplish my goal.     My goal is to basically have a splash screen or menu or notification box or anything, pop up in the middle of an application, getting a response from the user, and then disappearing, leaving the former output intact.     This is an ideal situation - I know it must be possible, because I have seen it in several DOS applications. I assume that they were written in c++ or that this function can be emulated or reproduced in c++ in some way.     It is not necessary to the function of the program, but looks a lot nicer than clearing the screen or buffer. Also, I think it must be easier to save and restore the buffer (that is, whatever may be displayed on the console screen at the time) than it would be to figure out whatever may be displayed and restoring it manually.     I don't want to open another window or start another program, I want to more or less simulate what windows shows with menus or dialog boxes (except extremely simplified) in a single console/DOS window or from the command prompt. sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC c++ tutorial

  • Saving console's output buffer
    B Brett Peirce

    Thanks for the idea.     I am hesitant to go that route for a few reasons, though. I was hoping that it would be possible to accomplish without using windows.h and other such things - hoping for pure console-type code. Aside from that, though, I haven't used handles or child processes or a few other things in that code before, and it's very daunting to look at it and challenging to understand it.     Would you have any other ideas or a link to some reading material that might help me understand all that a little better? Also: I noticed the use of printf() in that code. Is it possible to use streams (cout and cin) or at least getch() and such with that code? I appreciate your time and knowlege.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC c++ tutorial

  • Calling .exe withing project.
    B Brett Peirce

    ANSI standard c++ for console programs would be system("foo.exe command line args");. I would assume that it would be valid for use in VC++.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC question discussion

  • Saving console's output buffer
    B Brett Peirce

    I would appreciate any information someone might have on how to save the console's output buffer so that I can have another screen temporarily display it's contents and then restore the former contents as though nothing happened. I would prefer any code or class references to be ANSI (Dev c++ compatible) but I will take any kind of suggestions anyone can offer. Thank you greatly!


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC c++ tutorial

  • Console Output Formatting
    B Brett Peirce

    I am trying to output to the console and trying to center words on the screen. I realize that I cold assume 80 characters can be displayed across - its pretty much the absolute standard these days - but I was wondering if anyone knows a function to get the character width of the console output so that I can use that to be a little more universal in my centering function. Anyone know?
    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    C / C++ / MFC question

  • Console Output Formatting
    B Brett Peirce

    I am trying to output to the console and trying to center words on the screen. I realize that I cold assume 80 characters can be displayed across - its pretty much the absolute standard these days - but I was wondering if anyone knows a function to get the character width of the console output so that I can use that to be a little more universal in my centering function. Anyone know?
    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Managed C++/CLI question

  • Help with code for telephone validator
    B Brett Peirce

    what do you mean by validate? making sure that it is a number that will reach someone? or just making sure it is 3 digits followed by a dash followed by 3 more digits etc...? or perhaps something else?


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Visual Basic help

  • Detecting system events
    B Brett Peirce

    I know generally how to raise and detect/handle events in my own programs, but how does one detect system events? I can't imagine there aren't events raised when someone selects a start menu item, much less something like a system error or a new usb device being inserted. anyone have a few hints where to start looking for things like this? and what about making my programs raise system-wide events? are all events system-wide(if they are public that is)? thanks to anyone with this info.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Visual Basic css help tutorial question

  • VB.NET Multiline Textbox
    B Brett Peirce

    Though it is probably not the best way to do it, this is probably what I would do: I would set the form's KeyPreview Property to true, making the form's KeyUp, KeyPress, and KeyDown Events (and whatever sub(s) you may have to handle them) get a crack at what the user pressed before the textbox would. If you did this, then you would then write some algorithm to determine whether the character that the user pressed (if it was entered at the cursor or in place of any selected text) would cause one of your tags to change. If it would, then you absorb the keystroke by setting the KeyPressEvents.Handled Property of "e" and then do nothing else. If I'm right, and of course if you can figure out that algorithm, then the effect should be an un-alterable "tag" in the middle (or any other part) of the text box control I do wonder: What if someone accidentally inserts an incorrect tag (like #dog# where it should be #one if by land, two if by sea#)"? Do you have an erase function? If you do have that algorithm working, maybe you could use part of it to select tags when you double click (or even single click) on the text box; then have a button to delete the tag. As for a mostly different approach, you could have buttons (or whatever) to insert the tags, and let the users edit them to their heart's content. However, when the user submits the text for processing, have an algorithm go through and correct simple mistakes in the tags and/or point out invalid tags, giving the user a chance to cancel their submission, or change the tags at that time ("Spell-Check" Style - but with tags) Oh Yeah - Good Luck P.S.: Feel free to mention me in the about box if you feel my contribution was valuable - and, uh... any checks in the mail would be welcome too :laugh:


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Visual Basic csharp database question

  • VB Form - Multithreading?
    B Brett Peirce

    I have created the following in VB.Net2003: I have a working form that I think has all necessary properties, methods, and procedures to do what I want it to do. In other words, I have it so that it will appear when I press a button on another "parent" form, and will close when I click its close button. I want to be able to create many instances of this form from the "parent" form and I want them to work independently and close independently, but be able to communicate back and forth (send and get strings and other objects) with the "parent" form. I would also like them all to close, each having the chance to save information, when the "parent" form is closed. I think that in order to do this I may need to do multi-threading, making each new instance in a new thread - but I don't think I want to go through multi-threading. Would a collection work? Any help on either of these concepts or anything else that you might think would allow me to accomplish this would be greatly appeciated.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Visual Basic csharp help question

  • Generating character combinations - help!
    B Brett Peirce

    yes indeed, why would you want to do this - maybe it's something as innocent as a class assignment, but maybe not... if it is innocent though, an example in VB like the one above - just in case you are sitting there scratching your head - is as follows:   Dim x, y As Integer 'declare x and y - your counting variables   For x = 1 To 20     'anything inside this loop, including the following loop, will be repeated 20 times     For y = 1 To 30       'this loop will repeat anything inside it 30 times     Next   Next Of course you're not limited to "For" loops; you could use any kind of loop. And if you're still sitting there scratching your head, then you need to learn a little more about programming in general - buy a book or take a class. btw Good luck with those passwords - I mean that assignment. sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine. -- modified at 0:16 Thursday 20th October, 2005

    Visual Basic help tutorial question

  • Intellisense (I think) malfunction?
    B Brett Peirce

    Thank you greatly. I did happen to notice it suggesting other things for other objects since that post and managed to follow your advice before reading it. Thank you nonetheless for your answer.


    sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.

    Visual Basic visual-studio tutorial csharp help question

  • Intellisense (I think) malfunction?
    B Brett Peirce

    I've never had this problem before on any other computer or on my previous installation of VS.Net. (I have VS.Net 2003 Pro) What I think is referred to as intellisense (the little context-sensitive drop down box that offers an alphabetical list of suggestions when you're typing code) seems to always be defaulting to something in the "t" range as follows: When I type txtSomething (a textbox on my form) and then . the box comes up with textlength highlighted as the suggestion. This happens when I refer to any object (combo box/label/the form itself) in code and want to change a property of that object. It's not really a problem in most cases, but when I want to change or get the text in a text box (like in the example above), I can't simply type txtSomething.text = ... or else the intellisense thinks I want to select .textlength and kindly inserts it for me when I press the space bar after typing text which then produces txtSomething.textlength = .... the only two ways I can stop it from doing this are by pressing the up arrow key twice after typing text but before pressing the space bar(so as to select text instead of textlength, or just going back to correct it each time. Generally, I like this feature of VB/VS.net, but it's not working the way I think it's supposed to. Anyone know what's happening? how to shut it off? reset something? thanks in advance sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine. -- modified at 1:58 Tuesday 18th October, 2005

    Visual Basic visual-studio tutorial csharp help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups