|
AWSOMENESS!!!PERFECT. I got it now. Adam Maras I am forever your servant.
Thanks All for your help
|
|
|
|
|
Hi,
Is the only way to override members of a Base Class (and get to thier private members)
Is by having them declared Virtual ???
|
|
|
|
|
ForNow wrote: (and get to thier private members)
You must be kidding. Otherwise time to take up the book . Hint: You need a friend.
(the David Crow way!)
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
ForNow wrote: Is the only way to override members of a Base Class (and get to thier private members)
You can't get to a base class's private members from a derived class through overridden methods, whether they're virtual or not. A derived class can see public and protected members of its base class(es).
And you should also question why you're wanting to get at the base class's private members - either the base class is designed wrong or you're going the wrong way about things.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I am refering to the following Article wwww.codeproject.com/KB/threads/extended_thread.aspx
The Author is refering to A Contructer of CWinThread which is not documented in MSDN instead is in the thrdcore.h
In the artice he intilizes private memebers of CWinThead namely m_pThreadParams
m_pThreadParams = this;
class CWinThread : public CCmdTarget {
public:
CWinThread();
CWinThread(AFX_THREADPROC pfnThreadProc, LPVOID pParam); <---- Constructer
BOOL CreateThread(DWORD dwCreateFlags = 0, UINT nStackSize = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);
virtual BOOL InitInstance();
virtual int Run();
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual BOOL PumpMessage(); // low level message pump
virtual BOOL OnIdle(LONG lCount); //return TRUE if more idle processing
virtual BOOL IsIdleMessage(MSG* pMsg); //checks for special messages
private:
LPVOID m_pThreadParams; //generic parameters passed to starting function
AFX_THREADPROC m_pfnThreadProc;
HANDLE m_hThread; // this thread's HANDLE
}
|
|
|
|
|
ForNow wrote: The Author is refering to A Contructer of CWinThread which is not documented in MSDN instead is in the thrdcore.h
In the artice he intilizes private memebers of CWinThead namely m_pThreadParams
m_pThreadParams = this;
Well, see, here's the thing - m_pThreadParams is public (yes, PUBLIC) in the MFC I've got.
Have you got some counterfeit MFC or something?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I picked up the layout from a PPT presentation by Konstantin Bukin entitled more threads guess there is a lot of errorous documentation out there
|
|
|
|
|
ForNow wrote: I picked up the layout from a PPT presentation .. guess there is a lot of errorous documentation
Yeah, the code tends to be the most authoritative source.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
It's the time to read some good C++ book.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Ok, so I've followed these steps to the T: http://www.microsoft.com/express/2005/platformsdk/default.aspx
I'm able to see the option to create the DLL, but after I start a new project and compile it, the project is unable to find the 'windows.h' file(s).
Am I not pointing the IDE to the right location?
Here's what I have for my VCProjectEngine.Dll.Express.Config file. The "Larrow" and "Rarrow" are the left and right braces around the XML tags:
Larrow ?xml version="1.0" encoding="utf-8"? Rarrow
Larrow VCPlatformConfigurationFile
Version="8.00"
Rarrow
Larrow Platform
Name="VCProjectEngine.dll"
Identifier="Win32"
Rarrow
Larrow Directories
Include="$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include;$C:\Program Files\Microsoft SDKs\Windows\v6.1\Include"
Library="$(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib;$C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib"
Path="$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(PATH);$C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
Reference="$(FrameworkDir)$(FrameworkVersion)"
Source="$(VCInstallDir)crt\src"
/Rarrow
Larrow /Platform Rarrow
Larrow /VCPlatformConfigurationFile Rarrow
Anything wrong here? Maybe another step not being followed correctly?
Thanks
|
|
|
|
|
windows.h will be in the Windows SDK include folder, which is the "$C:\Program Files\Microsoft SDKs\Windows\v6.1\Include" part of the include path.
Is the $ sign really in that bit of the include path, 'cause it looks wrong to me. If that solves your problem, then you'll also want to remove the $ signs in the equivalent parts of the Library and Path environment variables.
Also - does that folder (C:\Program Files\Microsoft SDKs\Windows\v6.1\Include) actually exist?
BTW - my install of VS2005 has $(VCInstallDir)PlatformSDK\include - I guess you've installed a new Platfrom SDK version and asked it to integrate with Visual Studio?
|
|
|
|
|
Cool! I've removed the dollar signs.
Thank You!
|
|
|
|
|
Hello all,
I have a derived CWnd control which I use as a container. I want the user to tab between child controls therefore I am setting the WS_EX_CONTROLPARENT. If I do that set, the application freezes as soon as the application loses focus... any idea why?
Thanks in advance!
Jerry
|
|
|
|
|
|
Hi,
Any API's in C++ or VC++ that will help me to fetch the configuration properties of the IIS. I'm looking for fetching the Root path and the Virtual directory path information.
Regards,
Mayur M
|
|
|
|
|
mayur8u wrote: the configuration properties of the IIS
"the IIS"? Really? There's only one installation of IIS in the entire universe? I'm pretty sure I have more than one right here in my own office, let me check... yes indeed I have two right here. Well given that reality I suppose we need some slightly more specific information from you in order to help. For the moment we will pretend that you not already realizing this, is a sign that you are attempting something beyond your current knowledge base. But hey, that never stops any of the hundreds of others we see copy/pasting their way around the internet.
|
|
|
|
|
Having a rough day, Mike?
and / or
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hey a rose beer, I never had one yet! I'll have to get me one[^] now.
|
|
|
|
|
Hi Guys,
I need some helps,
I have a variable ver of Cstring Type
CString ver;
how would I print this ? and I want to compare it with a string with wchar_t*, its some think like
wchar_t* ver2;
can any body please suggest me how to do this. May be this is a silly question but I don't have much idea on CPP. .
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Abhijit Jana wrote: I have a variable ver of Cstring Type
CString ver;
how would I print this ?
cout << ver; Abhijit Jana wrote: and I want to compare it with a string with wchar_t*, its some think like
wchar_t* ver2;
Have you tried:
if (ver == ver2)
...
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
David, Thanks for response. I found the problem. This C++ Exe is used to call my .net web service from client machine. So it was quite difficult to debug. But finally I have found the problem, it was with some return value. and solved .
Again thanks.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
CString defined lots of constructors such as CString(LPCWSTR lpsz) & CString(LPCWSTR lpch, int nLength);
CString ver;
wchar_t* ver2;
...
CString ver3(ver2);
if(ver==ver3){
...
}else{
...
}
|
|
|
|
|
May i know how can i create a custom list control........
|
|
|
|
|
You should ask a bit more precisely...give some more details about what you want to do.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Are you referring to the LVS_OWNERDRAWFIXED style?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|