Click here to Skip to main content
15,896,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAccessing a DLL class Pin
masnu19-Sep-06 5:29
masnu19-Sep-06 5:29 
AnswerRe: Accessing a DLL class Pin
Cedric Moonen19-Sep-06 5:43
Cedric Moonen19-Sep-06 5:43 
Questionhow to partition a log fog file into 2Mb chunks Pin
flippydeflippydebop19-Sep-06 4:10
flippydeflippydebop19-Sep-06 4:10 
AnswerRe: how to partition a log fog file into 2Mb chunks Pin
David Crow19-Sep-06 4:46
David Crow19-Sep-06 4:46 
AnswerRe: how to partition a log fog file into 2Mb chunks Pin
Jun Du19-Sep-06 4:48
Jun Du19-Sep-06 4:48 
GeneralRe: how to partition a log fog file into 2Mb chunks Pin
David Crow19-Sep-06 4:56
David Crow19-Sep-06 4:56 
GeneralRe: how to partition a log fog file into 2Mb chunks Pin
flippydeflippydebop19-Sep-06 5:07
flippydeflippydebop19-Sep-06 5:07 
QuestionMFC Child window,is not visible Pin
sepehr_vision19-Sep-06 4:02
sepehr_vision19-Sep-06 4:02 
hi everybody.
i am writing a list like control for a big app.
an it is done using oop.i have created a window which creates buttons.the buttons are created while watching it using spy.but they are not visible.PLEASE HELP ME!and tell me what i haven't done.here is some parts of code:
void ECMLMItem::Create(int i,CWnd *pParent,CRect rect,CRect RcList)
{
	/*WNDCLASS	wndcls;
	memset(&wndcls, 0, sizeof(WNDCLASS));
	wndcls.style = 0;
	wndcls.lpfnWndProc = ::DefWindowProc;
	wndcls.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
	wndcls.lpszClassName = "ABC";
	DWORD style = GetClassLong(m_hWnd, GCL_STYLE);
	RegisterClass(&wndcls);*/
	//	style |= CS_PARENTDC;
//	style &= ~(CS_VREDRAW|CS_HREDRAW);
//	SetClassLong(m_hWnd, GCL_STYLE, style);
	

	CWnd::Create(/*"ABC"*/0,"ECMLMItem",WS_BORDER|WS_VISIBLE|WS_CLIPCHILDREN,rect,pParent,LISTITEM+counter,0);
	counter++;
	obj[i] = new ECMLMObjects();
	obj[i]->create(i,this,rect,RcList);	

}

void ECMLMItem::CreateObject(CWnd *pParent,int i)
{
	
	if(i<10)
	{	
		rect.left=RcList.left+12;
		rect.top=RcList.top+20*i+1;
		rect.right=RcList.right-12;
		rect.bottom=rect.top+20;
		ECMLMItem::Create(i,pParent,rect,RcList);//create a new item as a rectangle to put 3 objects in it
		
	}
		
}
void ECMLMObjects::create(int i,CWnd *pParent,CRect rect,CRect RcList)
{
	int w;
	w=RcList.Width()-20;

	rect.left=RcList.left+12;
	rect.top=RcList.top+20*i+5;
	rect.right=rect.left+w*3/15-2;
	rect.bottom=rect.top+20;	
	btn[i].Create(""/*text*/,WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,rect,pParent,Button+i);

	rect.left=RcList.left+w*3/15+15;
	rect.top=RcList.top+20*i+5;
	rect.right=rect.left+w*4/15-4;
	rect.bottom=rect.top+20;	
	edt[i].Create(WS_VISIBLE|WS_CHILD,rect,pParent,editbox+i);

	rect.left=RcList.left+w*7/15+15;
	rect.top=RcList.top+20*i+5;
	rect.right=RcList.right-12;
	rect.bottom=rect.top+20;
	name[i].Create("Hello"/*name*/,WS_VISIBLE,rect,pParent,statictext+i);
}



Sepehr_vision@yahoo.com
AnswerRe: MFC Child window,is not visible Pin
Jun Du19-Sep-06 5:27
Jun Du19-Sep-06 5:27 
AnswerRe: MFC Child window,is not visible Pin
tanvon malik19-Sep-06 5:39
tanvon malik19-Sep-06 5:39 
Questionproblem with CString Pin
zizzzz19-Sep-06 3:40
zizzzz19-Sep-06 3:40 
AnswerRe: problem with CString Pin
Cedric Moonen19-Sep-06 3:49
Cedric Moonen19-Sep-06 3:49 
GeneralRe: problem with CString Pin
zizzzz19-Sep-06 3:58
zizzzz19-Sep-06 3:58 
AnswerRe: problem with CString Pin
Naveen19-Sep-06 3:51
Naveen19-Sep-06 3:51 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 3:57
Zac Howland19-Sep-06 3:57 
GeneralRe: problem with CString Pin
Naveen19-Sep-06 3:59
Naveen19-Sep-06 3:59 
AnswerRe: problem with CString Pin
Zac Howland19-Sep-06 3:56
Zac Howland19-Sep-06 3:56 
AnswerRe: problem with CString Pin
Jun Du19-Sep-06 4:01
Jun Du19-Sep-06 4:01 
GeneralRe: problem with CString Pin
Cedric Moonen19-Sep-06 4:05
Cedric Moonen19-Sep-06 4:05 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 4:09
Zac Howland19-Sep-06 4:09 
GeneralRe: problem with CString Pin
Jun Du19-Sep-06 4:36
Jun Du19-Sep-06 4:36 
GeneralRe: problem with CString Pin
zizzzz19-Sep-06 4:48
zizzzz19-Sep-06 4:48 
GeneralRe: problem with CString Pin
Jun Du19-Sep-06 4:52
Jun Du19-Sep-06 4:52 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 4:57
Zac Howland19-Sep-06 4:57 
GeneralRe: problem with CString Pin
David Crow19-Sep-06 7:17
David Crow19-Sep-06 7:17 

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.