|
Thanks!
A little irritating that you need to subclass to just change the color.
Again - Thanks!!
_____________________________
...and justice for all
APe
|
|
|
|
|
That's right, but the "normal" way didn't work for me. It changed the font, but not the color and the background appeared white even though i set it to transparent.
MS
|
|
|
|
|
I Want to create a popup window at my dialog based program,could you tell me how?
Could I register a new window class for it?
If no necessary,how can I get the lpClassName which is used at the follow function ?
HWND CreateWindowEx(
DWORD dwExStyle,
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);
Thanks!
free like a bird
|
|
|
|
|
CString sClassName = AfxRegisterWndClass (CS_HREDRAW|CS_VREDRAW);
now use sClassName
There is no spoon.
mail
|
|
|
|
|
lpClassName is either an existing class name
e.g.
Button, Edit, SysTreeView32, ...
or a class that you registered via RegisterClassEx().
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello everybody,
I want to paint something outside my app.
like a multimedia keyboard:
when I increase or decrease the volume something
appears on screen.
best wishes.
thanks
|
|
|
|
|
Use GetDesktopWindow() API to get Handle to Desktop Window, Then create a DC with this handle and enjoy
Imagine that you are creating a fabric of human destiny with the object of making men happy in the end, giving them peace and rest at last, but that it was essential and inevitable to torture to death only one tiny creature..and to found that edifice on its unavenged tears, would you consent to be the architect on those conditions? Tell me, and tell me the truth!
-Fyodor Dostoevsky, The Brothers Karamazov
|
|
|
|
|
Dear friends,
I try to develop a program which can hook into IE (toolbar buttons and/or menu items in IE window) to get all text in all text fields in a HTML page being displayed by IE. This will perform when user click on the toolbar button or menu item.
I don't know how to start and from where to begin. Could you please help me on this and thanks in advanced.
|
|
|
|
|
You will have to write a BHO(Browser Helper Object).
You can start from here[^]msdn
Also look for BHO samples here in codeproject also.
There is no spoon.
mail
|
|
|
|
|
Thank you suhredayan very much for your kind help. I'm searching in codeproject for the sample code.
I will go back to this topic if there are some confusion to me and need your help again.
Once again, thank you.
|
|
|
|
|
you are welcome TPN.
There is no spoon.
mail
|
|
|
|
|
Hi!
I’m creating an ActiveX control in my myapp.aspx-page using the <object> - tag.
<br />
<OBJECT id="objComp" style="Z-INDEX: 101; LEFT: 24px; WIDTH: 974px; POSITION: absolute; TOP: 40px; HEIGHT: 538px"<br />
</OBJECT><br />
At this time I’m only using the ActiveX technology to publish my MFC application on the net. I’m about to make a call to may webpage like this:
http://www.mypage.com/myapp.aspx?user=bill&password=12345
How may I pass the “user” and the “password” into my ActiveX?
Can I how do I access the properties of my ActiveX from my page?
The ActiveX is supposed to run on the client – not on the server.
_____________________________
...and justice for all
APe
|
|
|
|
|
hi
ya its for sure that ActiveX runs on client side
you can access methods as well as properties exposed by your control from your page
e.g. if your control exposes a method like SetUseridPassword(BSTR usrID,BSR password) then you can access it as follows
<OBJECT
ID="MyActiveXID"
CLASSID="clsid:your-control-class-id-here"
CODEBASE="TestAX.ocx"
TYPE="application/x-oleobject"
>
then on any event (like button's onClick) call the following following function like onClick='InitValues'
don't forget to define this script in head section of your page.
<script language="JavaScript">
function InitValues()
{
MyActiveXID.SetUseridPassword("testusr","tstpassword")
}
</script>
Muhammad Azam
|
|
|
|
|
It really looks like you have the solution of my problem. I try to implement it with javascript.
THANKS!
_____________________________
...and justice for all
APe
|
|
|
|
|
hi
its my pleasure if i could be of any help for you
regards
Azam
|
|
|
|
|
Hi All,
I used SuspendThread and ExitInstance to stop a thread created using AfxBeginThread Function. But in some newsgroup messages it is stated that this is not the right method. I've used PostThreadMessage using WM_QUIT, but this is not working. So How to stop a thread created using AfxBeginThread function.
Thanx in Advance
Sujan
|
|
|
|
|
To use PostThreadMessage it should be a UI Thread with message loop. Wot kind of thread you created worker thread or UI thread ?
There is no spoon.
mail
|
|
|
|
|
Hi suhredayan,
Thanx for your reply.
It's a worker thread. TerminateThread is working but i am using critical
section for data handling, so MSDN states that it is a DANGEROUS function. Think that i must have to use waitforsingleobject().
Sujan
|
|
|
|
|
The thread must finish execution on its own based on some condition. Use WaitForSingleObject or WaitForMultipleObjects if you got wait for some signal and u can also give time. There are other methods also that can be used to stop execution like signalling a flag etc.
|
|
|
|
|
Hi Dubey,
Thanx 4 ur reply.I'll try to implement it using waitformultipleobjects.
Sujan
|
|
|
|
|
|
Hi
Thanx for the link i'll look into it
Sujan
|
|
|
|
|
You could create a shutdown event to stop the worker thread execution.
Here's an example how to do it:
int CYourThreadClass::ThreadFunction()
{
while(1)
{
HANDLE h[2];
h[0] = m_eventShutdown.m_hObject;
h[1] = another handle;
DWORD dwRet = ::WaitForMultipleObjects(2,h,FALSE,YOURTIMEOUT)
if(dwRet==WAIT_OBJECT_0)
return 0;
else if(dwRet==WAIT_OBJECT_1)
else if(dwRet==WAIT_TIMEOUT)
else if(dwRet==WAIT_FAILED)
}
}
|
|
|
|
|
Hi Markowski
Thanx a lot. I am working with it.
Sujan
|
|
|
|
|
Hi Andrzej
One silly question. Sorry. How to manage with WAIT_OBJECT_1.Instead shall i use the created thread handle. I used it and it is always getting into that "Wait Timeout" state. OR have to create another event.
Thanx in advance
Sujan
|
|
|
|