|
Where do I define my global object and I suppose the global object is to be created out of the class MyClassModule. Is it the application.cpp file?
Also how do I call methods like _Module.GetModuleInstance (), _Module.GetResourceInstance ()) on the new global object.
|
|
|
|
|
i have added a tol bar to the outlook
when i click to create new message tab in outlook a page open with a button i placed on that.by clicking that button a tool bar opens. i want that when i open this on one page and then open a new mail message page then this will not show on that new page anyone know any method reagarding this
|
|
|
|
|
Hi All,
I have some queries regarding font.
Q1. What is exactly a 'Bitmap Type Font', 'TrueType Font'?
Q2. Difference between the two.
Q3. Difference between 16-bit version and 32- version of a Font?
q4. How can we identity whether a font is 16-bit version or 32-bit?
Anwsers to any of the above will be great help for me.
Thanks in advance
Suraj
Suraj Gupta
|
|
|
|
|
I have something like this:
class SomeClass
{
...
template <typename _Iter>
void SomeFunction(_Iter begin, _Iter end)
{
...
}
}
and I want to specialize de template when I use vector::Iterator. I try this:
class SomeClass
{
...
template <typename _Iter>
void SomeFunction(_Iter begin, _Iter end)
{
...
}
template<class T>
void SomeFunction(typename std::vector<T>::iterator begin, typename std::vector<t>::iterator end)
{
...
}
}
The source (under Visual 2005) complies without errors nor warnings. When I try to use that specialization (something like this):
...
vector<midata> data;
myclass.SomeFunction(data.begin(), data.end());
the program calls the first one instead of the second (as I expected).
Is it possible to program that specialization? How?
Thank you in advance
jab
www.virtuamanager.com
|
|
|
|
|
Hello Juan,
The overload you're proposing (it's an overload, not a specialization) is illegal because std::vector<T>::iterator is not what the standard calls a proper deduced context. An example will help clarify why the language cannot accept contexts of the form a<T>::b where T is a template parameter. Consider the following:
template<typename T>
struct foo
{
typedef void * type;
type a;
};
template<typename T>
void f(typename foo<T>::type a){...}
int main()
{
foo<int> x;
f(x.a);
} Do you see why this cannot work? Although it seems like the call f(x.a) should deduce T to be int , in reality it is impossible to make this deduction, as foo<T>::type is void * for every T .
In your particular case, you might want to replace this overload (which can't work for the reasons explained) with some machinery to dispatch SomeFunction based on the category of the iterator (bidirectional, random-access, etc.) If you need help with this feel free to ask.
Hope this helps,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Thank you so much, your example clarify me a lot. I'll try what you sugest.
jab
www.virtuamanager.com
|
|
|
|
|
Juan Antonio Bermejo wrote: template<class t="">
void SomeFunction(typename std::vector<t>::iterator begin, typename std::vector::iterator end)
{
...
}
You are trying to specialize a templated fuction with another template. If you changed it to specify explicitly which case you wanted:
void SomeFunction(typename std::vector<int>::iterator begin, typename std::vector::iterator end)
{
...
}
It might behave a bit better (using whatever type you actually want instead of int there).
Also, you may have to specify the type on the call:
myclass.SomeFunction<vector<int>::iterator>(data.begin(), data.end());
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I have a project which I'm moving to VC2005 by moving the old code from VC6 into the new framework that is provided.
In doing so, at one point where I found the usage of _Module(CComModule _Module) I came to conclusion that the functionality has been distributed under various classes.
Please let me know the substitute for CComModule _Module that i can use in the code that is to be used in VS2005 or else I can still use CComModule on which my old fucntions rely upon.
I read the documentation on the link
http://msdn2.microsoft.com/en-us/library/79kd7a00%28VS.80%29.aspx
, and
|
|
|
|
|
i am on a project with windows and unix machines need to networked.
when parellel threads are running the unix machine doent informed the sockets of finished threads are closed. only after all the threads are finished then only the machine treats the sockets as closed .is socket is blocking one or a non blocking one.
vineesh
|
|
|
|
|
Please don't cross post.
led mike
|
|
|
|
|
I wonder if there's a way to block cross posting?
Chris Meech
I am Canadian. [heard in a local bar]
I agree with you that my argument is useless. [Red Stateler]
Hey, I am part of a special bread, we are called smart people [Captain See Sharp]
The zen of the soapbox is hard to attain...[Jörgen Sigvardsson]
I wish I could remember what it was like to only have a short term memory.[David Kentley]
|
|
|
|
|
You can do that by going to the offenders house, and break his or her keyboard over your knee. To be absolutely sure, stomp on his or her mouse as well (if they're smart enough to activate the on screen keyboard and/or copy/paste messages).
--
From the network that brought you "The Simpsons"
|
|
|
|
|
i need a help pls tell me how can i handle the pss_thru in hyper threding
vineesh
|
|
|
|
|
tom groezer wrote: I wanted to know whether _AtlModule is the substitute of _Module.
They hide that information in the documentation[^]
led mike
|
|
|
|
|
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
|
|
|
|