Picture Control to load BMP
-
What am I missing to show a BMP correclty using the CStatic variable assigned to a Picture Control through MFC... BITMAP test; CBitmap m_bitmap; HBITMAP m_hbitmap; m_bitmap.LoadBitmap(IDB_BITMAP1); m_bitmap.GetBitmap(&test); m_hbitmap = m_bitmap.operator HBITMAP(); m_S1S2_Arrow.MoveWindow(40,50,test.bmWidth,test.bmHeight,1); m_S1S2_Arrow.SetBitmap(m_hbitmap); m_S1S2.Arrow.ShowWindow(1); I would presume that the BMP would be loaded in and shown at this point, but I get nothing back. Any ideas would be great. Thanks so much.
-
What am I missing to show a BMP correclty using the CStatic variable assigned to a Picture Control through MFC... BITMAP test; CBitmap m_bitmap; HBITMAP m_hbitmap; m_bitmap.LoadBitmap(IDB_BITMAP1); m_bitmap.GetBitmap(&test); m_hbitmap = m_bitmap.operator HBITMAP(); m_S1S2_Arrow.MoveWindow(40,50,test.bmWidth,test.bmHeight,1); m_S1S2_Arrow.SetBitmap(m_hbitmap); m_S1S2.Arrow.ShowWindow(1); I would presume that the BMP would be loaded in and shown at this point, but I get nothing back. Any ideas would be great. Thanks so much.
Does this help?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
Does this help?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
I am not trying to draw a button, I am simply trying to load a bitmap on a screen to show them things. Instead of having 20 variables each with only 1 BMP that it shows, I want to be able to have 3 or 4 and have them be able to switch to different BMPs to load up. However, when I do that and call the ShowWindow(1) function, nothing happens.