Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: AfxMessageBox Pin
Nelek28-Nov-07 21:49
protectorNelek28-Nov-07 21:49 
AnswerRe: AfxMessageBox Pin
Michael Dunn28-Nov-07 14:12
sitebuilderMichael Dunn28-Nov-07 14:12 
QuestionEvent ID 1073 Occurs When You Attempt to Move the Quorum Disk Pin
sumd28-Nov-07 2:14
sumd28-Nov-07 2:14 
Questionbmfh.bfType != 0x4d42 Pin
keyto28-Nov-07 1:26
keyto28-Nov-07 1:26 
AnswerRe: bmfh.bfType != 0x4d42 Pin
toxcct28-Nov-07 1:36
toxcct28-Nov-07 1:36 
AnswerRe: bmfh.bfType != 0x4d42 Pin
Paresh Chitte28-Nov-07 1:56
Paresh Chitte28-Nov-07 1:56 
AnswerRe: bmfh.bfType != 0x4d42 Pin
CPallini28-Nov-07 2:03
mveCPallini28-Nov-07 2:03 
QuestionA big Q Pin
keyto28-Nov-07 1:17
keyto28-Nov-07 1:17 
I have a sample project and I have to implement this code into my project. I could not understand the theme of the code can you make me understand the code? The code goes like this


void CDib::BmpLoad(CFile& rBmpFile)
{
int nCount, nSize;
BITMAPFILEHEADER bmfh;
nCount = rBmpFile.Read((LPVOID) &bmfh, sizeof(BITMAPFILEHEADER));
if(nCount != sizeof(BITMAPFILEHEADER))
{
throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹ƒTƒCƒY‚ªˆÙí‚Å‚·");
}

// ƒtƒ@ƒCƒ‹ƒwƒbƒ_‚Ì'BM'‚ðŠm”F
if(bmfh.bfType != 0x4d42)
{
throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹‚Å‚Í‚ ‚è‚Ü‚¹‚ñ");
}
nSize = bmfh.bfOffBits - sizeof(BITMAPFILEHEADER);
m_pBmpHead = (LPBITMAPINFOHEADER) new BYTE[nSize];

nCount = rBmpFile.Read(m_pBmpHead, nSize); // info hdr & color table
this->ComputeMetrics();


// BOOL ret;
// m_pImage = (LPBYTE)VirtualAlloc(NULL,m_dwSizeImage,MEM_RESERVE|MEM_COMMIT,PAGE_READWRITE);
// if(m_pImage == NULL)
// VirtualAlloc(&m_pImage,m_dwSizeImage,MEM_COMMIT,PAGE_READWRITE);
// MEMORY_BASIC_INFORMATION MemoryBasicInfo;
// VirtualQuery(m_pImage,&MemoryBasicInfo,sizeof(MemoryBasicInfo));
// if(MemoryBasicInfo.State != MEM_COMMIT)
// return;
// ret =VirtualLock((LPVOID)m_pImage,m_dwSizeImage);

m_pImage = (LPBYTE) new BYTE[m_dwSizeImage];

nCount = rBmpFile.Read(m_pImage, m_dwSizeImage); // image only

// ret =VirtualUnlock((LPVOID)m_pImage,m_dwSizeImage);

this->ComputePaletteSize(m_pBmpHead->biBitCount);
this->MakePalette();

this->MakeDDB();
}
AnswerRe: A big Q Pin
CPallini28-Nov-07 2:24
mveCPallini28-Nov-07 2:24 
QuestionRe: A big Q Pin
David Crow28-Nov-07 3:01
David Crow28-Nov-07 3:01 
QuestionRe: A big Q Pin
Hamid_RT29-Nov-07 4:28
Hamid_RT29-Nov-07 4:28 
QuestionIOCP server Pin
Jhony george28-Nov-07 1:15
Jhony george28-Nov-07 1:15 
AnswerRe: IOCP server Pin
Cedric Moonen28-Nov-07 1:44
Cedric Moonen28-Nov-07 1:44 
QuestionRe: IOCP server [modified] Pin
Jhony george28-Nov-07 1:57
Jhony george28-Nov-07 1:57 
AnswerRe: IOCP server Pin
Cedric Moonen28-Nov-07 2:18
Cedric Moonen28-Nov-07 2:18 
GeneralRe: IOCP server Pin
Jhony george28-Nov-07 2:26
Jhony george28-Nov-07 2:26 
GeneralRe: IOCP server Pin
Mark Salsbery28-Nov-07 5:32
Mark Salsbery28-Nov-07 5:32 
GeneralRe: IOCP server Pin
Mike Dimmick28-Nov-07 5:55
Mike Dimmick28-Nov-07 5:55 
GeneralRe: IOCP server Pin
Mark Salsbery28-Nov-07 6:08
Mark Salsbery28-Nov-07 6:08 
AnswerRe: IOCP server Pin
Mark Salsbery28-Nov-07 5:26
Mark Salsbery28-Nov-07 5:26 
AnswerRe: IOCP server Pin
Mike Dimmick28-Nov-07 5:43
Mike Dimmick28-Nov-07 5:43 
QuestionLPBITMAPINFOHEADER Pin
keyto28-Nov-07 0:49
keyto28-Nov-07 0:49 
AnswerRe: LPBITMAPINFOHEADER Pin
CPallini28-Nov-07 0:57
mveCPallini28-Nov-07 0:57 
AnswerRe: LPBITMAPINFOHEADER Pin
David Crow28-Nov-07 3:03
David Crow28-Nov-07 3:03 
QuestionHow to use VC++ Unit Test project to test C++ project Pin
lchild38528-Nov-07 0:09
lchild38528-Nov-07 0:09 

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.