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

C / C++ / MFC

 
AnswerRe: Create And Start Service using C++ Pin
JohnCz24-Apr-12 2:59
JohnCz24-Apr-12 2:59 
GeneralRe: Create And Start Service using C++ Pin
sangamdumne24-Apr-12 22:57
sangamdumne24-Apr-12 22:57 
GeneralRe: Create And Start Service using C++ Pin
JohnCz24-Apr-12 23:33
JohnCz24-Apr-12 23:33 
GeneralRe: Create And Start Service using C++ Pin
sangamdumne25-Apr-12 20:19
sangamdumne25-Apr-12 20:19 
QuestionIndata validation char* input Pin
Johan Bertilsdotter23-Apr-12 22:21
Johan Bertilsdotter23-Apr-12 22:21 
QuestionRe: Indata validation char* input Pin
CPallini24-Apr-12 0:58
mveCPallini24-Apr-12 0:58 
QuestionIncorrect output of sum Pin
Ron120223-Apr-12 21:28
Ron120223-Apr-12 21:28 
Question[SOLVED] Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 18:57
AmbiguousName23-Apr-12 18:57 
hello guys... I am trying to load a bitmap into the picture control. Well when I debug, I see that the picture gets loaded but it does not show onto the control. I load the first bitmap at design time like this: Properties->Image->IDB_BITMAP1. Then to load second image, I write following code in the click event of button. Here is what I am trying.
C++
void CMyAppDlg::OnBnClickedNext()
{
	// TODO: Add your control notification handler code here
	HBITMAP bitmap [2];
	bitmap[1] = ::LoadBitmapW(NULL, _T("All_The_Path\\Resources\\quaid.bmp"));		
	bitmap[0] = ::LoadBitmapW(NULL, _T("All_The_Path\\Resources\\Allama.bmp"));

	if(CurrentImage == 0) // This is set to ZERO in 'OnInitDialog()'
	{
		m_Picture.SetBitmap(bitmap[1]); //control variable
		CurrentImage = 1;
	}
	else if(CurrentImage == 1)
	{	
		m_Picture.SetBitmap(bitmap[0]); //control variable
		CurrentImage = 0;
	}
}

What am I doing wrong? Thanks for any input.

This world is going to explode due to international politics, SOON.


modified 24-Apr-12 5:32am.

AnswerRe: Loading Bitmap Into Picture Control Pin
enhzflep23-Apr-12 22:49
enhzflep23-Apr-12 22:49 
AnswerRe: Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 23:28
AmbiguousName23-Apr-12 23:28 
AnswerRe: Loading Bitmap Into Picture Control Pin
SandipG 23-Apr-12 22:51
SandipG 23-Apr-12 22:51 
AnswerRe: Loading Bitmap Into Picture Control Pin
AmbiguousName23-Apr-12 23:31
AmbiguousName23-Apr-12 23:31 
GeneralRe: Loading Bitmap Into Picture Control Pin
enhzflep24-Apr-12 0:54
enhzflep24-Apr-12 0:54 
GeneralRe: Loading Bitmap Into Picture Control Pin
AmbiguousName24-Apr-12 1:02
AmbiguousName24-Apr-12 1:02 
QuestionThe entry point GetFileVersionInfoSizeEx Pin
jkirkerx23-Apr-12 13:23
professionaljkirkerx23-Apr-12 13:23 
AnswerRe: The entry point GetFileVersionInfoSizeEx Pin
Richard Andrew x6423-Apr-12 14:02
professionalRichard Andrew x6423-Apr-12 14:02 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx23-Apr-12 15:10
professionaljkirkerx23-Apr-12 15:10 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz24-Apr-12 9:29
JohnCz24-Apr-12 9:29 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx24-Apr-12 10:11
professionaljkirkerx24-Apr-12 10:11 
AnswerRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz25-Apr-12 1:15
JohnCz25-Apr-12 1:15 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx25-Apr-12 6:11
professionaljkirkerx25-Apr-12 6:11 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
JohnCz25-Apr-12 8:04
JohnCz25-Apr-12 8:04 
GeneralRe: The entry point GetFileVersionInfoSizeEx Pin
jkirkerx25-Apr-12 9:10
professionaljkirkerx25-Apr-12 9:10 
QuestionTabControl In MFC Pin
002comp22-Apr-12 23:59
002comp22-Apr-12 23:59 
AnswerRe: TabControl In MFC Pin
Chandrasekharan P23-Apr-12 0:04
Chandrasekharan P23-Apr-12 0:04 

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.