|
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 ....
|
|
|
|
|
please read and understand the question before replying
|
|
|
|
|
Chandrasekharanp wrote: how do i stop the dialog from closing when u hit the escape button?
It depends heavily on how far are you from my computer.
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
|
|
|
|
|
that was a good PJ. but the context was different guru...
|
|
|
|
|
You can override Oncancel for Esc and OnOk for Enter.
|
|
|
|
|
i want to build a project to intercept all the communication data between any program and the CDROM.
But i have no idea for that? Any advice will be appreciated.
Regards.
|
|
|
|