|
Why not try the Mozilla groups for this information? If you have a specific ATL question, that's different, but your asking a generalized question that pertains to Thunderbird ... this is NOT a Mozilla nor Thunderbird discussion group.
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
|
|
|
|
|
Changes something in the project settings, and this error keeps coming up. It's driving me crazy! Anyone know what this is...? I've checked all the project settings and no luck....
1>------ Build started: Project: Ms2000TT, Configuration: Debug Win32 ------
1>Compiling...
1>Ms2000TTBeamScopeModel.cpp
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(83) : error C2976: 'StrTraitMFC_DLL' : too few template arguments
1> c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(65) : see declaration of 'StrTraitMFC_DLL'
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(83) : error C3203: 'StrTraitMFC_DLL' : unspecialized class template can't be used as a template argument for template parameter 'StringTraits', expected a real type
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(85) : error C2976: 'StrTraitMFC_DLL' : too few template arguments
1> c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(65) : see declaration of 'StrTraitMFC_DLL'
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(85) : error C3203: 'StrTraitMFC_DLL' : unspecialized class template can't be used as a template argument for template parameter 'StringTraits', expected a real type
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(93) : error C2976: 'StrTraitMFC_DLL' : too few template arguments
1> c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(65) : see declaration of 'StrTraitMFC_DLL'
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(93) : error C3203: 'StrTraitMFC_DLL' : unspecialized class template can't be used as a template argument for template parameter 'StringTraits', expected a real type
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(94) : error C2976: 'StrTraitMFC_DLL' : too few template arguments
1> c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(65) : see declaration of 'StrTraitMFC_DLL'
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(94) : error C3203: 'StrTraitMFC_DLL' : unspecialized class template can't be used as a template argument for template parameter 'StringTraits', expected a real type
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(95) : error C2976: 'StrTraitMFC_DLL' : too few template arguments
1> c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(65) : see declaration of 'StrTraitMFC_DLL'
1>c:\program files\visualstudio8\vc\atlmfc\include\afxstr.h(95) : error C3203: 'StrTraitMFC_DLL' : unspecialized class template can't be used as a template argument for template parameter 'StringTraits', expected a real type
1>c:\svnprojects\branches\winson\pcsonar\ms2000tt\ms2000ttbeamscopemodel.h(4) : fatal error C1083: Cannot open include file: 'BeamScopeModel.h': No such file or directory
1>Build Time 0:02
1>Build log was saved at "file://C:\SvnProjects\branches\Winson\PcSonar\Ms2000TT\Debug\Ms2000TTDebug-BuildLog.htm"
1>Ms2000TT - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
hi ,project settings "mimize CRT use in ATL" make it no, this is under configuration properties in general tab.
|
|
|
|
|
Hi folks,
I need my application to act in a different way when the workstation is locked, but I can't find any windows API to check this. I´ve found the following comment under the "LockWorkstation" function at MSDN:
"There is no function you can call to determine whether the workstation is locked. To verify whether it is worth attempting to update your user interface, you can test whether or not your window is visible. This also has the advantage of identifying when the user cannot see your user interface because it is obscured by another window, minimized, or offscreen."
Unfortunately, it doesn't work : I tried this calling the IsWindowVisible() method of CWindow (WTL) but it always return TRUE (window visible) even when workstation is locked .
I'll appreciate comments and suggestions.
Thanks in advace.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|
|
Instead of checking to see if the workstation is locked, why not check for keyboard inactivity and change the how your application "works" by that means?
Just a thought ...
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
|
|
|
|
|
And more a question. In add-in for Outlook it is possible to fill in field To in the new mail?
|
|
|
|
|
|
" this site " I know. He has not helped me, though I have understood.
|
|
|
|
|
Yes it is definetly possible to modify the subject line in the new mail. But somewhere you would have to place a string value to be displayed in the subject line using :
put_Subject(_com_util::ConvertStringToBSTR(stringtobedisplayed));
Does this solve your problem
p.s : You need to convert a string to bstr before doing this. So I have used _com_util::ConvertStringToBSTR()
Wishes.
Anshuman Dandekar
Dare to Dream,
Care to Achieve.............
|
|
|
|
|
First of all you have to take the object for mail item pointing to the new mail and then you can use:
put_Subject(_com_util::ConvertStringToBSTR("your subject line");
Cheers
|
|
|
|
|
I for a long time have already finished this project.
|
|
|
|
|
not only he does not look at the posts timestamps, but he didn't ever seen that he answered exactly the same thing as someone elso...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
Yes you are right. Sirs, read a forum more attentively.
|
|
|
|
|
Hello all. I develope add-in for MS Outlook. Add PropertyPage in "Parameters". But my page is cut of the right. Where error?
|
|
|
|
|
Can you give the detailed descriptio what you are trying to do..
SO that someone can figure it out.
Cheers
|
|
|
|
|
>>SO that someone can figure it out
No
Code:
void __stdcall CAddon::OnOptionsAddPages(IDispatch* Ctrl)<br />
{<br />
try{<br />
CComQIPtr<Outlook::PropertyPages> spPages(Ctrl);<br />
ATLASSERT(spPages);<br />
CComVariant varProgId(OLESTR("AtlAddon.PropPage"));<br />
CComBSTR bstrTitle(OLESTR("eTopping ATL addon settings"));<br />
HRESULT hr = spPages->Add((_variant_t)varProgId,(_bstr_t)bstrTitle);<br />
}<br />
catch(_com_error &e){<br />
CString szErr;<br />
szErr.Format(_T("[CAddon::OnOptionPageAdd]: COM exception: %s; SOURCE = %s\r\n"), e.ErrorMessage(),<br />
e.Source());<br />
pLogger.Loggit(szErr.GetBuffer());<br />
}<br />
}<br />
|
|
|
|
|
Hello, I have the same problem. ¿Can you tell me how do you resolve the problem?
|
|
|
|
|
Hi,
I'm trying to create an extended label control that will be used within Excel. It is ATL/WTL and subclasses the CStatic control.
My problem is that when the control gets added to a sheet using ActiveSheet.OLEObjects.Add it always seems to appear in design mode - ie. not activated. If I toggle design-mode the control then displays correctly.
Having debugged I notice that OnCreate does not get called until I toggle design-mode.. OnDraw does get called but I require a window handle which is not available at this point..
Am I missing some activation property/method or should I be creating my own window when I realise that one does not exist?
Thanks!
|
|
|
|
|
http://img11.imageshack.us/my.php?image=nicectrl8rq.jpg[^]
I love this control, and i really would need something like it to display variable properties for objects. Anyone know how to make one? Seems to be somekind of combo between combo box and editbox in the left column. Anyone know if anyone have done anything similiar and provided sample source somewhere? Im using wtl btw.
Thanks in advance!
|
|
|
|
|
Hi, I've written (using C++ VS6) a very simple ATL COM used by asp pages. The
COM has a static global variable g_counter of long type; then the COM exposes
an Object Pluto, with a method "Increment_g_Counter" that increments the
global variable g_counter and a property get_G_Counter that retrieves the
value of g_counter.
The question is: why, using OS W2k3 and IIS6 (running in iis 5.0 isolation
mode), after a few minutes, if no clients call the asp page, the g_counter
values is 0?
IIS6 seems to unload the atl com dll (the ExitInstance Method of the
CTestasp_comApp is called) after a few minutes; I say "seems" because if I
try to copy the com dll, the system tells me "the source or the destination
file may be in use".
I think that this behavior is due to the garbage collector of IIS6.
This is the com sample code:
CComModule _Module;
static long g_counter = 0;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Pluto, CPluto)
END_OBJECT_MAP()
class CTestasp_comApp : public CWinApp
{
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestasp_comApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
//{{AFX_MSG(CTestasp_comApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CTestasp_comApp, CWinApp)
//{{AFX_MSG_MAP(CTestasp_comApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CTestasp_comApp theApp;
BOOL CTestasp_comApp::InitInstance()
{
_Module.Init(ObjectMap, m_hInstance, &LIBID_TESTASP_COMLib);
FILE *fptrace = fopen( "f:\\giffile\\asptrace.txt", "a" );
if ( fptrace != NULL )
{
fprintf( fptrace, "InitInstance g_counter=%d\n", g_counter );
fclose( fptrace );
}
return CWinApp::InitInstance();
}
int CTestasp_comApp::ExitInstance()
{
FILE *fptrace = fopen( "f:\\giffile\\asptrace.txt", "a" );
if ( fptrace != NULL )
{
fprintf( fptrace, "ExitInstance g_counter=%d\n", g_counter );
fclose( fptrace );
}
_Module.Term();
return CWinApp::ExitInstance();
}
This the object code
class ATL_NO_VTABLE CPluto :
public CComObjectRootEx<ccomsinglethreadmodel>,
public CComCoClass<cpluto, &clsid_pluto="">,
public IDispatchImpl<ipluto, &iid_ipluto,="" &libid_testasp_comlib="">
{
public :
CPluto()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_PLUTO)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CPluto)
COM_INTERFACE_ENTRY(IPluto)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
// IPluto
public:
STDMETHOD(get_G_Counter)(/*[out, retval]*/ long *pVal);
STDMETHOD(Increment_g_Counter)(/*[out,retval]*/int *ok);
};
#endif //__PLUTO_H_
.cpp
STDMETHODIMP CPluto::Increment_g_Counter(int *ok)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
CSingleLock lock( &gLockManager, TRUE );
g_counter++;
lock.Unlock();
return S_OK;
}
STDMETHODIMP CPluto::get_G_Counter(long *pVal)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
*pVal = g_counter;
return S_OK;
}
This is the asp code
Dim value
Dim counter_object
Set counter_object = Server.CreateObject( "testasp_com.Pluto")
counter_object.Increment_g_Counter
value = counter_object.G_Counter
Response.Write "Value is" & value & " "
Set counter_object = Nothing
I need a behavior like iis5 that keeps COM global variables alive until an
iisreset command is sent.
Thanks for any help.
Max
Massimo B.
|
|
|
|
|
Periodically, IIS is calling CoFreeUnusedLibraries() to unload any in-proc servers that have a refcount of 0. This is standard good behavior for an app that uses COM objects.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Ok; this may be good for many applications; but suppose that (this is my real case) instead of a dummy variable long g_counter, you have a pointer to an object, (a map server) that "must" be always alive and "must" be persistent because it must remember and know its state; such behavior is not good.
So do you know if there is some way to disable this IIS's behavior?
Thanks a lot.
Max
Massimo B.
|
|
|
|
|
MaX B. wrote: know its state
Persist its state somewhere: session or application objects, database, etc.
|
|
|
|
|
Hello all, I have already posted this in the SQL board, but I didn't get any answer. I thought that perhaps this section would be more appropriate for this request. In any case, this is just to say that I am not spamming ...
I have been looking everywhere for a solution to this, but I couldn't find it.
I am trying to access a (generic) database using OLEDB Consumer Templates (of which I have little experience) in a WTL project (VC 2003, WTL 7.5).
Ok, the problem is that when I open a CCommand object passing a DBPropSet structure I get no rows in return.
Let me try to explain with the code..
With the following code everything works fine. I get columns and rows correctly (I removed a lot of stuff such as error handling, to simplify). The code it’s more or less the same used in the MSDN sample DBViewer:
<code>
CCommand<CManualAccessor> oCmd;
oCmd.Open(m_session, sSQL, NULL, &nRows, DBGUID_DEFAULT, FALSE)
if (oCmd.m_spRowset == NULL)
{
//ERROR STUFF
}
if (oCmd.GetColumnInfo(&ulColumns, &pColumnInfo, &pStrings) != S_OK)
ThrowOleDBError(oCmd.m_spRowset, IID_IColumnsInfo);
struct MYBIND* pBind = new MYBIND[ulColumns];
oCmd.CreateAccessor(ulColumns, &pBind[0], sizeof(MYBIND)*ulColumns);
for (ULONG l = 0; l < ulColumns; l++)
oCmd.AddBindEntry(l + 1, DBTYPE_STR, sizeof(TCHAR)*255, &pBind[l].szValue, NULL, &pBind[l].dwStatus);
oCmd.Bind();
ULONG ulFields = oCmd.GetColumnCount();
while(oCmd.MoveNext() == S_OK)
{
for (ULONG j = 1; j <= ulFields; j++)
{
lpszString = pBind[j-1].szValue;
// PRINTING STUFF
}
}
</code>
Now, if I add properties to the command using this:
<code>
CDBPropSet pset( DBPROPSET_ROWSET );
pset.AddProperty(DBPROP_IRowsetView, true);
pset.AddProperty(DBPROP_IRowsetScroll, true);
pset.AddProperty(DBPROP_IRowsetChange, true);
pset.AddProperty(DBPROP_UPDATABILITY,
DBPROPVAL_UP_INSERT | DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_DELETE);
pset.AddProperty( DBPROP_CANFETCHBACKWARDS, true, DBPROPOPTIONS_OPTIONAL );
pset.AddProperty( DBPROP_CANSCROLLBACKWARDS, true, DBPROPOPTIONS_OPTIONAL );
/*…*/
oCmd.Open(m_session, sSQL, &pset, &nRows, DBGUID_DEFAULT, FALSE, 1)
/*…*/
</code>
I get the columns shifted right (like if there is an empty column before all the others), and no records.
The m_spRowset member however it’s not null, as I check for it after the call to Open()
Can you please help me out, or at least tell me why this happens?
Thank you very much!
Guybrush Threepwood
|
|
|
|
|
Wow, is it really possible that nobody has an answer for this?
Sorry sorry, I don't mean to be arrogant... It's just that I was able to find two more requests like mine looking through forums and the usenet, and nobody got an answer either.
Is it just a very stupid error on my part? Is it a bug in the templates?
|
|
|
|
|