Click here to Skip to main content
15,909,242 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: COM DLL not returning from registration Pin
David Crow15-May-06 10:21
David Crow15-May-06 10:21 
AnswerRe: COM DLL not returning from registration Pin
Dave_Roach15-May-06 10:36
Dave_Roach15-May-06 10:36 
QuestionRe: COM DLL not returning from registration Pin
David Crow16-May-06 2:33
David Crow16-May-06 2:33 
Questionhow i can type 00:00 Pin
Immunity1815-May-06 8:19
Immunity1815-May-06 8:19 
AnswerRe: how i can type 00:00 Pin
David Crow15-May-06 8:21
David Crow15-May-06 8:21 
QuestionLoad Bitmap Pin
surfman1915-May-06 7:10
surfman1915-May-06 7:10 
AnswerRe: Load Bitmap Pin
Chris Losinger15-May-06 7:28
professionalChris Losinger15-May-06 7:28 
GeneralRe: Load Bitmap Pin
surfman1915-May-06 8:13
surfman1915-May-06 8:13 
sounds easy *lol*

what about:
<br />
BOOL LoadBitmapFile(CString filepath)<br />
{<br />
<br />
   if (m_hbm != NULL) // delete previous bitmap loaded<br />
   {<br />
      SelectObject(m_dc.m_hDC, m_hbm_default);<br />
      DeleteObject(m_hbm);<br />
   }<br />
<br />
   m_hbm = (HBITMAP)LoadImage(NULL, filepath, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION); <br />
<br />
   if (m_hbm == NULL) // open bitmap file error !<br />
      return FALSE; <br />
   <br />
   // select the opened bitmap into the memory dc<br />
   m_hbm_default = (HBITMAP)SelectObject( m_dc.m_hDC , m_hbm);<br />
<br />
   // get source bitmap info<br />
   GetObject(m_hbm, sizeof(DIBSECTION), &m_dib);<br />
<br />
   // re-draw self<br />
   //Invalidate();<br />
   //UpdateWindow();<br />
 <br />
   return TRUE;<br />
}

GeneralRe: Load Bitmap Pin
Chris Losinger15-May-06 8:17
professionalChris Losinger15-May-06 8:17 
GeneralRe: Load Bitmap Pin
surfman1915-May-06 8:25
surfman1915-May-06 8:25 
GeneralRe: Load Bitmap Pin
Chris Losinger15-May-06 8:30
professionalChris Losinger15-May-06 8:30 
GeneralRe: Load Bitmap Pin
surfman1915-May-06 8:39
surfman1915-May-06 8:39 
GeneralRe: Load Bitmap Pin
Chris Losinger15-May-06 8:44
professionalChris Losinger15-May-06 8:44 
GeneralRe: Load Bitmap Pin
surfman1915-May-06 9:00
surfman1915-May-06 9:00 
GeneralRe: Load Bitmap Pin
surfman1915-May-06 9:07
surfman1915-May-06 9:07 
QuestionHELP Needed: MATLAB in MSVC environment Pin
UJ_Student15-May-06 6:35
UJ_Student15-May-06 6:35 
QuestionWorking with 8bpp Images Pin
1980soyo15-May-06 6:30
1980soyo15-May-06 6:30 
AnswerRe: Working with 8bpp Images Pin
includeh1015-May-06 6:46
includeh1015-May-06 6:46 
GeneralRe: Working with 8bpp Images Pin
1980soyo15-May-06 8:13
1980soyo15-May-06 8:13 
Questionfopen_s problem Pin
big_denny_20015-May-06 6:12
big_denny_20015-May-06 6:12 
AnswerRe: fopen_s problem Pin
led mike15-May-06 6:19
led mike15-May-06 6:19 
AnswerRe: fopen_s problem Pin
Joe Woodbury15-May-06 7:38
professionalJoe Woodbury15-May-06 7:38 
GeneralRe: fopen_s problem Pin
big_denny_20015-May-06 7:59
big_denny_20015-May-06 7:59 
GeneralRe: fopen_s problem Pin
Joe Woodbury15-May-06 8:14
professionalJoe Woodbury15-May-06 8:14 
GeneralRe: fopen_s problem Pin
big_denny_20015-May-06 8:30
big_denny_20015-May-06 8:30 

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.