|
Not sure where you saw vectors used with CoMarshalInterThreadInterfaceInStream() , it only deals with one interface at a time.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|
I am trying to create the Atl servce in VC++ for file monitoring. I am following the link "<http: www.codeproject.com="" atl="" atl_control_with_mfc.asp".="" i="" am="" using="" this="" sample="" code="" in="" sevice.
=""
but="" facing="" problem="" "ccomobject<cfilemonitorsink=""> *m_FileMonitorSink;. It is not including the CComObject"
It's not getting included properly.
|
|
|
|
|
I created a project using 'ATL COM AppWizard'.
After Selecting projecting Name from 'class view', I did not find the 'New ATL Object' Menu item either from Insert Menu or from Popup menu.
Could you please let me know by selecting/changing which options I can get this menu item.
|
|
|
|
|
You should reinstall your VS.
|
|
|
|
|
yes,otherwise there is no reason why it is not showing.
|
|
|
|
|
Hey everyone! I'm working with WTL; when I try to use std::list with a class let's say "int", i can safely use this list. Since i've defined a class , let's says "CMyClass" and tried to use it:
list <cmyclass> c1;
list <cmyclass>::iterator Iter;
that dosesn't work and i still can't undestand why is it because of the definition of this class ( i ude in it my own defined types)?. Can someone give me a help?
Madjid
|
|
|
|
|
How does it not work? Does it not compile, or does it generate runtime errors?
|
|
|
|
|
It doesn't generate any error at compilation but when executing! in fact, i find a solution: not to use CMyClass but *CMyClass. Thanks everbody!
Madjid
|
|
|
|
|
I bet you didn't take copy construction/assignment into account.
|
|
|
|
|
When converting an MFC project to a WTL one, I was unable to find the equivalent
of CList in WTL and even if I implement it, there're too many problems when
using template classes. Does anyone have an idea? thanks!
Madjid
|
|
|
|
|
|
I second Mr Dunn's choice. STL collections are way better than the ATL collections. ATL collections are only worth taking a look at if you want to remove the dependency on the C/C++ runtime DLLs.
Good music: In my rosary[^]
|
|
|
|
|
Just to add my voice to the cacophany, CList is crap. std::list rules.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I am new to WTL and currently i try to port an MFC app to WTL.
I try to find a way to get the application main window similar to AfxGetMainWnd().
For the moment i put the CMainFrame in a global variable, which works. I just want to know if there is a 'proper' way, like a function in CAppModule or something.
Thanks.
|
|
|
|
|
No, there is no "proper way". You'll have to provide your own version of AfxGetMainWnd()
Good music: In my rosary[^]
|
|
|
|
|
|
is there a way to format strings in STL like MFC CString's Format()?
CString str;<br />
int i;<br />
str.Format("%d", i);
thanks in advance...
- Indivara
"...This city desert makes you feel so cold.
It's got so many people but it's got no soul..."
- Gerry Rafferty, Baker Street
|
|
|
|
|
|
cool! thanks!
- Indivara
"...This city desert makes you feel so cold.
It's got so many people but it's got no soul..."
- Gerry Rafferty, Baker Street
|
|
|
|
|
There's also std::stringstream which behaves just like std::cout , but stores all the stream data into a string.
Good music: In my rosary[^]
|
|
|
|
|
This is what i want to do.
I want to create 3 window splitters so i get 4 view windows. Sort of like a cross, with a top-left, top-right, bottom-left, etc window. Its for a 3d-level editor for a game.
This is easy to do, but when i create a vertical window splitter, and then set's its splitter panes to two horizonal window splitters, the horizonal window splitters will be able to resize individually. I dont want this, i want it to behave as if it was only one horizonal window splitter.
Anyone get what i mean?
Sorry for my english, not my native language.
Thanks in advance!
|
|
|
|
|
You'll have to do it your self I'm afraid, as the WTL splitter handles only 2 views.
I think though, that it's probably quite easy to hack up a 4 view splitter, based on WTL's splitter code. Since the base code is a template, with a boolean parameter determining it's orientation, it should be quite easy to just modify the existing code to handle the case when the parameter is both true and false at the same time. Separate the logic for verticalness and horizontalness and merge them together.
Good music: In my rosary[^]
|
|
|
|
|
I used function VarBstrFromI1 conver char to BSTR:
//Adsoft.cpp
STDMETHODIMP CMyData::get_CGetComputerName(BSTR *pVal)
{
// TODO: Add your implementation code here
char szHostName[200];//char* szHostName
gethostname(szHostName,strlen(szHostName));
struct hostent* strTemp;
strTemp=gethostbyname(szHostName);
if(strTemp !=NULL)
strcpy(szHostName,strTemp->h_name);
BSTR* abc;
if(VarBstrFromI1(szHostName,abc)==S_OK)
pVal=abc;
return S_OK;
}
Program error:
error C2660: 'VarBstrFromI1' : function does not take 2 parameters
-- modified at 0:19 Friday 26th August, 2005
|
|
|
|
|
Thangnc wrote:
if(VarBstrFromI1(szHostName,abc)==S_OK)
error C2660: 'VarBstrFromI1' : function does not take 2 parameters
reflecting a bit, what does the error description tells you ?
it is because you call VarBstrFromI1 with two parameters, when it does take 2 ones.
see its declaration/definition to understand how it works...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|