Click here to Skip to main content
16,004,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThread Static calling non-static function Pin
Danny Gilbert30-Jul-04 17:43
Danny Gilbert30-Jul-04 17:43 
GeneralRe: Thread Static calling non-static function Pin
bikram singh31-Jul-04 16:10
bikram singh31-Jul-04 16:10 
Generalftp server Pin
Ryan McDermott30-Jul-04 16:21
Ryan McDermott30-Jul-04 16:21 
GeneralLoading Variable in EditBox Pin
arunforce30-Jul-04 12:00
arunforce30-Jul-04 12:00 
GeneralRe: Loading Variable in EditBox Pin
Archer28230-Jul-04 12:57
Archer28230-Jul-04 12:57 
GeneralRe: Loading Variable in EditBox Pin
arunforce30-Jul-04 13:13
arunforce30-Jul-04 13:13 
GeneralRe: Loading Variable in EditBox Pin
Jaime Stuardo30-Jul-04 13:52
Jaime Stuardo30-Jul-04 13:52 
GeneralRe: Loading Variable in EditBox Pin
arunforce30-Jul-04 14:25
arunforce30-Jul-04 14:25 
I did that and this is how it shows up, 100000, I added a command which increases the value by 1, ak,; cash++. I hit the button, and it shows up as it has been changed in the list box, but not the edit box.

The List Box's purpose is to show changes, like if you buy a car, it will say you lost $10,000, and the edit box display's how much money you currently have, and updates accordingly...

If I delete the preset in the DDX section it turns into -858993460, and so i deleted it being set in the begining of the file where it says unsigned long cash = 100000; to long cash. (I changed the unsigned part also)

The two problems are that
1. The edit box doesn't update.
2. The edit box doesnt have a $ before the number, how do i do that?


Thanks alot for your help.


Here is how the source beginning is:
-------------------------------------------------------------------------
#include "stdafx.h"
#include "Tycoon.h"
#include "TycoonDlg.h"
#include "BUY.h"
#include "SELL.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
long cash;
unsigned int day = 01;
unsigned int month = 01;
unsigned int year = 04;
unsigned int chp;
unsigned int mhp;
/////////////////////////////////////////////////////////////////////////////
// CTycoonDlg dialog

CTycoonDlg::CTycoonDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTycoonDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTycoonDlg)
cash = 100000;
//}}AFX_DATA_INIT
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CTycoonDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTycoonDlg)
DDX_Text(pDX, IDC_CASH, cash);
//}}AFX_DATA_MAP
}
-------------------------------------------------------------------------
GeneralNotify Messages Pin
Kosk30-Jul-04 11:47
Kosk30-Jul-04 11:47 
GeneralRe: Notify Messages Pin
Renjith Ramachandran30-Jul-04 18:18
Renjith Ramachandran30-Jul-04 18:18 
GeneralUnicode and cstring Pin
pnpfriend30-Jul-04 11:05
pnpfriend30-Jul-04 11:05 
GeneralRe: Unicode and cstring Pin
Gary R. Wheeler30-Jul-04 12:19
Gary R. Wheeler30-Jul-04 12:19 
GeneralRe: Unicode and cstring Pin
Michael Dunn30-Jul-04 14:48
sitebuilderMichael Dunn30-Jul-04 14:48 
GeneralRe: Unicode and cstring Pin
PJ Arends30-Jul-04 23:15
professionalPJ Arends30-Jul-04 23:15 
Generalchar str[256] AND char *str = new char(256) Pin
Igor Mihailov30-Jul-04 10:44
Igor Mihailov30-Jul-04 10:44 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Kosk30-Jul-04 12:01
Kosk30-Jul-04 12:01 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Gary R. Wheeler30-Jul-04 12:24
Gary R. Wheeler30-Jul-04 12:24 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Archer28230-Jul-04 13:03
Archer28230-Jul-04 13:03 
GeneralSetting Wallpaper Pin
Archer28230-Jul-04 10:40
Archer28230-Jul-04 10:40 
GeneralSPIF_SENDCHANGE ? Pin
bikram singh31-Jul-04 16:14
bikram singh31-Jul-04 16:14 
GeneralInitialising a items in a structure Pin
Grahamfff30-Jul-04 10:35
Grahamfff30-Jul-04 10:35 
GeneralRe: Initialising a items in a structure Pin
Kosk30-Jul-04 11:54
Kosk30-Jul-04 11:54 
GeneralRe: Initialising a items in a structure Pin
Grahamfff30-Jul-04 21:07
Grahamfff30-Jul-04 21:07 
GeneralRe: Initialising a items in a structure Pin
Gary R. Wheeler30-Jul-04 12:33
Gary R. Wheeler30-Jul-04 12:33 
GeneralRe: Initialising a items in a structure Pin
Grahamfff30-Jul-04 21:32
Grahamfff30-Jul-04 21:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.