void CBuyRegDialog::Render() { if( m_bActive ) { if( mMoney != (DWORD)atol(RemoveComma(m_pMoneyEdit->GetEditText())) ) { mMoney = (DWORD)atol(RemoveComma(m_pMoneyEdit->GetEditText()));; // 091112 ONS 금액표시 색상 설정 mColor = GetMoneyColor(mMoney); } } m_pMoneyEdit->SetNonactiveTextColor( mColor ); m_pMoneyEdit->SetActiveTextColor( mColor ); cDialog::Render(); }
BOOL CBuyRegDialog::GetBuyRegInfo(BUY_REG_INFO& BuyInfo) { m_nVolume = (WORD)atoi(RemoveComma(m_pVolumeEdit->GetEditText())); m_nMoney = (DWORD)atol(RemoveComma(m_pMoneyEdit->GetEditText())); //090819 pdy 구매노점상에 등록할 아이템 가격이 40억이넘지 못하게 처리 unsigned long long NewMoney = _atoi64( RemoveComma( m_pMoneyEdit->GetEditText() ) ) * m_nVolume ; if( NewMoney > MAX_INVENTORY_MONEY ) { WINDOWMGR->MsgBox(MBI_BUYREG, MBT_OK, CHATMGR->GetChatMsg(1433)); m_nMoney = 0; m_pMoneyEdit->SetEditText( DEFAULT_MONEY_TEXT ); return FALSE; } if(m_nVolume < 1) // 수량이 1개 미만일때 오류 메세지 { WINDOWMGR->MsgBox(MBI_BUYREG, MBT_OK, CHATMGR->GetChatMsg(1436)); return FALSE; } else if(m_nVolume > 2000) // 수량이 100개 이상일때 오류 메세지 { WINDOWMGR->MsgBox(MBI_BUYREG, MBT_OK, CHATMGR->GetChatMsg(1437)); m_nVolume = 2000; m_pVolumeEdit->SetEditText( MAX_VOLUME_TEXT ); return FALSE; } else if( m_nMoney < 1) // 금액이 0원 이하일때 오류 메세지 { WINDOWMGR->MsgBox(MBI_BUYREG, MBT_OK, CHATMGR->GetChatMsg(1432)); m_nMoney = 0; m_pMoneyEdit->SetEditText( DEFAULT_MONEY_TEXT ); return FALSE; } BuyInfo.Type = m_nType; BuyInfo.Item = m_nItem; BuyInfo.Class = m_nClass; BuyInfo.Volume = m_nVolume; BuyInfo.Money = m_nMoney; return TRUE; }
bool StudentTree::ValidFullname(char* fullname, unsigned int* len) { tempUint = strlen(fullname); RemoveComma(fullname, 0, tempUint); RemoveExtraSpaces(fullname); Trim(fullname); Capitalize(fullname); tempUint = strlen(fullname); for(unsigned int i=0; i<tempUint; i++) if (isdigit(*(fullname + i)) || !isalpha(*(fullname + i))) { if (*(fullname + i) == ' ') continue; else return false; } return tempUint?(len?(*len = tempUint):true):false; }