|
How's life, Alok? (Brahmma here... Changed the CP display name to my real name)
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
ffine buddy.. what abt you
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Me doing good, Alok. Thanks.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
The whole essence of an object is that it knows about itself. Add an IsValid() method to the class. When that method is invoked, the object can check the validity of each of its members.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
IsValid () is defined in which class of C++?
Thanks & Regards,
Suman
|
|
|
|
|
Did you miss the "Add an IsValid() method to the class" part?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, so you mean IsValid() is the user defined method?
I have doubt, can we check the object of CStringList is valid like if(object != NULL) ?
Thanks & Regards,
Suman
modified on Friday, February 15, 2008 11:51 AM
|
|
|
|
|
Hello everyone,
Could anyone post or let me know where is the definition of ITypeInfo please?
(my purpose is to find its inheritance relationship, i.e. whether inherits from IUnknown or something)
I searched all VC sub-directory and only get (in afxstat_.h),
struct ITypeInfo;
typedef ITypeInfo* LPTYPEINFO;
thanks in advance,
George
|
|
|
|
|
Oaidl.h ?
George_George wrote: where is the definition of ITypeInfo please
u mean declaration
George_George wrote: my purpose is to find its inheritance relationship, i.e. whether inherits from IUnknown or something)
yes it inherits from IUnknown
|
|
|
|
|
Thanks Rajkumar,
Cool, I have found it from Oaidl.h. I am interested that Oa is short for?
MIDL_INTERFACE("00020401-0000-0000-C000-000000000046")
ITypeInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetTypeAttr(
TYPEATTR **ppTypeAttr) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTypeComp(
ITypeComp **ppTComp) = 0;
virtual HRESULT STDMETHODCALLTYPE GetFuncDesc(
UINT index,
FUNCDESC **ppFuncDesc) = 0;
virtual HRESULT STDMETHODCALLTYPE GetVarDesc(
UINT index,
VARDESC **ppVarDesc) = 0;
virtual HRESULT STDMETHODCALLTYPE GetNames(
MEMBERID memid,
BSTR *rgBstrNames,
UINT cMaxNames,
UINT *pcNames) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRefTypeOfImplType(
UINT index,
HREFTYPE *pRefType) = 0;
virtual HRESULT STDMETHODCALLTYPE GetImplTypeFlags(
UINT index,
INT *pImplTypeFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(
LPOLESTR *rgszNames,
UINT cNames,
MEMBERID *pMemId) = 0;
virtual HRESULT STDMETHODCALLTYPE Invoke(
PVOID pvInstance,
MEMBERID memid,
WORD wFlags,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO *pExcepInfo,
UINT *puArgErr) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDocumentation(
MEMBERID memid,
BSTR *pBstrName,
BSTR *pBstrDocString,
DWORD *pdwHelpContext,
BSTR *pBstrHelpFile) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDllEntry(
MEMBERID memid,
INVOKEKIND invKind,
BSTR *pBstrDllName,
BSTR *pBstrName,
WORD *pwOrdinal) = 0;
virtual HRESULT STDMETHODCALLTYPE GetRefTypeInfo(
HREFTYPE hRefType,
ITypeInfo **ppTInfo) = 0;
virtual HRESULT STDMETHODCALLTYPE AddressOfMember(
MEMBERID memid,
INVOKEKIND invKind,
PVOID *ppv) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateInstance(
IUnknown *pUnkOuter,
REFIID riid,
PVOID *ppvObj) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMops(
MEMBERID memid,
BSTR *pBstrMops) = 0;
virtual HRESULT STDMETHODCALLTYPE GetContainingTypeLib(
ITypeLib **ppTLib,
UINT *pIndex) = 0;
virtual void STDMETHODCALLTYPE ReleaseTypeAttr(
TYPEATTR *pTypeAttr) = 0;
virtual void STDMETHODCALLTYPE ReleaseFuncDesc(
FUNCDESC *pFuncDesc) = 0;
virtual void STDMETHODCALLTYPE ReleaseVarDesc(
VARDESC *pVarDesc) = 0;
};
regards,
George
|
|
|
|
|
OA - OLE Automation, not sure
BTW, use bandwidth wisely. I don't think in this context posting code is necessary.
|
|
|
|
|
|
How to Display HTML strings in MFC ? Tried it with DHtmlEdit but is it possible to make it read only . My requirement is display a HTML string but they are not to be edited and i don't want to create a HTML file to use navigate () function of CWebBrowser. Did bit of R&D but with no result though.
|
|
|
|
|
So, what is HTML strings? Do you mean you'd like to display some HTML content?
|
|
|
|
|
HTML Strings mean, I create HTML Tags in the memory and doesn't want to create an HTML file to display them, I need to display them directly onto a browser and i failed to find out a way. Tried doing the same using WebBrowser2 ActiveX control but it required only Html File path as it's input in Navigate and also tried DHtmlEdit but i was able to edit the contents using it, which is not required
|
|
|
|
|
and thx for the help in advance
|
|
|
|
|
|
Thx... that might be useful...
|
|
|
|
|
|
Hi,
In My application,in view window i have made like this..
1.Index Page
2.Introduction
3.Summary..
Like this. And also i have shortcut keys for each page as shift-1,shift-2...
And also i can move to next page by using PageDown. And also i can press the second option(2.Introduction) by mouse and i directly move to the second page.
My actual problem...
If i use pagedown and move to next page (for eg:Introduction page)...Now if i press shift-1,it directly go to Index page.
If i use mouse and move to another page,and then if i press shift-1 it does not go to index page.I mean it does not go to OnKeyUp() function. Why this problem..
Actually i use Glg.dll for this view.
I didnot use on LButtonClick() for mouse action. glg.dll has function for this.
if( gpGView->glg_animation[SCHEPAGENO].m_hWnd )
{
gpGView->glg_animation[SCHEPAGENO].ShowWindow(SW_HIDE);
SCHEPAGENO = iPanNo - 1;
if(SCHEPAGENO -> giGraphicCnt)
SCHEPAGENO = giGraphicCnt;
}
gpVIew is my view class object.
SCHEPAGENO is page number.
Graphiccnt is total no of pages.
Anu
|
|
|
|
|
Are u using MFC SDI architecture?
U have a view class and u are creating three pages in that view. The View is the parent for the three pages. Am i right?
Plz give some more deatils regarding the application,
Prasanth M V
|
|
|
|
|
Hi to all,
i m working for Win ce 6.0 platform having VS 2005 as a platform builder and SDK as a language...
i m facing the problem regarding the settings of default keys
ie...
when i m creating any menu,then we are using the up down keys to check the pop up items and we are using the Enter key to select any item,
I want to use char keys instead of this keys like 'P','R'....
I hope i'll get the answer...
thnx in advance
Pankaj
|
|
|
|
|
hi
i have a application to encrypt and decrypt data .
it is perfectly working in system .
but when i connect the windows mobile with the system it is not working . any reason????????
i used Cryto Api algorithm
k.guru moorthy
modified on Friday, February 15, 2008 1:31 AM
|
|
|
|
|
guru moorthy.k wrote: not working
What does "not working" mean
|
|
|
|
|
Hi guys. I am trying to implement multithreading in a network oriented program. I had a problem when the server would crash when more than one client application connected to it. Thats why i decided to multithread. Now with the threads the client application keeps on saying that the server is not started when i try to connect after catching "WSAECONNREFUSED".
Before i put the threads the program was working just fine only the server crashing problem so i belive it is the server app that has a problem. Below is the code for the worker thread:
//My listening connection
void CServerSocketDlg::OnListen()
{
THREADVALS * pTv = new THREADVALS;// this structure is declared in my .h
AfxBeginThread(AcceptConnection,pTv);
}
UINT AcceptConnection(LPVOID pParam)
{
THREADVALS * pTv = new THREADVALS;
pTv->m_sServerSocket.Listen();
pTv->m_sServerSocket.Accept(pTv->m_sClientSocket);
return 0;
}
//The structure in my .h
typedef struct ACCEPT
{
CMySocket m_sServerSocket,m_sClientSocket;
}THREADVALS;
//Other necessary code in my .h
UINT AcceptConnection(LPVOID pParam);
void Listen();
I have no syntax error it is just refusing to work i dont know why. Please help.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|