Click here to Skip to main content
15,905,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Doesn't work still Pin
KingsGambit26-Jul-01 23:19
KingsGambit26-Jul-01 23:19 
GeneralRead from the console window Pin
26-Jul-01 12:44
suss26-Jul-01 12:44 
GeneralRe: Read from the console window Pin
Matt Gullett26-Jul-01 13:07
Matt Gullett26-Jul-01 13:07 
GeneralRe: Read from the console window Pin
Ulf Öhlén26-Jul-01 22:12
Ulf Öhlén26-Jul-01 22:12 
GeneralCommand Bar Project Pin
26-Jul-01 12:31
suss26-Jul-01 12:31 
Generalput static or picture on button control Pin
26-Jul-01 11:14
suss26-Jul-01 11:14 
GeneralRe: put static or picture on button control Pin
Christian Graus26-Jul-01 12:46
protectorChristian Graus26-Jul-01 12:46 
GeneralPlease Try help me !!! I have problem in my code in saving and reading from file . Pin
26-Jul-01 10:12
suss26-Jul-01 10:12 
I need Help Urgent !!!
What is the problem in this code:
in run time when use in read func the program gets error and shut down. Cry | :(( Who can help ????
_________________________________________________
//Header file:
-------------------------
typedef struct dPerson{
CString str;
BYTE status;
CString id;
DWORD ID;
BYTE f2[400];
BYTE f1[400];
BYTE t[12];
}dPerson;

-----------------------------------------
class CPerson : public CCmdTarget
{
DECLARE_DYNCREATE(CPerson)

CPerson();

public:
virtual ~CPerson();

public:
dPerson per;
CPerson* pNext;
CPerson* pBack;


DECLARE_MESSAGE_MAP()
};
-------------------------------------------------------------
________________________________________________________________
//cpp file:
-----------------

void CDemo::OnButtonAdd()
{
UpdateData(true);

person.per.id = m_editId;
//person = member variable of CDemo from type CPerson
...
...
...

CFile file;
// CFileException ex;

if(file.Open(strPath, file.modeWrite|file.modeNoTruncate|file.modeCreate ))
{
file.SeekToEnd();
file.Write( &(person.per) , sizeof(dPerson));
MessageBox("************ S A V E D ************** ");
}
}

/************************************************************/


void CDemo::read_persons(CFile* persons)
{
CPerson* q = new CPerson;

DWORD dwRead = sizeof(dPerson);

if((*persons).Read(&q->per, sizeof(dPerson)))
{
q->pNext = q->pBack = NULL;
p_head = p_tail = q; //p_head and p_tail are member variables of CDemo - type CPerson*
}
else
{
MessageBox("Have not register of users ! ");
return;
delete q;
}


DWORD size = dwRead;

while (size == dwRead)
{
q = new CPerson;

if( (size = (*persons).Read( &q->per, sizeof(dwRead))) == sizeof(dwRead) )
{
q->pNext = NULL;
q->pBack = p_tail;
p_tail->pNext = q;
p_tail = q;

}
else
delete q;
}
}

/************************************************************/
Cry | :((
GeneralPLEASE !!! HELP ME !!! IT IS VERY URGENT !!!!!!! Pin
26-Jul-01 18:39
suss26-Jul-01 18:39 
GeneralRe: PLEASE !!! HELP ME !!! IT IS VERY URGENT !!!!!!! Pin
Christian Graus26-Jul-01 19:21
protectorChristian Graus26-Jul-01 19:21 
GeneralDetails of the errors that I gets . Please, Please HELP !!!!!! Pin
26-Jul-01 21:07
suss26-Jul-01 21:07 
Generaldate picker problems Pin
26-Jul-01 9:01
suss26-Jul-01 9:01 
GeneralRe: date picker problems Pin
Derek Waters26-Jul-01 16:38
Derek Waters26-Jul-01 16:38 
GeneralRe: date picker problems Pin
27-Jul-01 2:37
suss27-Jul-01 2:37 
GeneralOLE DB and IRowsetChange::SetData Pin
Bret Faller26-Jul-01 8:16
Bret Faller26-Jul-01 8:16 
GeneralRe: OLE DB and IRowsetChange::SetData Pin
Tomasz Sowinski26-Jul-01 8:41
Tomasz Sowinski26-Jul-01 8:41 
GeneralRe: OLE DB and IRowsetChange::SetData Pin
Bret Faller26-Jul-01 11:44
Bret Faller26-Jul-01 11:44 
QuestionAt run time, how do I draw a box around few edit controls? Pin
tm26-Jul-01 6:58
tm26-Jul-01 6:58 
AnswerRe: At run time, how do I draw a box around few edit controls? Pin
Tomasz Sowinski26-Jul-01 7:15
Tomasz Sowinski26-Jul-01 7:15 
GeneralResizing of a dialog box Pin
26-Jul-01 6:27
suss26-Jul-01 6:27 
GeneralRe: Resizing of a dialog box Pin
Carlos Antollini26-Jul-01 6:36
Carlos Antollini26-Jul-01 6:36 
GeneralRe: Resizing of a dialog box Pin
27-Jul-01 1:39
suss27-Jul-01 1:39 
GeneralRe: Resizing of a dialog box Pin
Christian Graus27-Jul-01 2:18
protectorChristian Graus27-Jul-01 2:18 
GeneralRe: Resizing of a dialog box Pin
26-Jul-01 7:17
suss26-Jul-01 7:17 
GeneralRe: Resizing of a dialog box Pin
Ernest Laurentin27-Jul-01 9:43
Ernest Laurentin27-Jul-01 9:43 

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.