Hey long time no see! Anywayz, What would be the easiest way to get IDC_EDIT1 (total amount) be split into dollars and change... IDC_EDIT1 (Total) = 1.50 IDC_EDIT2 (Dollars) = 1.00 IDC_EDIT3 (Change) = 0.50 How would i split 1.50 into 1.00 and 0.50? Or how would i split $15.68 into $15.00 and 0.68? Any help would b greatful, nice to see you all again! /* Just a Human Trying to Live in a Computers World. */
NewbieStats
Posts
-
MFC Question -
Question...Okay Alok, ive realized maybe itll be easier using the idea you said... But i gotta try what i thought... Dont ask why, its driving me crazy...
void CNewAccountDlg::OnOK() { CString strUsername; CString strPassword; CString strTest; GetDlgItemText(IDC_USERNAME,strUsername); GetDlgItemText(IDC_PASSWORD,strPassword); m_USERNAME.SetSel(0,1); m_USERNAME.Copy(); ofstream a_file ( "data/account.dat", ios::ate, ios::app); a_file<< strUsername + " " + strPassword + "\n"; a_file.close(); AfxMessageBox("Account Created."); }
Paste is not a member of CString. So how would i paste m_USERNAME to strTest? Or is there a way to justm_USERNAME.SetSel(0,1)
and tranfer tochar test[02];
? /* Just a Human Trying to Live in a Computers World. */ -
Coding Text...Okay thanks ill try them both and see which one seems to fit better ;) /* Just a Human Trying to Live in a Computers World. */
-
ifstream operator>>Disreguard my stupidity and "newbie-ness", But isnt there a way to translate Binary to text and back to Binary?... Im lost now :( /* Just a Human Trying to Live in a Computers World. */
-
ifstream operator>>oOoh i learned something today :) cant you still jus use the eof function like ur using getline? /* Just a Human Trying to Live in a Computers World. */
-
ifstream operator>>Why are you doing it that way?... The Golden Rule in Programming: Keep It Simple Stupid. No offense, but its true... The code i jus posted will do everything ur doing, and make ur life alot easier... /* Just a Human Trying to Live in a Computers World. */
-
ifstream operator>>char idata[256]; ifstream a_file ( "data/text.dat" ); while (! a_file.eof() ) { a_file.getline(idata,256); cout<< idata < At the end of the file it stops reading and continues with ur code... is that what u mean? /* Just a Human Trying to Live in a Computers World. */
-
Coding Text...Would it be Easier to do that or use; strPassword.SetSel(0,1); // ++ Copy and Paste to New CString and Add all CStrings together?... Seems like a long process, but would it be better? /* Just a Human Trying to Live in a Computers World. */
-
Coding Text...Alright... Using fstream when making a simple database using MFC... Say you want to make every letter another letter (coding)... Is it possible?
void CNewAccountDlg::OnOK() { CString strUsername; CString strPassword; GetDlgItemText(IDC_USERNAME,strUsername); GetDlgItemText(IDC_PASSWORD,strPassword); ofstream a_file ( "data/account.dat", ios::ate, ios::app); a_file<< strUsername + " " + strPassword + "\n"; a_file.close(); AfxMessageBox("Account Created."); }
Nothing wrong with that... Makes a simple file with Username and Password. How could i break my GetDlgItemText into single CHAR allowing me to change them and regroup them back together? Is it possible to break down a String into single Characters? /* Just a Human Trying to Live in a Computers World. */ -
CEdit for UNICODE applicationsMaybe Set a ComboBox with languages you want supported... And when selected change the regional settings of ur CEdit to what the language is?... I dont know, ive never done anything with any other language support other then english... Just an idea? /* Just a Human Trying to Live in a Computers World. */
-
Security formOffline or Online? Offline apps that ask for username and password can use simple file i/o for login if you wanted to... the second form (registration form) could also be easily done with fstream and calling the login part to read from exact file... dats if u wanna do it easily... Online, im stuck on that as well but ill let u know when i get it ;) If you need help with offline logins then i could help you with what you need, im sure others here will be glad to give u links to articles thatll help you with server logins... There are many articles relating to login authorization, just use the search button :) /* Just a Human Trying to Live in a Computers World. */
-
header fileAre you just looking for a header file that will support Sleep? /* Just a Human Trying to Live in a Computers World. */
-
how to write in text fileAdd ur header:
#include "fstream.h"
To write to File "Title.txt", at end of file.ofstream a_file ( "Title.txt", ios::ate, ios::app); a_file<< "Data"; a_file.close();
To read from File "Title.txt"char idata[256]; ifstream b_file ( "Title.txt" ); while (! b_file.eof() ) // From beginning to End of File. { b_file.getline(idata,256); cout<< idata < Hope it Helps... Replace the "Title.Txt" or "Data" with a variable and dont use the ""'s and you can have it set by user. Does this help? /* Just a Human Trying to Live in a Computers World. */
-
Solution ExplorerWhy does all Username // Password things say to use Solution Explore? What the hell is it? And where can i find it? According to MSDN its in Visual Studio... Can i access it in Microsoft Visual C++ 6.0 Compiler? How?... will it do any good with logging onto//creating accounts on a server or is it just based on the users comp? Im So Lost... :^) /* Just a Human Trying to Live in a Computers World. */
-
Golden Rule in Programming...Keep it Simple Stupid... The Famous Golden Rule in Programming... Why Stress yourself to make your Program so complex that no one cares? Dont stress your mind, get fustrated, irritated, and even alittle insane over your program. Most of the time you dont understand your problem is because you dont understand your program, Keep it Simple Stupid... Thats the most Professional Advice you will ever get when your Programming... When you begin to get stressed, turn ur monitor off, walk away, walk down the street and think, Keep it Simple Stupid. Enjoy! :cool: /* Just a Human Trying to Live in a Computers World. */
-
C++ HelpC++/MFC Articles just look through them and pick what you like... /* Just a Human Trying to Live in a Computers World. */
-
Your Opinion...If your making a program that has constant communication between computers... Would you find a box and turn it into a server and write a server/client program?... or would you Pay for a domain and "run" all data in the exe thru and from with http? *** Edit: Constant Communication NOT being chatting, but rather data sharing *** /* Just a Human Trying to Live in a Computers World. */
-
April 1stIm thinking of some evil ideas for April Fools ;) /* Just a Human Trying to Live in a Computers World. */
-
Export from Access DB to MSSQL and BackWhy are you looking for a programmer to do it? Why dont you do it? You make this sound like ur looking to hire someone... You have your Help wanted, what you need done, and your requirements... yet again, why dont you do it? /* Just a Human Trying to Live in a Computers World. */
-
Question about CFileDialoghttp://www.mindcracker.com/mindcracker/c_cafe/mfc/filedlg.asp[^] Does that Help? /* Just a Human Trying to Live in a Computers World. */