|
Hi,
I have developed an ATL component in VS2005. When I try to register that dll in another system where VS2005 is not installed its not getting registered
but if try to register it in a system where VS2005 is installed its getting registered.I build the application choosing "Use MFC in Static Library".
What could be the problem?Any suggestion would be helpful.
thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
Use dependencywalker to find the missing dependencies on the system without VS 2005
I think, the ATL DLL is missing when you don't have VS 2005 installed
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hi,all
I have create a horizontal split window in main view, top pane is one listview control. I would to place a tab control at bottom pane, two tab page of the tab control are listview control also.
Now, the tab control can't drawed correctly when drag the split bar. and the two listview control can't sized to correctly.
thanks.
|
|
|
|
|
Hi, i just started with ATL. red the book: ATL Internals: Working with ATL 8, Second Edition, and its great!
Now im experimenting a bit with ATL and for some or other reason i cant find a way to debug an ATL-DLL. I'm using Visual studio 2005, and it would be wonderfull if i knew how to use the debugger with the dll so i can set breakpoints for example.
Ofcourse debugging with out-prog services is no problem. but inproc services dont run on their own, they need te be started.
Can anyone help me?
- Koen
|
|
|
|
|
Following steps may help -
1. Create a script or an EXE that uses your ATL inproc server (a DLL).
2. In your ATL Inproc server project, go to Project->Properties->Debugging and then set value of "Command" to be the path of your EXE.
3. Now if you can set breakpoints in your server and start debugging.
I believe this will help.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
thanks, its working
|
|
|
|
|
this is idl declaration:
STDMETHOD(ExecVerifygps)(/*[in]*/ BSTR gpsContent, /*[in]*/ short
length, /*[out, retval]*/ boolean* flag);
this build tli file.
inline char IVgps::ExecVerifygps ( _bstr_t gpsContent, short length ) {
char _result;
HRESULT _hr = raw_ExecVerifygps(gpsContent, length, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
why 3rd parameter change to char?
alantop
|
|
|
|
|
C doesn't have a native boolean type (as used in the IDL), so you need to use some other type that's the same size as boolean . An IDL boolean is 8 bits, as is a C char .
It would have looked better to use typedef char boolean; , 'cause then you could use boolean in the code.
|
|
|
|
|
Hello,
Did you try VARIANT_BOOL?
Regards,
Leonid
|
|
|
|
|
I am having trouble getting the multi pane statusbar control to work in a dialog application. When I could not get it to work I used the WTL wizard to generate an SDI program and copied the exact same code in which works perfectly.
The second problem as I don't know how to move the statusbar out of the client area in the dialog as there is no equivilant of the MFC RepositionBars in WTL.
|
|
|
|
|
HI all,
I have created an IE toolbar. And also I have created a dialog box
derived from CAxDialogImpl . While clicking on a button on the ToolBar, this
dialog box will come. On this dialog box I have an Edit Box . And I need to
setfocus on that Edit box how can I do that , I am provided with only the ID of
the Editbox from Resource.
Please Help me,
Thanks IN Advance.
George
|
|
|
|
|
Call SetFocus() in your WM_INITDIALOG handler, and return FALSE from the handler.
|
|
|
|
|
Hi Mike,
First of all thanks for your reply . And sorry for not informing u that , there are more than on Edit Boxes in that dialog. And I want to Set focus on one among those Edit Boxes.
Thanks
George
|
|
|
|
|
The answer is still the same - you set the focus to whatever edit box you want to have the focus.
|
|
|
|
|
Hai Mike ,
Thankyou very much for your reply.
regards
George
|
|
|
|
|
1、Get HWND of your dialog box.
2、Get HWND of edit.
3、use SetFocus() api.
eg:
HWND hDlg = ... //get hwnd of your dialog box.
HWND hEdit = GetDlgItem(idEdit);
SetFocus(hEdit);
i love vc!This will appear at the
end of messages you post
to the Code Project
|
|
|
|
|
Hai wang,
Thankyou for your valuable reply , it helped me a lot
Regards
george
|
|
|
|
|
I want to use two recent file lists in a SDI project, how to do?
Thank you very much!!
|
|
|
|
|
I am writing a attributed COM component in Visual Studio .NET 2003 (VC++ 7.1). For reusing the types defined in some other TLB, I want to import this TLB that I do by inserting the following line in stdafx.h.
[ importlib("test.tlb") ];
This 'importlib' attribute places this line in the library block of the IDL file. However, now if some of the interface methods in my COM component want to return an interface defined in test.tlb, it gives me IDL compilation error.
Perhaps, it is probably since the automatic IDL generation by the compiler puts all the interface declarations of my component outside the library block, and the importlib attribute generates the importlib line inside the library block... and, so the interface declarations of my component are not able to recognize the interface types defined in the imported type library.
Can anyone suggest me if I am importing the library in a wrong way, or if there is any other solution to it ?
Thanks & Regards,
Arun
|
|
|
|
|
This isn't meant to be snarky, but don't use attributed ATL. It's more headache than it's worth. Go with regular ATL and use #import to generate wrappers for the stuff in the TLB file.
|
|
|
|
|
Please insert "[ importlib("test.tlb") ];" in current .idl file.
eg:
[
uuid(95E822B6-6B10-4e86-9603-6CECB6135867),
version(1.0),
helpstring("xxxxx 1.0 Type Library")
]
library xxxxxLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
importlib("test.tlb"); //here insert!
...
}
good luck!
i love vc!This will appear at the
end of messages you post
to the Code Project
|
|
|
|
|
Hi all,
I have made an Internet Explorer toolbar. ToolBar is having only three buttons. I used TBBUTTON for making Buttons. I have loaded bitmaps on each button using following code.
myfun(){
CToolBarCtrl::Create(DEFAULT_TOOLBAR_STYLE, rcClP, pWndParent,IDB_BITMAP1))
AddBitmap(3, IDB_BITMAP1
TBBUTTON tbs[3];
for (int i = 0; i < 3; i++)
{
tbs[i].dwData = 0;
tbs[i].fsState = TBSTATE_ELLIPSES|TBSTATE_ENABLED ;
tbs[i].fsStyle = TBSTYLE_BUTTON;
tbs[i].iBitmap = i;
tbs[i].idCommand = ID_BUTTON1 + i;
tbs[i].iString = i;
}
AddStrings(_T(" Red\0"));
AddStrings(_T(" Green\0"));
AddStrings(_T(" Blue\0"));
if (!AddButtons(3, tbs))
return false;
return true;
} //function ends here
Here I am able to load bitmap on each buttons . But I need to add Icons on each button. How it possible
Please Help me
Thanks in Advance
George K Jolly
|
|
|
|
|
I don't know for sure, this question should be in the Visual C++ / MFC[^] forum to get more eyes on it. You might have to create your own image list and load the icon into it then set the image list TB_SETIMAGELIST into the toolbar control. See Toolbar Controls Overview[^] for more information.
led mike
|
|
|
|
|
I have used new ATL object to do OLE DB connection,bywhich i got table.h header file,and now i want to insert data in msaccess table by using following code...can anybody help me to solve my problem can you just tell me one thing first whether this way of using to insert data is correct or not...
and what changes should i make it here to correct it
.
<br />
m_TQuote.Open();
m_bInserting = FALSE;
DoModal();<br />
<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_DateTimeStamp);<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketNo);<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_Bid);<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketName);<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_Ask);<br />
GetDlgItemText(IDC_EDIT1,m_TQuote.m_MarketState);<br />
<br />
HRESULT hr = 0;<br />
if (m_bInserting)<br />
{<br />
hr = m_Set.Insert();
}<br />
else<br />
{<br />
hr = m_Set.SetData();
}<br />
m_bInserting = FALSE;<br />
<br />
|
|
|
|
|
I create a composite control and add a toolbar on it.
For that toolbar, how should I provide Tooltip?
Thanks in advance.
Regards
Amar.
|
|
|
|