Hi all, I am fairly new to VC++ and am looking for some advice before I start a new program. I want to write a program that looks like a terminal session. i.e. one window - it will present a prompt i.e. # and flashing cursor you then type your command and press enter. The results then appear on the next line followed by a new prompt and flashing cursor on the next line. (I think you get what I am after) I have played with using edit box, rich edit box and list box all seem to be able to acheive this sort of program one way or another, but which one should I really be using?? All advice greatly appreciated, Thanks all, Tryhard :-)
Tryhard
Posts
-
Terminal Type Window???? -
Sending text to an edit boxHi all, I have modified a program I am writing to use an edit box instead of a list box for displaying text. I was using insertstring to send text to the top line of the listbox: m_theconv.InsertString(0, replyprefix + m_Reply); What would be the best way to acheive this in an edit box???? (Yes - I am a newbie to VC++) Any help greatly appreciated. Thanks Tryhard :-)
-
Windows XP RegistrationHave to agree with Rassman on this one, HP is not a bad company at all, on the business server side they make excellent equipment, extremly reliable. And you would be foolish to think about saving a few bucks by using laser printers from anyone else. If you pay for 4 hour response they will be there parts in hand in 4 hours. Now the PC business on the other hand is probably a rebadged cheap generic kit. (That's probably why they bought Compaq - they will no doubt just sell Compaq PC's in the future - although I've never liked them either - always trying to make it not quite standard - you must buy compaq bits for upgrade etc... not good) Tryhard :-)
-
VC++ and SQL insertThanks Guys. Sorted. Tryhard :-)
-
Awards for this weekHow about dumbest nickname :-) Tryhard :-)
-
VC++ and SQL insertHi Y'all I am trying to insert a CString into a database table. this is what I have but it literally puts the %s into the table remove the ' and I get an error. CString CSWholesentence = "This is the whole sentence"; SqlString = "INSERT INTO Sentences (SENTENCE) " "VALUES ('%s')", CSWholesentence; database.ExecuteSQL(SqlString); Any help greatly appreciated. Cheers :confused: Tryhard :-)
-
Hey AussiesDefinetly don't think Texas when thinking beer, Shiner anyone. lol Tryhard :-)
-
My turn to vent on EnglishNo what you blatantly fail to comprehend is that America actively setup a society to simplify English. (dumb it down) The English-speaking emigrants to America took with them a well-established and relatively uniform system of spelling. The other immigrants who came to America from different countries had to adopt the English language. The cultural and language backgrounds of these people were very diverse. In order to make the English language easier to learn to the emigrants, it was necessary to simplify (dumb down) the spelling. This began in 1768 when Benjamin Franklin proposed a new phonetic alphabet. Some twenty years later Noah Webster continued the project Franklin had started. However, the American people were not willing to take in the complete reconstruction of spelling. In 1790 in his Collection of Essays and Fugitive Writings, Webster attempted a new, modified reform of English spelling. He did not use any new symbols but the principle was to omit silent letters and to use analogy to groups of spellings for the purpose of getting rid of anomalies. The new way of spelling was not received any better than the previous attempt to simplify (dumb down) spelling. Gradually Webster became less radical. With each of his published works on spelling he seemed to become more conservative and more approving towards the tradition and general usage in spelling. In American Spelling Book Webster had given up the idea of complete reform of the English spelling and was satisfied to base his spelling on the recognized authors of English language. He was, however convinced that the spelling of words such as publick, favour, neighbour, head, prove, his, give, debt, rough would sooner or later become "more rational and easy." Some spellings have changed according to what Webster anticipated: public, favor but most of them have not. For example, the omission of silent letters in words like neighbour - nabor, head - hed or rough - ruf have not come true the extent Webster suggested. What has remained from Webster's spelling for today, is the omission of k in final syllables in words like magic, tragic, havoc, logic. This feature is common for both the American and British English of today. The omission of u in the final syllable of words like favor, honor, behavior is however peculiarly American English phenomenon and today's British English tends to retain the u; favour, behaviour, colour etc. Webster was much more radical in reforming the spelling of peculiarly American place names. He, for example w
-
Trivial Mind Test :-)Full Metal Jacket Tryhard :-)
-
My turn to vent on EnglishAt the end of the day the yanks actively sought to dumb down english, I think it is kind of appropriate. Read into this what you will. Tryhard :-)
-
Trivial Mind Test :-)Anyone? These are great day we're living, bros. We're Jolly Green Giants, walking the Earth . . . with guns! Tryhard :-)
-
Trivial Mind Test :-)They Live. Tryhard :-)
-
Trivial Mind Test :-)"Don't mind her. She's just upset that someone dropped a house on her sister." Actually it was Beetlejuice. Tryhard :-)
-
Trivial Mind Test :-)That is a line in a computer game, Duke Nukem. :-) Tryhard :-)
-
Trivial Mind Test :-)Name this movie. Quote: "Don't mind her. She's just upset that someone dropped a house on her sister." Tryhard :-)
-
Access Database woes...Hi all, I am trying to update a record in an Access Database(I am new to DB programming and VC++), from everything I have read the following code should acheive the desired result but it gives a DB exception. Have I missed a readonly flag or got something wrong in my database.open command??? Any pointers greatly appreciated, Thanks in advance, Tryhard Code:- CDatabase database; CString sSql; CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)"; CString sDsn; CString sFile = "d:\\Docs\\Wayne\\C\\Converse\\CDAT.mdb"; TRY { // Build the creation string for access without DSN sSql.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile); // Open the database database.Open(NULL,false,false,sDsn); // Allocate the recordset CRecordset recset( &database ); // Update data sSql = "UPDATE Convhist " "SET GREETINGCOUNT = '1'" "WHERE YOURFIRSTNAME = 'WAYNE'"; // Execute SQL Statement database.ExecuteSQL(sSql); // Close the database database.Close(); } CATCH(CDBException, e) { // If a database exception occured, show error msg AfxMessageBox("Database error: "+e->m_strError); } END_CATCH; }:confused: :confused: Tryhard :-)
-
case insensitive compare???Hi Guys, I am retrieving a field from an Access database and then comparing it to something the user enters looking for a match. However I don't get a match if the case is different. (of course) How do I do a compare that doesnt care about the case??? or how do I change a CString var to all lower case Any help greatly appreciated. Thanks Guys, Tryhard :-)
-
extract a substring from CStringHi all, I am new to C++ and I have to say my biggest hurdle is getting my head around what operations I can do with the various var types. It seems everytime I try and do anything with a CString I get an error telling my 'can't convert CString to char *' or various errors all along these lines. Anyway I think I am starting to get there :-) I need to extract a substring from a CString. i.e. CString = "This is a test string" say i need to get the word test out and store it in an word array. I know what position it starts and i know what position it ends, so I of course know how many chars I need. What should I use to get that word from the CString and stick it in say word_array[word_count]??? Any pointers are greatly appreciated, Cheers Dudes, Tryhard Down Under PS - Thanks to all who have replied to my previous posts esp. C.G. Thanks Dude, very helpfull :-) Tryhard :-)
-
if ( yousaid.GetAt(current_pos) == "[A-Z]" )Hi all, I apologise if this is real simple stuff, I am new to C++. I come from a 16 yr UNIX background, so I think in script & Perl. I am trying to check if a character in a CString is a uppercase Alpha. if ( yousaid.GetAt(current_pos) == "[A-Z]" ) This obviously isn't how to do it in C++ Any help appreciated. Cheers Dudes:confused: Tryhard :-)
-
Why 1st World Nations Simply SuckAmericans and English lol... Americans do not speak English they speak American. I am so tired of Microsoft trying to force me to put a z where an s (capitalise) should be, completely missing out the u (harbour) in many words or switching e and r around (center). (Yes I know about locales) And of course hearing an American say Herb or Alluminium is always a laugh. I have no problem with this it seems kind of appropriate that America has dumbed down english spelling. (keep it simple - spell it as you say it plough - plow, draught - draft, etc... ) ;P Tryhard :-)