Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reducing the size of the Dialog bar on mouse event

Posted on 2002-04-21
18
Medium Priority
?
236 Views
Last Modified: 2013-11-20
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
Comment
Question by:Shilpa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 4
  • +1
18 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 600 total points
ID: 6958369
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
 
LVL 2

Expert Comment

by:Ber
ID: 6958438
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 6959051
Hi Ber,
I'm glad that you tried that.  Perhaps Shilpa would care to comment.

-- Dan
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 1

Expert Comment

by:Moondancer
ID: 6959609
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
 
LVL 2

Expert Comment

by:Ber
ID: 6959707
some feedback would have been nice
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6960945
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 6961200
Thank you.
Shilpa - Ber .... researching.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6961243
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
 

Author Comment

by:Shilpa
ID: 6961873
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 6962147
>>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
 
LVL 2

Expert Comment

by:Ber
ID: 6962224
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 6962330
If I have made an unjust accusation, then I appologize.

-- Dan
0
 
LVL 2

Expert Comment

by:Ber
ID: 6962434
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
 

Author Comment

by:Shilpa
ID: 6962482
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
 
LVL 2

Expert Comment

by:Ber
ID: 6962546
This has really annoyed me. Such "Enlightened...???" people are very quick to jump to conclusions...

Goodbye...
Ber...
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6962940
Thank you for clarifying, and I apologize for my error.
Moondancer - EE Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question