Click here to Skip to main content
15,886,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionQuitting an application Pin
Gagnon Claude11-Jun-09 2:18
Gagnon Claude11-Jun-09 2:18 
AnswerRe: Quitting an application Pin
Rajesh R Subramanian11-Jun-09 2:54
professionalRajesh R Subramanian11-Jun-09 2:54 
GeneralRe: Quitting an application Pin
chirag_chauhan11-Jun-09 19:27
chirag_chauhan11-Jun-09 19:27 
GeneralRe: Quitting an application Pin
Rajesh R Subramanian11-Jun-09 21:32
professionalRajesh R Subramanian11-Jun-09 21:32 
GeneralRe: Quitting an application Pin
chirag_chauhan11-Jun-09 23:20
chirag_chauhan11-Jun-09 23:20 
Questionsave bmp in grayscale formt Pin
Member 604218211-Jun-09 2:07
Member 604218211-Jun-09 2:07 
QuestionRe: save bmp in grayscale formt Pin
CPallini11-Jun-09 3:27
mveCPallini11-Jun-09 3:27 
AnswerRe: save bmp in grayscale formt Pin
Member 604218217-Jun-09 23:24
Member 604218217-Jun-09 23:24 
Here ByteArray is an array of image data.I am not sure if BITMAPINFOHEADER and BITMAPFILEHEADER variables are correctly filled.I was trying to put some arbit data on that file.Will you tell me if the BITMAPINFOHEADER and BITMAPFILEHEADER variables are correctly filled?




int i=0,j=0;
while(j < bmpInfoHeader.biSizeImage)
{
ByteArray[j] = GrayData(m_pDrawingSurfaceBits[i++], 0.3;
ByteArray[j] = ByteArray[j] + GrayData(m_pDrawingSurfaceBits[i++], 0.59;
ByteArray[j] = ByteArray[j] + GrayData(m_pDrawingSurfaceBits[i++], 0.11);
j++;
}



m_pDrawingSurfaceBits is a pointer to data elements.
Where I have got m_pDrawingSurfaceBits from the following
CreateDIBSection(pDC->GetSafeHdc(), (CONST BITMAPINFO*)&BMIH, DIB_RGB_COLORS, (void**)&m_pDrawingSurfaceBits, NULL, 0);


GrayData is defined in following format.
BYTE CLoadBitmapDlg::GrayData(BYTE b, float Multiply)
{
float a;
a =(float) b;
a = a * Multiply;
b =(BYTE)a;
return b;
}
Is there any code to convert any bmp file to another bmp,in 8 bit grayscale format?
AnswerRe: save bmp in grayscale formt Pin
Chris Losinger11-Jun-09 4:00
professionalChris Losinger11-Jun-09 4:00 
Questionmodule name Pin
ali kanju11-Jun-09 1:17
ali kanju11-Jun-09 1:17 
AnswerRe: module name Pin
Rajesh R Subramanian11-Jun-09 1:39
professionalRajesh R Subramanian11-Jun-09 1:39 
GeneralRe: module name Pin
Hamid_RT11-Jun-09 1:42
Hamid_RT11-Jun-09 1:42 
JokeThe monkeys do it! Pin
Rajesh R Subramanian11-Jun-09 2:12
professionalRajesh R Subramanian11-Jun-09 2:12 
GeneralRe: module name Pin
ali kanju11-Jun-09 1:45
ali kanju11-Jun-09 1:45 
AnswerRe: module name Pin
Hamid_RT11-Jun-09 1:40
Hamid_RT11-Jun-09 1:40 
AnswerRe: module name Pin
CPallini11-Jun-09 1:41
mveCPallini11-Jun-09 1:41 
GeneralRe: module name Pin
ali kanju11-Jun-09 1:52
ali kanju11-Jun-09 1:52 
GeneralRe: module name Pin
CPallini11-Jun-09 2:04
mveCPallini11-Jun-09 2:04 
GeneralRe: module name Pin
ali kanju11-Jun-09 2:12
ali kanju11-Jun-09 2:12 
QuestionEvent sink for event raised by managed code component. Pin
Keith Sheppard11-Jun-09 0:51
Keith Sheppard11-Jun-09 0:51 
AnswerRe: Event sink for event raised by managed code component. Pin
Keith Sheppard11-Jun-09 1:57
Keith Sheppard11-Jun-09 1:57 
QuestionHIde a Process in Task manager Pin
tns_ranjith11-Jun-09 0:19
tns_ranjith11-Jun-09 0:19 
AnswerRe: HIde a Process in Task manager Pin
Rajesh R Subramanian11-Jun-09 0:21
professionalRajesh R Subramanian11-Jun-09 0:21 
GeneralRe: HIde a Process in Task manager Pin
tns_ranjith11-Jun-09 1:14
tns_ranjith11-Jun-09 1:14 
GeneralRe: HIde a Process in Task manager Pin
tns_ranjith11-Jun-09 1:14
tns_ranjith11-Jun-09 1:14 

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.