Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Helpppppppppppppp..!!! Pin
Christian Graus2-Jul-02 13:06
protectorChristian Graus2-Jul-02 13:06 
GeneralRe: Helpppppppppppppp..!!! Pin
Ravi Bhavnani2-Jul-02 13:15
professionalRavi Bhavnani2-Jul-02 13:15 
GeneralRe: Helpppppppppppppp..!!! Pin
Rama Krishna Vavilala2-Jul-02 13:57
Rama Krishna Vavilala2-Jul-02 13:57 
GeneralOutlining a Bitmap... Pin
Manikandan1-Jul-02 23:50
Manikandan1-Jul-02 23:50 
GeneralRe: Outlining a Bitmap... Pin
Chris Losinger2-Jul-02 3:17
professionalChris Losinger2-Jul-02 3:17 
QuestionOne more... :) How do I add a standard button to IE? Pin
Tommy Svensson1-Jul-02 23:45
Tommy Svensson1-Jul-02 23:45 
QuestionReacting to a text selection in IE...? Pin
Tommy Svensson1-Jul-02 23:43
Tommy Svensson1-Jul-02 23:43 
Generalbitmap write problem Pin
SilentWarrior1-Jul-02 22:26
SilentWarrior1-Jul-02 22:26 
hi .. i want to write a bitmap to a file , the code which ive written is
BOOL COpenbitmapDlg::WriteDIB(LPTSTR szFile, HANDLE hDIB)
{



//----------------------------------------
BITMAPFILEHEADER hdr ;
LPBITMAPINFOHEADER lpbi ;
if(!hDIB)
return FALSE ;
CFile file ;
if(!file.Open(szFile,CFile::modeWrite|CFile::modeCreate))
return FALSE ;
lpbi=(LPBITMAPINFOHEADER)hDIB;

int nColors = 1 << lpbi->biBitCount;


hdr.bfType = ((WORD) ('M' << 8) | 'B'); // is always "BM"
hdr.bfSize = GlobalSize (hDIB) + sizeof( hdr );
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD) (sizeof( hdr ) + lpbi->biSize +
nColors * sizeof(RGBQUAD));



file.Write( &hdr, sizeof(hdr) );

// Write the DIB header and the bits
file.Write( lpbi, GlobalSize(hDIB) );

//file.WriteHuge(lpbi,GlobalSize(hDIB)):
return TRUE;



}
and then i pass it a bitmap handle which i use to open simple bitmap files.
this code do create a file .. but when i try to check dat file i get an error message , secondly the file size is also very much less than the orignal file.
looking for ure hlp

looking forward from all the gurus of code
GeneralRe: bitmap write problem Pin
Davide Pizzolato1-Jul-02 22:51
Davide Pizzolato1-Jul-02 22:51 
GeneralRe: bitmap write problem Pin
Speedy3-Jul-02 11:10
Speedy3-Jul-02 11:10 
QuestionHow can I read line to line with CFile Class? Pin
1-Jul-02 21:53
suss1-Jul-02 21:53 
AnswerRe: How can I read line to line with CFile Class? Pin
Nish Nishant1-Jul-02 22:41
sitebuilderNish Nishant1-Jul-02 22:41 
AnswerRe: How can I read line to line with CFile Class? Pin
Roger Allen1-Jul-02 22:52
Roger Allen1-Jul-02 22:52 
AnswerRe: How can I read line to line with CFile Class? Pin
Christian Graus2-Jul-02 13:07
protectorChristian Graus2-Jul-02 13:07 
GeneralProblems with SymGetModuleBase Pin
Susto1-Jul-02 21:46
Susto1-Jul-02 21:46 
GeneralRe: Problems with SymGetModuleBase Pin
#realJSOP2-Jul-02 3:24
professional#realJSOP2-Jul-02 3:24 
GeneralRe: Problems with SymGetModuleBase Pin
Susto2-Jul-02 3:32
Susto2-Jul-02 3:32 
GeneralRe: Problems with SymGetModuleBase Pin
#realJSOP2-Jul-02 4:27
professional#realJSOP2-Jul-02 4:27 
GeneralPrint a bitmap trouble Pin
vtotem1-Jul-02 21:02
vtotem1-Jul-02 21:02 
GeneralRe: Print a bitmap trouble Pin
Mike Nordell2-Jul-02 6:43
Mike Nordell2-Jul-02 6:43 
GeneralFlexiGrid Pin
subra1-Jul-02 20:54
subra1-Jul-02 20:54 
GeneralAn app with GUI and CUI Pin
Janine1-Jul-02 20:51
Janine1-Jul-02 20:51 
GeneralRe: An app with GUI and CUI Pin
Vuemme2-Jul-02 2:03
Vuemme2-Jul-02 2:03 
GeneralRe: An app with GUI and CUI Pin
Mike Nordell2-Jul-02 6:53
Mike Nordell2-Jul-02 6:53 
GeneralRe: An app with GUI and CUI Pin
Janine3-Jul-02 19:37
Janine3-Jul-02 19:37 

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.