Hi
I try to change images and location.
first I define CStatic array (m_x)
when i try to show him:
m_x[0].SetBitmap(hBitmap);
I have error:
"expression must have class type" (on m_x[0])
what is my mistake????

CStatic *m_x[2];	// = {&m_1, &m_2};
	m_x[0]= &m_1;
	
	//Row 1		
	CString ReqBMP(Letter[m_A1]);
	hBitmap = (HBITMAP)LoadImage(NULL, ReqBMP, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );	//LR_MONOCHROME
	m_x[0].SetBitmap(hBitmap);		//variable for 
	GetDlgItem(IDC_1)->ShowWindow(true);

Thanks,

It is solved by:

m_x[0]->SetBitmap(hBitmap);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.