|
Cool, CPallini!
I have tried, you are correct!
regards,
George
|
|
|
|
|
|
Good resource, Steve!
Unfortunately, in current project, I have to use MSVC, and it does not support shared_ptr.
regards,
George
|
|
|
|
|
As you have already discovered auto_ptr is not designed to work as an array of pointers. There are multiple solutions to your problem and they are described in the below links.
http://www.codeproject.com/KB/cpp/COAP.aspx[^]
http://www.gotw.ca/gotw/042.htm[^]
If you are just interested finding out how auto_ptr can be used with an array then above links are suffice.
but in real use, you might want to take a look at the boost smart pointer library. you can also use the shared_ptr as it is designed to work with STL containers.
Ankita
|
|
|
|
|
Hi Ankita,
I have not made myself understood. My question is (say in another way), how to define an array of auto_ptr and initialization at the same time of definition? Any ideas?
regards,
George
|
|
|
|
|
Hi
I have created a ocx control in vc++.
The control is used in ASP.net.
Now the project is modified for Internationalization.
So I have to change the tooltips and other text.
for that what modification i need to do?
|
|
|
|
|
Follow This Link[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think, I can expose property for each string.
then whatever the value in that property will get displayed.
can someone suggest whether my assumption is correct or not?
|
|
|
|
|
Hi,
Here is the code.
HWND hwndCalc;<br />
hwndCalc = ::FindWindowEx(NULL, NULL, _T("SciCalc"),_T("")); <br />
DWORD dwerr = GetLastError();
I'm unable to understand why FindWindowEx is returning null handle although GetLastError() is returning 0 i.e. successful
Please check the document of FindWindowEx
http://msdn2.microsoft.com/en-us/library/ms633500(VS.85).aspx[^]
Regards,
Mushq
|
|
|
|
|
Because FindWindowEx is successfully finding no window matching your criteria?
You're looking for any window that is a child of the desktop, with a window class name of SciCalc .
It's worth verifying using spy++ that that is actually true. Or is the window text for that window scicalc, and the class is some other name?
(and just to be clear, this is class as in RegisterClass , not as in class CMyWindow ...)
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Thanks for the quick reply.
Iain Clarke wrote: Because FindWindowEx is successfully finding no window matching your criteria?
I don't think so, if this happens then GetLastError() function returns 2(The system cannot find the file specified.)
Iain Clarke wrote: You're looking for any window that is a child of the desktop, with a window class name of SciCalc.
Yes exactly and that window is "Calculator window".
Iain Clarke wrote: It's worth verifying using spy++ that that is actually true.
I have verified that "Calculator window" is a child of desktop window in spy++.
Regards,
Mushq
|
|
|
|
|
I just ran calculator, and use the following code snippet:
HWND hWndFind = FindWindowEx (NULL, NULL, _T("SciCalc"), NULL);
if (hWndFind)
{
TCHAR buf [1001];
::GetWindowText (hWndFind, buf, 1000);
}
and it worked a treat. The text said "Calculator" as expected. So I'm not sure what's wrong for you.
Do you have multiple monitors? I'd doubt this should be a problem, but I'm stabbing in the dark now. Terminal services? Other user logged on? Etc.
I did my test under XP.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Iain Clarke wrote: Do you have multiple monitors? I'd doubt this should be a problem, but I'm stabbing in the dark now. Terminal services? Other user logged on? Etc.
I did my test under XP.
Nothing of the above.
He simply has _T("") as last parameter.
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
|
|
|
|
|
Thank you very much.
I got the point; actually I was passing incorrect value for 4th parameter of FindWindowEx function.
Again thanks a lot.
Regards,
Mushq
|
|
|
|
|
Iain Clarke wrote: TCHAR buf [1001];
::GetWindowText (hWndFind, buf, 1000);
After all, why should we trust GetWindowText ?
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
|
|
|
|
|
I'd already looked up *one* function today... Remembering whether the length included the end NUL (even though I was 99% sure it did) was too much to expect!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
How can I change the config of Windows services with a MFC program??
|
|
|
|
|
MFC doesn't have any support that I'm aware of - but that doesn't stop you from using the good ol' win32 api.
Use OpenSCManager to connect to, um, the service control manager.
Then OpenService , ChangeServiceConfig and ChangeServiceConfig2 to make any changes to a specific service.
I hope that gave you a start. Sometimes it's hard to just find the function names!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Is there CList type class or programme in SDK(without using MFC)
Trioum
|
|
|
|
|
In SDK? No.
But you can use the STL library, and there's lots of classes there to help you.
vector, list, dequeue, etc. They're raw c++, so not chunky DLL to link to. [*]
Iain.
[*] I know you link with a lib... sheesh, you guys are so picky!
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Fortunately CList is confined inside MFC realm .
You can use std::list [^] instead.
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
|
|
|
|
|
|
how do i stop the dialog from closing when u hit the escape button?
|
|
|
|
|
|
yea..its working fine here..?wen i give Esc button that dialog box was dissappered ....
|
|
|
|