Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Reducing the size of the Dialog bar on mouse event

Hi,
  I have created a VC++ MDI application which creates and opens a dialog bar on the start. Since the dialog bar takes much of the work area, I want it to reduce in its size as the user moves the mouse pointer away from its boundary. And its size regained when the mouse pointer moves into the small resized area of the dialog bar

Could anybody help me with the code if its possible?

Waiting eagerly for a response
Thanks in advance
Regards
Shilpa
0
Shilpa
Asked:
Shilpa
  • 5
  • 5
  • 4
  • +1
1 Solution
 
DanRollinsCommented:
You must handle WM_MOUSEMOVE.  Record the time of the most recent mouse move in m_dwTimeLastMouseMove.  You must maintain a state variable m_fIsBig.  If you get a WM_MOUSEMOVE and m_fIsBig is FALSE, then you need resize the dialig bar and make m_fIsBig TRUE.  

You need to have a timer fire every 1/2 second.  The timer fn checks to see if the most recent mouse move occurred more than 1 second ago.  If so, then resize the dialog bar to small, and set m_fIsBig to FALSE.

I think that you won't find any pre-existing code that does this because it is a novel, albeit interesting, UI idea.  You will need to write some code and try it out, then adjust your code as you run into real-world complications.  For instance, you can't have the dialog bar get small just becasue the mosue stopped moving if the user is typing something into an edit box.

-- Dan
0
 
BerCommented:
Dan I tried this out and the mouse move event seems to be captured by the CView(or whatever class is handling the view) class and this only fires the mouse move event when the mouse moves over th MDIchild, any Ideas on how to Get the mouse move event for the frame window to fire ,I tried to add a simple mouse click event to the Frame wnd and this wont even fire ...???

Cheers...
Ber...
0
 
DanRollinsCommented:
Hi Ber,
I'm glad that you tried that.  Perhaps Shilpa would care to comment.

-- Dan
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
MoondancerCommented:
Shilpa has requested a refund for this.  Cut/paste from the CS request:

Hi,
 I would like to request u to delete my question posted under the MFC topic area, and my points redeemed,
since I hav not received a satisfactory answer from any experts. The URL of the question is
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mfc&qid=20291952.

Thanks

Regards
Shilpa

Moondancer - EE Moderator
0
 
BerCommented:
some feedback would have been nice
0
 
DanRollinsCommented:
Moondancer,
It appears that Shilpa and Ber may be the same person.  At least Ber is posting responses that one might expect the original questioner to post.

-- Dan
0
 
MoondancerCommented:
Thank you.
Shilpa - Ber .... researching.
0
 
MoondancerCommented:
Shilpa and Ber, can you please clarify thing for me here? More than one account is not within Guidelines here.  I have done some preliminary research here and sent them to Administration.  Your insights here are appreciated in this regard since the flow of events here sure appears to indicate more than one account.
Thanks,
Moondancer - EE Moderator
0
 
ShilpaAuthor Commented:
Hi Dan Rollins,
    ur speculation abt Ber and me being the same person...has turned out a little tooo expensive for me. I hav already answered two mails about my authentication. I cannot prove myself beyond that, but I can only say that if at all my account is closed by the experts-exchange people, I will always remember ur name.
I wudn't like to be harsh but I only want to request you, not to shower ur speculative stamtements as comments and make lives of some genuine learners like me inconvenient.
Forgive me if I hav sounded too rude

Thanks

Shilpa
0
 
DanRollinsCommented:
>>answered two mails about my authentication
One email addressed to to Ber and one to Shilpa?

>>...if at all my account is closed by the experts-exchange people, I will always remember ur name.

Threatening me is hardly likely to put you in the good graces of the poeple who enforce these things.

=-=-=-=-=-=-
Anyway, why are you deleting this Q?  I provided some excellent help that would lead you to a solution to your question.  Yet, instead of letting me work with you, you delete the question saying that nobody has helped you.

-- Dan
0
 
BerCommented:
Dan I meant I would like to have seen what shilpa had done I spent a considerable amount of time trying to implement this properly and would like to have got some feedback from shilpa in response to your post. I did not post anything because it was simply not working. As for proving who I am I can't think of anything short of meeting up and going drinkin..... however this would probably be a bit expensive, cause well I'm in Ireland and I guess you are state side.... If you really want I will set a video conference (or perhaps post my phone number and get the good people at EE to ring me.... I don't mind) link and settle this once and for all ... assuming that other person will...!!! If this isn't enough well then I give up .....

Cheers...
Ber...
0
 
DanRollinsCommented:
If I have made an unjust accusation, then I appologize.

-- Dan
0
 
BerCommented:
If you keep IP logs then you should be able to confirm that I have used the IP 149.153.100.1 regularly.. this is the proxy address of the college I attend. the college have the rights to all IP's below 149.153. .. If you go to 149.153.1.5 you will see our colleges web-page.. If shilpa is willing to post similar details this should prove the point ...

Cheers...
Ber...
0
 
ShilpaAuthor Commented:
Hi Ber,
   I hav rcvd the community support reply mail sending across their appologies. And now Dan Rollins too has apologized, therefore I don want to extend this issue any further.
Thanks for ur support though.
Just hope tht such a situation doesnt arise again wherein the EE group believes some predictions and reacts accordingly.
I m grateful to Dan too coz he has answered one my questions before...and I hope the camaraderie still continues

Till then keep the spirit
Shilpa
0
 
BerCommented:
This has really annoyed me. Such "Enlightened...???" people are very quick to jump to conclusions...

Goodbye...
Ber...
0
 
MoondancerCommented:
Thank you for clarifying, and I apologize for my error.
Moondancer - EE Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now