|
Hey!
I develope Windows form with infragistic controls. When I open the Form, whole form is not appearing at onece. Before become visible windows standart controls and there where infragistics controls should be, those areas are transparent and background application is visible. Only after the moment infragistic controls appear.
Does any one know why it is acting like this?
Is there any workaround?
Thankyou in advance.
Del
-- modified at 5:52 Saturday 1st July, 2006
|
|
|
|
|
class tagtree
{
...
public:
std::map<CString,tagtree*> mapControllee;
};
** working code **
tagtree *tt;
tagtree *ttController;
tt = AddNode(...);
ttController = tt;
tt = AddNode(...);
ttController->mapControllee[strName] = tt; <- assert and crash at compare down to _tcmp with pointer lpsz = 0xcdcdcdcd("")
anyone help? i use map quite regularly..
from,
-= aLbert =-
|
|
|
|
|
stl better
a["a"] = p
result?
Kuphryn
|
|
|
|
|
bug in xtree
from,
-= aLbert =-
|
|
|
|
|
You haven't posted enough code for the problem to be visible. What does AddNode do? Clearly we need this as it determines the value of tt and ttController . One thing I'll say - The problem is almost certainly with AddNode .
Steve
|
|
|
|
|
the AddNode is nothing more than just "new tagtree with tagtree's attributes".
during the config process between tagtree could be linked by using tagtree's map.
my post there is to get attention from ppl who met this problem b4. if u never met it,
i have to be frank it is quite unlucky day then u will see it. it is a bug in stl library.
i fix it by patching my stl xtree file used by map. the bug never go away after
service pack 5 for vc6.
simply google dinkumware. they are the one who write stl lib in vc6.0
from,
-= aLbert =-
|
|
|
|
|
Hello CPians,
I am back with another question.
Ok, so I am gonna get straight to the point. I have custom Window which was derived from CFrameWindowImpl . Now the class which handles this Window has a Constructor and a Destructor . All the Window logic is written in this class. When I create a window, I do this.
CFrameWindow myWindow ;<br />
myWindow.Create() ;
which creates the Window. Now, when the application ends, I know for sure that the destructor of CFrameWindow is called. What if I had done this?
CFrameWindow *myWindow ;<br />
myWindow->Create() ;
then I would have to call delete myWindow ; to call the destructor. This is fine with an application. But supposing the window Window1 is created by another window, Window2 . When Window1 closes, it informs Window2 that it is being destroyed. This notification is sent during WM_NCDESTROY .
My question when in Window2 do I make the call delete Window2 ? I would have to free the memory.
Any help?
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
|
|
|
|
|
Typically you would override OnFinalMessage() to delete this. If you are still using VC6 (ATL3) then you might encounter some problems with this solution though (http://vcfaq.mvps.org/com/10.htm[^]).
|
|
|
|
|
Thanks. Will look it up and let you know if it solves my problem.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
|
|
|
|
|
I am an MFC host and willing to develop an parallel application using ATL.
I have developed one class simulate which displays engine piston movement on screen.
and i have four threads for four cylinder.
Using ATL I developed a control which can show one cylinder running.
But with help of multithreading I want to show four cylinders.
Is it possible to develop such control.
|| ART OF LIVING ||
|
|
|
|
|
I Declare a custom ListViewCtrl like this:
class CListCtrlImpl :
public CWindowImpl<clistctrlimpl, clistviewctrl="">
{
public:
BEGIN_MSG_MAP(CListCtrlImpl)
END_MSG_MAP()
CListCtrlImpl(){};
virtual ~CListCtrlImpl(){};
};
I want to do something when click the ScrollBar
class CListCtrlImpl :
public CWindowImpl<clistctrlimpl, clistviewctrl="">
{
public:
BEGIN_MSG_MAP(CListCtrlImpl)
MESSAGE_HANDLER(WM_ONVSCROLL, OnVScroll)
END_MSG_MAP()
CListCtrlImpl(){};
virtual ~CListCtrlImpl(){};
LRESULT OnVScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (GetFocus() != m_hWnd) SetFocus();
return 0;
}
};
for this code, the OnVScroll function can execute, but the SCrollBar doesn't work well, the content doesn't scroll any when I drag the SCrollBar ,
can every help me, Thanks to all!
-- modified at 21:03 Tuesday 27th June, 2006
|
|
|
|
|
LRESULT OnVScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
:
bHandled = FALSE;
return 0;
}
|
|
|
|
|
|
hi guys
i m getting a problem of insertion into the database.The application has been developed using java-beans,jsp and database as mysql server and the application is deployed in red hat linux 7.0(which is a server)
The actual problem is the data gets inserted every time but sometimes the data does not gets inserted into one table but the other tables are updated
thanks in advance
ratish
|
|
|
|
|
You need a java forum not a C++ forum. Give a little more detail when describing your problem.
-- modified at 8:59 Tuesday 27th June, 2006
|
|
|
|
|
Hi,
I have created an ATL executable.
It has only CExeModule (base -> CComModule)
I inserted a dialog. and in _tWinMain ,
I create this dialog and show.
So when I execute this exe itself, dialog shows up.
Now I want this COM exe to be used in a VB program.
I give the reference to this particular component .
But in code how may I use this to show my dialog in my exe COM.
had there been an Interface with method showdialog (where dialo will be created and showed),
I would have used similar to..
Dim obj as Object
Set obj = new MyInterface
obj->showdialog
1. But without such interface , how can I show up my dialog in VB , if the dialog itself is created at the entry point of com i.e. in _tWinMain
2. If the ATL exe has interface and method (to show dialog), then how can I use ATL exe itself to show the dialog.
Thanks
Row
|
|
|
|
|
You souldn't put the call the show the dialog in WinMain . You should use the ATL wizard to add a COM object to the project the put the call to show the dailog in one of the interface methods implemented by the object.
Steve
|
|
|
|
|
I have a win32 library with no interfaces , just only exported functions.
e.g. One of those is .. bool getInfo (char *string, int counter);
I created a ATL exe , inserted a simple object.No I want to link the above library to my ATL project.
So in Project->settings->link, I gave the lib name and directory of the lib file.
Now I want to use this function getInfo in my atl program.
SO I added one method in my interface say CallLibFunction
And in that method I want to call getInfo..
Are these steps ok?
Please let me know, any other precaution or regarding data types???
Kindly let me know.
Row
|
|
|
|
|
You may need to declare the getInfo signatrure to satisfy the compiler.
bool getInfo (char *string, int counter);
Implimentation will be taken from the .lib file.
cheers...milton KB
|
|
|
|
|
You need to include a header file that should be provided with the library.
|
|
|
|
|
I'm trying to create a .dll using ATL, which I want use in C#.
Can anybody please guide me to create a simple method / function which takes string in input parameters and returns the same(string)..
I tried a lot but always faced problem of returing string back to calling function in C#.
I did the same with C++ class library successfully but when it comes to ATL its not the same.
As I'm using other SDK API's in creation of .dll and I can't go with Class Library its having problem with "CLR and MTd". Which can't go together. Finally I decided to stick to ATL.
Now please guide me to create the methods which I can use in C# to get the string value.
Arun
|
|
|
|
|
I assume that you don't use attributes in your project, and you want to have a property named 'Title' of type BSTR (COM string type)
in your IDL file:
interface IYourInterface: IDispatch{
[propget, id(1), helpstring("property Title")] HRESULT Title([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property Title")] HRESULT Title([in] BSTR newVal);
};
in the header file of your object:
public:
STDMETHOD(get_Title)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_Title)(/*[in]*/ BSTR newVal);
private:
_bstr_t m_bstrTitle; // variable holding the property value
and in the implementation file of your object:
STDMETHODIMP CYourClass::get_Title(BSTR *pVal)
{
*pVal = m_bstrTitle.copy();
return S_OK;
}
STDMETHODIMP CYourClass::put_Title(BSTR newVal)
{
m_bstrTitle = _bstr_t(newVal);
return S_OK;
}
-- modified at 15:53 Monday 19th June, 2006
|
|
|
|
|
hello @ Roozbeh69 thanks for that solution but I have faced few problems which are listed below :
I have created property using wizard but when it comes to
<br />
private:<br />
_bstr_t m_bstrTitle;
<br />
and in the implementation file of your object:<br />
<br />
STDMETHODIMP CYourClass::get_Title(BSTR *pVal)<br />
{<br />
*pVal = m_bstrTitle.copy();
return S_OK;<br />
}<br />
<br />
STDMETHODIMP CYourClass::put_Title(BSTR newVal)<br />
{<br />
m_bstrTitle = _bstr_t(newVal);
return S_OK;<br />
}<br />
and As per me the syntax which u have given varies a lot from auto generated one. I'm using VS 2005.
Once again I would like to clear what exactly I'm trying after ...
I want to create a .dll using ATL. After I want to create a method inside this, which I can call from C#.
This method should take Filepath(string) as input while invoking from C# and should return some string back to C#.(not pointer)
Please guide me if possible with a proper working code.
Thanking you,
Arun
|
|
|
|
|
No need to call the .copy() or to create a new _bstr_t out of the BSTR u r gettign into the property put.
corrected code below:
<br />
STDMETHODIMP CYourClass::get_Title(BSTR *pVal)<br />
{<br />
*pVal = m_bstrTitle; <br />
return S_OK;<br />
}<br />
<br />
STDMETHODIMP CYourClass::put_Title(BSTR newVal)<br />
{<br />
m_bstrTitle = newVal;<br />
return S_OK;<br />
}
Regarding the method u need to create, the IDL signature will be:
[id(1), helpstring("your atl method signature")] HRESULT YourATLMethod([in] BSTR Filepath, [out,retval] BSTR* ReturnString);
and the C++ implimentation signature will be:
STDMETHODIMP CYourClass::YourATLMethod(BSTR Filepath, BSTR* ReturnString)<br />
{<br />
_bstr_t bstrFilepath = Filepath;<br />
_bstr_t bstrReturnstring = _T("some string here");<br />
*ReturnString = bstrReturnstring ;<br />
return S_OK;<br />
}
cheers ...milton kb
|
|
|
|
|
Hi Milton,
Yes, it solved my problem. Really thank u very much man.
Thanking U,
Arun
|
|
|
|