|
Too fast for me
|
|
|
|
|
There is a trick (used by me) :
1) typing "hello world" as an answer
2) editing of the answer
virtual void BeHappy() = 0;
|
|
|
|
|
Nice!
|
|
|
|
|
If MFC dll exports mainframe then it can export a form dialog (CFormView) where this form dialog contains container data(coleclientitem,coledocument)
is there any example available?
|
|
|
|
|
Here[^] is an article from 1999 that is mainly still valid. Read through it. It's really not a difficult topic just to get it going.
|
|
|
|
|
Since you can export MFC classes from an extension dll, you can have your CDocument and CView derived classes in one and use them in your SDI/MDI application.
|
|
|
|
|
How i can change the width of scrollbar in MFC SDI application? also tell me that which functions i have to use in Onsize(); ??
modified on Friday, August 20, 2010 12:30 PM
|
|
|
|
|
This is not a C++/CLI question. I'll move this to the native C++ forum.
|
|
|
|
|
How to skin CListCtrl[^] shows how to implement your own scrollbars. That might be a way for you. (since no-one has replied here)
|
|
|
|
|
How can I pass an CRuntimeClass argument of the generic class method ?
I wish something like this :
void CMyGenericClass::MyMethod(arg1,...,CRuntimeClass* pView)
{
pView->ClassViewMethod();
}
and pView class might be : CMyFormView1, or CMyFormView1, or ... etc.
And second problem : in this void CMyGenericClass::MyMethod(arg1,...,CRuntimeClass* pView) method , how can I check if an ID object exist and his type ? For example , how can I see ( without errors ) if 'ID_NAME' exist and is CEdit type or CComboBox type ? Thank you .
|
|
|
|
|
You could have the following hierarchy :
class CMyBaseFormView : public CFormView
{
public:
virtual void ViewMethod() = 0;
};
class CMyFormView1 : public CMyBaseFormView
{
public:
virtual void ViewMethod() { };
};
class CMyFormView2 : public CMyBaseFormView
{
public:
virtual void ViewMethod() { };
};
void CMyGenericClass::MyMethod(... , CMyBaseFormView* pcView)
{
if (pcView->GetSafeHwnd()) {
pcView->ViewMethod();
}
}
virtual void BeHappy() = 0;
|
|
|
|
|
Well, it's an response that answer of both questions ... good ideea ! Thank a lot !
P.S.It's the only way to do it ?
modified on Friday, August 20, 2010 8:21 AM
|
|
|
|
|
There are many ways, of course...
...but only "one" C++ language (with its ethics (guidelines))
(in very critical cases
can be used also CObject::IsKindOf(..) or DYNAMIC_DOWNCAST(..) ,
but it is preferred, to use the virtuality, where it is possible.
Also we should take care to incapsulate the object members... )
virtual void BeHappy() = 0;
|
|
|
|
|
I have an MFC application which has number of dialog windows. Out of that, one dialog window has MSFlexGrid control in it.
When I run the Application and open the dialog windows, all the dialog windows opens up except the one with MSFlexGrid. The Dialog that has the MSFlexGrid control is unable to open. The problem appears weird
Pl. Help me to fix this problem.
Thanks in Advance
|
|
|
|
|
Please elaborate (i.e. use the debugger and then tell us more about the problem).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I would not be able to debug since I dont have the problem at all.
When I tested the same, its working fine for me. i.e., The application shows up the dialog withe MSFlexGrid control. But its not working in the client place which is far of from here. Even in the client place it works for him in few PCs.
In the client place, if he run the application and try to open the dialog with MSFLexgrid, the dialog is not opening. It even didnt give any error messages or crash. Then I created a sample application with 2 dialogs one with MSFlexgrid and other without the Control, to confirm the problem. The same thing happened. The dialog without the MSFlexGrid control does not show up whereas the other dialog without the MSFlexGrid showed up.
I suspect any DLL problem or any access violation for the DLL?
Kindly help.
|
|
|
|
|
The MSFlexigrid is an ActiveX control, you should install the MSFlxGrd.ocx on the target machine.
To be honest I would expect a more dramatic event happening whenever the app is unable to find the component.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: To be honest I would expect a more dramatic event happening whenever the app is unable to find the component.
No, that's how it reacts and it's really a pain. An big red error message would be much more convenient to fix the problem. I remember when I was first playing with ActiveX that I had the same problem and I took me quite some time to find the issue (but well, I was young and naive at that time :p).
|
|
|
|
|
Similar things happen when you try to open a dialog containing an ActiveX which is not registered in the system. So, you should make sure that the ActiveX is present and registered on the target system. This is most probably the cause of your problem.
|
|
|
|
|
Thank you very much for your suggestion.
Can you Pls elaborate how to find that the ActiveX is present and Registered for my case (MSFlexGrid)
Do I have to check only the MSFlexGrid.OCX or still anything more to do.
Pl. list out the steps to be followed to make it work.
Thanks in advance
|
|
|
|
|
you may use 'OLE/COM Object Viewer' of Visual Studio Tools.
there in left tree view, Object Classes ->Grouped by Component Category ->Controls
Also, better not to insert activeX control by right clicking on dialog and selecting 'insert activex control'. Instead use CWnd::CreateControl(), and check the return value. Do write such a a test application and run it on the suspicious PCs to confirm the issue.
|
|
|
|
|
HI all,
I have recently installed the "Service Pack 1 Redistributable Package ATL Security Update" update. Now i have the x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989 in my "c:\window\WinSxS\" folder. But, i dont have the corresponding Debug version.
Now, when i build the application in VS2005, the debug manifest of my application refers to the 8.0.50727.4053. Now, I am unable to debug my application as it fails to find the debug version of 8.0.50727.4053.
How can i Solve this?
Thanks in advance.
Bibin Varghese
modified on Friday, August 20, 2010 12:31 PM
|
|
|
|
|
Bibin, this is not the appropriate forum for this question. I am moving this to the native C++ forum.
|
|
|
|
|
Hi guys, i am a fresher to IT. pls any tell me how to read file in backward using iterators
|
|
|
|
|
What do you mean exactly?
Cannot you just read the whole file and then going backward in the memory buffer?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|