|
Thanks Walter..... have a look at the reply I shot Dave.
Pete
|
|
|
|
|
I am not sure about a console application.
In Windows the mouse pointer is called a ‘cursor’ and you can set the position by calling SetCursorPos(x,y). Note that if ClipCursor was used to limit its rectangular area of movement then it will remain in that area.
After setting its position you can post the button-down and button-up messages, in that order, to simulate a button press & release.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Thanks John,
Yep, got the cursor now moving all over the place using the Cursor->Position. I will now concentrate on the mouse clicking now.
Thanks again John.
Pete
|
|
|
|
|
You are welcome,
Just a thought that this may come in handy, if do not have the have the handle to the button and have the handle to the parent then you can call ChildWindowFromPoint to get it. I guess that if you know its coordinates then you already have the handle; anyway I thought I would pass that along.
John
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hi friends.. tis is M.V.Nair. I am now doing a program to track the URL(Internet) using MFC and to indicate it to the server in case if any unwanted website is accessed. First pls do tell me can we associate C++ with Internet? Pls do reply if anyone of you know tat friends!!
Malini
|
|
|
|
|
Malini Nair wrote: I am now doing a program to track the URL(Internet) using MFC
you need either knowledge of COM to implement the project or you have to hack through the different browser using FindWindow api to reterieve the website name
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Malini Nair wrote: using MFC and to indicate it to the server in case if any unwanted website is accessed.
This is best done at the router; anything you can do on the client side can be undone or usurped. The added benefit of doing it at the router is centralized logging.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi All,
As per our design my application should launch in the system startup itself.
and also my application require the privilegeg level as "requireAdministrator"
to function proper. So i added one manifest file and in that i mentioned the snippet below
<security>
<requestedprivileges>
<requestedexecutionlevel
level="requireAdministrator"
="" uiaccess="false">
with this everything is fine.
But the problem is that when the system restarts, My Application is geeting blocked,VISTA prompting "Windows has bloked some startup progrsms" this is not expected for my application.
how can i avoid this. i.e how can i start my application in system startup?
Please support me in fixing this problem?
Thanks in Adv,
Are
|
|
|
|
|
You can't, this is by design. Vista won't run an app at startup if running the app would result in a UAC prompt.
|
|
|
|
|
hi,
When I am trying to run the my dll and program use it in release mode it crashs on these lines:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()<br />
<br />
{ ASSERT(afxCurrentResourceHandle != NULL);
in AFXWIN1.inl header
What can be the cause for that ?
It functions perfectly in debug mode.
Thanks,
Ohad
|
|
|
|
|
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.
|
|
|
|
|
You should use the debug dll in Debug mode,and the Release dll in release mode.
|
|
|
|
|
This is what I am doing.....
|
|
|
|
|
Not sure though. I face registration problem in one of my COM dlls in release mode. I found that .rc was excluded accidenlty in release configuration. See, if simlar thing is happening to you.
In addition I recommend you to go through this[^] article.
|
|
|
|
|
I have only one .rc, he create two diffrent files for debug and release (.res).
|
|
|
|
|
prasad_som wrote:
In addition I recommend you to go through this[^] article.
hi,
Happy new year.. i am afraid, this article is no use here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: Happy new year
Thanks. Same to you.
ThatsAlok wrote: i am afraid, this article is no use here!
Atleast, should get idea, what problem may occurs in release, but not in debug build.
|
|
|
|
|
Ohad Cabiri wrote: When I am trying to run the my dll and program use it in release mode it crashs on these lines:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
in AFXWIN1.inl header
How... how you debugged a released mode dll
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: How... how you debugged a released mode dll
Possibly , using this[^] technique.
|
|
|
|
|
I have developed a program in which i created the window using HWND hwnd,createwindow(hwnd......
My program looks for usb drive device and if its found message is displayed.Now the problem is if i minimize the window and insert the usb drive i want the window to be maximized automatically like autoplay for usbdrive.How to go about this?How to maximize the window from taskbar?I tried setwindowpos, it works when we click the window.I want to maximize it from the task bar.Thanks in advance
|
|
|
|
|
Use ShowWindow .
ShowWindow(hWnd,SW_SHOWMAXIMIZED);
|
|
|
|
|
|
WhiteSky wrote: WM_SHOWWINDOW
hi Hamid,
Happy new year dude, sorry it is not advisable to post WM_SHOWWINDOW message, you have to either use SetWindowPos api or ShowWindow api.... same apply for WM_SIZE message
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
I know and when we can use of ShowWindow or SetWindowPos its better we use of them.I want to said also we have WM_SHOWWINDOW .
Thank you and for you but its early,New year is in April on my country
|
|
|
|
|
Anyone has something for me? I'm a beginner in Visual C++. And I want to learn the begin lessons. Anyone help?
If could, post a reply or simply send message to me at: thomasjohnsilver@gmail.com
Thanks in advance!
Noname
|
|
|
|