|
I made it (Inside DOC/VIEW architechture) in the CChildFrm::PreCreateWindow (CREATESTRUCT &cs). If you have that class, perfect. If not... take a look into your docu to that function, maybe it helps you to find out how to do it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
ya i too have those class n functions available...
plz help me in detail...
|
|
|
|
|
ya i too have those class n function available..
plz help me in detail...
NOTE:
I am creating child window using CreateNewChild.. how can i make use of
cs.lpCreateParams.
|
|
|
|
|
This is more or less what I made.
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
extern CFPSDoc* m_pDoc;
;
if ((m_pDoc) && (m_pDoc->m_szNewFrameName != ""))
{ cs.style = WS_SYSMENU | WS_CAPTION | WS_OVERLAPPED;
;
if (m_pDoc->m_szNewFrameName == "ViewType1")
{ int nMax = 0;
if (m_pDoc->m_cmlMyList1.GetCount () >= m_pDoc->m_cmlMyList2.GetCount ())
nMax = m_pDoc->m_cmlMyList1.GetCount ();
else
nMax = m_pDoc->m_cmlMyList2.GetCount ();
cs.cx = 500;
cs.cy = (40 + (25 * nMax));
m_pDoc->m_szNewFrameName = "This is the Type of view 1 in project \"" + m_pDoc->GetTitle () + "\"";
}
else if (m_pDoc->m_szNewFrameName == "ViewType2")
{ cs.cx = 528; cs.cy = 322;
m_pDoc->m_szNewFrameName = "Second type of View in project \"" + m_pDoc->GetTitle () + "\"";
cs.style = cs.style | WS_MINIMIZEBOX;
}
else if (m_pDoc->m_szNewFrameName == "ViewType2_Not_Visible")
{ cs.cx = 1; cs.cy = 1;
m_pDoc->m_szNewFrameName = "";
cs.style = cs.style | WS_MINIMIZE;
}
else if (m_pDoc->m_pObj1 || m_pDoc->m_pObj2)
{ cs.cx = 415; cs.cy = 260;
cs.style = cs.style | WS_MINIMIZEBOX;
}
else if ((m_pDoc->m_pObj3) && (m_pDoc->m_pObj3->m_nType == 0))
{ cs.cx = 517; cs.cy = 421;
cs.style = cs.style | WS_MINIMIZEBOX;
}
else if ((m_pDoc->m_pObj3) && (m_pDoc->m_pObj3->m_nType == 2))
{ cs.cx = 610; cs.cy = 435;
cs.style = cs.style | WS_MINIMIZEBOX;
}
;
cs.lpszName = m_pDoc->m_szNewFrameName;
}
return TRUE;
}
This is what I use to configure the different type of views that may be opened. Up to 50 different views in 6 different configurations.
Was that what you were asking for? If not... sorry. I didn't understand what you told me
the ";" are used just to avoid the cancellation of empty lines
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Thanks man..
This will solve my problem.
Cheers....
|
|
|
|
|
You are wellcome
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi,
I have created MFC Activex Control in VS 2005.It is working very fine on my machine.
Now I want to run it on the different machine(NOTE : Without VS 2005).So I tried to register it with REGSVR32 , but I gives me the error like.....
LoadLibrary ("ActivexVS05.ocx") failed - This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
And also it is registered very easily on diff machine with installled VS 2005.
So,Can anyone suggest me what is the problem??
Ashish Bhatt
|
|
|
|
|
|
Thanks For Reply.
As you told me to read the content as linked in your reply, I read it very carefully.
And I got one confusion that In this content I found the below line.........
If you redistribute an MFC DLL, be sure you redistribute the retail version rather than the debug version. Debug versions of the DLLs are not redistributable. Debug versions of the MFC DLLs have a trailing "d" in their file names, as in Mfc80d.dll.
Here how can I redistribute my ocx of the retail version not debug version.And where this retail version is on my system. Sorry for the such silly quetions but I have no idea about this retail version.
can you suggest me something more?
Thanks.
Ashish Bhatt
|
|
|
|
|
|
Thank you very much for replying me. After very long time but still reply is important.
Now in present I have started my control to be registered on other PC also.
If you have no any problem then may I ask you one more quetion?
So, At right now I have created one package of Project setup to install my Activex on other PC.But I have to register my control manually Using REGSVR32.exe But I want to register that Control during package installation Process.
Do you have any Idea?
I so then you can share with me.
Thanks.
Ashish Bhatt
|
|
|
|
|
Hi Ashish,
Thanks.
Yes, you can very well use the RegSvr32.exe in packager. However, I don't know much about how to.
Regards,
Paresh.
|
|
|
|
|
Hi,
I am working on disabling menu options,tool bar options and handling windows messages on another application.
I am able to disable the menu options of another application by getting
a handle to that application using FindWindow API.
Is it possible to handle the windows messages on another Application?
I want to disable the right click option on another application.
Is it possible? Any suggestions would be appreciated.
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
Windows hooks! See, for instance, the articles API hooking revealed, Hooks and DLLs and, of course, the documentation ^.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I've created a Single Document MFC Project. If I run this project,a window opens. If I select File->Print or File->Save, the corresponding Dialog opens. But If I select File->Open from the File menu
the File Open Dialog doesn't open. How can I do this? Pls help.
|
|
|
|
|
???
Revise your Menu in the resource editor and ensure that you have ID_FILE_OPEN in the Menu option File->Open.
it should be automatically included.
BTW you can always call CMyDocument::OnOpenDocument (); it should have a call to CDocument::OnOpenDocument (lpszPath) inside.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
hi friends,
How do i change the size of the font( i mean text) in my listbox control??if possible explain that to me with sample code.
|
|
|
|
|
Call SetFont() function of the list box( CListBox ).
|
|
|
|
|
hi whanks for the reply,
since i'm new to vc++, can u tell me the syntax of setFont()
|
|
|
|
|
Click on the "?" button in your VC++ toolbar, go to the "index" tab in the help and write CListBox, then choose class members, look for SetFont () and click on it. You will have the info there
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
It was for SetFont and for CreateFont!
|
|
|
|
|
you are a very bad guy ;P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Are you also new (or allergic) to documentation (MSDN,...)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: Are you also new (or allergic) to documentation (MSDN,...)?
Online help or local help?
|
|
|
|
|