Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have embedded the skinmagic file SMF into the MFC MainFrame file. This is a SDI program. And there appears some strange phonomenon. I use the OPENFILENAME struture to open file, and it popup a dialog which is with the same skin with the mainframe. But this dialog has a button name HELP bottom the dialog. and i cant remove the button. it's inactive. when i zoom in or out the dialog. the button will disappear and appear. so it confused me.

This is the OPENFILENAME struture which i use.
C++
void CBoard::OnClickedButton8()
{
	// TODO: Add your control notification handler code here
	char lpszFile[256] = {'\0'};
	CString StrFolder;
	OPENFILENAME OpenFileName;
	ZeroMemory(&OpenFileName, sizeof(OPENFILENAME));
	OpenFileName.lStructSize = sizeof(OPENFILENAME);
	OpenFileName.hwndOwner=GetSafeHwnd();
	OpenFileName.lpstrFile = lpszFile;
	OpenFileName.nMaxFile = 255;
	OpenFileName.lpstrFilter = "JpegFiles(*.jpg)\0*.jpg\0\BitmapFiles(*.bmp)\0*.bmp\0";
	OpenFileName.nFilterIndex = 1;
	GetOpenFileName(&OpenFileName);
	//std::ofstream file("imagepath.txt");
	//file<<lpszFile<<std::endl;
	//StrFolder=OpenFileName.lpstrFilter;
	m_pv->loadsideview(lpszFile);
	m_pv->getOutline();

	//zjb
	m_pv->GetMidoutline();
	m_pv->GetLegoutline();
	m_pv->xzGetoutBdr(m_pv->midMin2Top,m_pv->midMax2Top);
}


and this is my smf skinmagic code
C++
VERIFY( 1 == InitSkinMagicLib(AfxGetInstanceHandle(), NULL, NULL, NULL ));
VERIFY( 1 == LoadSkinFromResource(NULL, (LPCTSTR)IDR_SMF1 ,"SMF" ));


The skinmagic embedded into the MFC. there always are some strange things happend . so could anyone help me ?
Posted
Comments
Richard MacCutchan 23-Aug-13 6:06am    
You probably need to ask Skinmagic.
Member 10198541 25-Aug-13 0:18am    
wow,i know that. it's a shame that we can't load picture here. then you can see it
Richard MacCutchan 25-Aug-13 3:10am    
That would not help at all, since I have no idea what Skinmagic is or does. As I suggested above, you should try asking them.
Member 10198541 25-Aug-13 9:37am    
Thank you for your advice. I have done it to remove the skin from the dialog.But the mainframe still have it. haha

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900