Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win2k parallel port Pin
Gary R. Wheeler21-Feb-03 11:55
Gary R. Wheeler21-Feb-03 11:55 
GeneralRe: Win2k parallel port Pin
Gpe. Ruiz24-Feb-03 2:46
Gpe. Ruiz24-Feb-03 2:46 
GeneralRe: Win2k parallel port Pin
Sean Cundiff21-Feb-03 12:47
Sean Cundiff21-Feb-03 12:47 
GeneralRe: Win2k parallel port Pin
Gpe. Ruiz24-Feb-03 2:51
Gpe. Ruiz24-Feb-03 2:51 
QuestionHow do you write a program to block a port using mfc/C++ ? Pin
Norrie Taylor21-Feb-03 9:01
Norrie Taylor21-Feb-03 9:01 
GeneralUsing perl.net in VC7.0 Pin
Member 13661821-Feb-03 8:56
Member 13661821-Feb-03 8:56 
Generalserialize Pin
dudic21-Feb-03 8:55
dudic21-Feb-03 8:55 
GeneralRe: serialize Pin
Norrie Taylor21-Feb-03 9:12
Norrie Taylor21-Feb-03 9:12 
You need to write a serializalble class containing your registration information. Here is a class that I wrote.

// SaveIP.h
//
#pragma once



// CSaveIP command target

class CSaveIP : public CObject
{
DECLARE_SERIAL (CSaveIP)

protected:

DWORD mID;

public:
CSaveIP(){}
CSaveIP( DWORD address, DWORD ID ){ mAddress = address; mID = ID; }
CSaveIP( const CSaveIP& src ){ mAddress = src.mAddress; mID = src.mID; }
DWORD mAddress;

CSaveIP& operator= (const CSaveIP& src);

void Serialize (CArchive& ar);

DWORD getAddress(void) { return mAddress; }

};



// SaveIP.cpp : implementation file
//

#include "stdafx.h"
#include "NSender.h"
#include "SaveIP.h"

IMPLEMENT_SERIAL (CSaveIP, CObject, 1)


// CSaveIP member functions

CSaveIP& CSaveIP::operator= (const CSaveIP& src)
{
if(this != &src)
{

mAddress = src.mAddress;
mID = src.mID;


}
return *this;
}

void CSaveIP::Serialize (CArchive& ar)
{
CObject::Serialize(ar);
if ( ar.IsStoring ())
ar << mAddress << mID;
else
ar >> mAddress >> mID;
}
GeneralFile read Pin
Kash21-Feb-03 8:09
Kash21-Feb-03 8:09 
GeneralRe: File read Pin
Nitron21-Feb-03 8:16
Nitron21-Feb-03 8:16 
GeneralRe: File read Pin
Kash21-Feb-03 8:28
Kash21-Feb-03 8:28 
GeneralRe: File read Pin
Nitron21-Feb-03 8:35
Nitron21-Feb-03 8:35 
Generalallocating an array of STL iterators Pin
kiken21-Feb-03 7:23
kiken21-Feb-03 7:23 
GeneralRe: allocating an array of STL iterators Pin
Chris Losinger21-Feb-03 8:19
professionalChris Losinger21-Feb-03 8:19 
GeneralEdit control boxes Pin
emrosa21-Feb-03 5:54
emrosa21-Feb-03 5:54 
GeneralRe: Edit control boxes Pin
Steve S21-Feb-03 6:12
Steve S21-Feb-03 6:12 
GeneralRe: Edit control boxes Pin
Valera24117621-Feb-03 10:32
Valera24117621-Feb-03 10:32 
QuestionHow can draw a line in mouse move ? Pin
muna_utkal21-Feb-03 5:36
muna_utkal21-Feb-03 5:36 
AnswerRe: How can draw a line in mouse move ? Pin
Steve S21-Feb-03 6:08
Steve S21-Feb-03 6:08 
GeneralRemoving functions or variables in .NET Pin
IrishSonic21-Feb-03 5:24
IrishSonic21-Feb-03 5:24 
GeneralRe: Removing functions or variables in .NET Pin
dazinith21-Feb-03 5:26
dazinith21-Feb-03 5:26 
GeneralRe: Removing functions or variables in .NET Pin
AlexO21-Feb-03 5:27
AlexO21-Feb-03 5:27 
GeneralAdjust console window width Pin
Aaron Schaefer21-Feb-03 5:18
Aaron Schaefer21-Feb-03 5:18 
GeneralRe: Adjust console window width Pin
Chris Richardson21-Feb-03 7:18
Chris Richardson21-Feb-03 7:18 
QuestionHow do you compile and build in VC 7.0 Pin
Member 13661821-Feb-03 5:04
Member 13661821-Feb-03 5:04 

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.