|
Can I accelerate the mouse pointer more than the applet in the control panel allows me to?
Thanks!
modified 9-Mar-17 17:10pm.
|
|
|
|
|
I'm not sure if there is a function to do what you want, but you can do it programaticaly. Use the GetMouseMovePointsEx() function to get a history of the mouse coordinates, this will tell you the direction in which the mouse is moving, calculate a new position, then use the mouse_event() function to set the new position.
|
|
|
|
|
Hi, I´m new here and im self learning vc++ and mfc programming, add to this that I´m spanish speaking native, so please excuse my english, I will do my best so you all can understand me.
Well, what I´m doing in resume is this :
I have a CDialog logon screen in my program, where the user enter his password and username.
So I need to save the user and update the Main window with who just logged in. By the way, I´m working in a Dialog Based App.
So in my class RegisterApp : public CWinApp I do this :
class RegisterApp : public CWinApp
{
public:
RegisterApp();
CString sActiveUser;
.
.
I Initialize it :
RegisterApp::RegisterApp()
{
sActiveUser = "No user logged";
}
Then at my RegisterAppView::OnPaint() I show before the login that there´s no user:
I can see it well at the Main window that is at the background, and at front "OnTop" I got the little logon window.
RegisterApp* pApp;
pApp = (RegisterApp*)AfxGetApp();
dc.TextOut(105,60,"Usuario activo : " + pApp->sActiveUser);
I don´t know if this is the best way, but it works and shows what I want at this moment "No user logged" .
Now, when the user logs in I do this :
bool CDlgLogon::FiltraDatos()
{
RegisterApp* pApp;
pApp = (RegisterApp*)AfxGetApp();
CString sIdUsuario;
GetDlgItemText(IDC_EDTLOGONUSER, sIdUsuario);
.
.
.
pApp->sActiveUser = sIdUsuario;
.
.
}
Ok, I´ve just updated sActiveUser, I got the user in a var out of the logon dialog function, So I think I will not loose it(I´m right?), but now I need to update the Main Window with this value, in graphical mode using dc.TextOut...
Is correct that I should call the RegisterAppView::OnPaint() method again to show the actual user?. If it is, How do I do that from my dialog?
Is this the correct way to do this?
thanks in advance
Jarley
"Don't panic!. All will become clear in time"
|
|
|
|
|
In your code, what I understand is, you want to update main window(which shows user related stuff), once user logs in.
OnPaint as you mentioned in right place to draw that stuff.
But again you have mentioned RegisterAppView class.
Can you tell what's it's base class, how it is related to logon dialog?
|
|
|
|
|
It´s not related, just that in this class is where i do all my drawing stuff
and the first time i write the user at the main window, I do it from this class.
class CRegisterAppView : public CScrollView
{
protected:
CRegisterAppView();
DECLARE_DYNCREATE(CRegisterAppView)
.
.
.
}
thanks
|
|
|
|
|
jarleydg wrote: class CRegisterAppView : public CScrollView
Oh !, you mentioned application in dialog based, isn't it?
How come you got a view class.
This application supports doc/view, is it?
|
|
|
|
|
Yes, is dialog based and I have doc/view classes too.
The wizard created me a View class, and i read that there
I should do my drawings, I´m going by the book...
Hope it isn´t wrong :S ...
I just realize that when I logon the user and then resize the main window
manually, the new user is displayed correctly. It works
but how do I call that ::OnPaint method in my View Class from the logon dialog
when I press Ok? That´s what i don´t know to do...
thank´s
|
|
|
|
|
Ok,Its because, its causing OnPain to call.
when you want to modify window use this code,
((CFrameWnd*)AfxGetMainWnd())->GetActiveDocument()->UpdateAllViews(NULL);
|
|
|
|
|
It works now!!
thanks a lot for your help
|
|
|
|
|
Hi,
I need a component working with VC++/MFC to plot 2D graphs. It should ideally be able to deal with real-time plotting (incremental datafeed, scrolling, dynamic scale... things like that).
Can you suggest a good project doing this ?
Thanks
|
|
|
|
|
Take a look at my sig, I developped a charting control that seems well adapted to what you are looking for.
|
|
|
|
|
Hi Cédric,
I already had a look at your project and even tryed it. The design is great for static data display but unfortunately it lacks real time (dynamic) plotting management features which makes it difficult for me to use as it is.
For instance I would need to use the component as a scrolling scope but your component doesn't have the ability to remove and add some samples to the display without having to redraw all samples. This is not acceptable for me because I can have lots of samples and performance is critical.
Thanks
|
|
|
|
|
hi everybody
in my project when cousor move on button then image of cusor will display differently .
please kindly help me in my project.
#sanroop#
|
|
|
|
|
Two possibilities:
Derive your button control, in its OnCursor, call SetCursor with your cursor image as parameter, and DO NOT call the base class ine the overriden function.
_or_
In the OnMouseMove from the application that uses the button, check if the mouse cursor is inside the button (with a hittest for instance) and change the cursor (e.g. set a member variable to your cursor image, override OnSetCursor, etc...)
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
hi all, i m trying to associate F2 key in my code. I've used OnKeyDown on my dialog which has a listcontrol, but the function is never called. i hv also included ON_WM_KEYDOWN in the msg map still not working. the functions OnLvnBeginEditList and OnLvnEndlabeleditList work fine for the control..
can neone help
|
|
|
|
|
See here[^] if its good for you
|
|
|
|
|
WhiteSky wrote: See here[^] if its good for you
hotkey wouldn't be great idea here! better she use accelerator!
"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
|
|
|
|
|
Hi all,
I get an annoying and unimportant linker warning i wish to disable...
puting the '/IGNORE:WARNING NUMBER' in the project settings-->linker-->command lines, didn't help me...
can any1 help?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: I get an annoying and unimportant linker warning i wish to disable...
puting the '/IGNORE:WARNING NUMBER' in the project settings-->linker-->command lines, didn't help me...
#pragma warning (disable:4100) // 4100 is the warning number
|
|
|
|
|
the pragma directive removes the compiler warning not the linker warning (an error i get during linking)!!!
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Which warning are you trying to get rid of?
Try this in the top of the header file
#pragma warning (disable:4786)
|
|
|
|
|
the pragma directive removes the compiler warning not the linker warning (an error i get during linking)!!!
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: unimportant linker warning
There is no such thing as an unimportant warning. Should there be, there is always a better solution than disabling it.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Hi,
How can I get content (text) from “RichEdit20W” class. I want to use text from “RichEdit20W” class control of office word in my application in VC++.NET. Waiting for reply. Thanks
Priyank
|
|
|
|
|
Hello
Can anyone tell me how to calulate number of bytes on the disk for given folder?(Folder size)
|
|
|
|