Solved

Reducing the size of the Dialog bar on mouse event

Posted on 2002-04-21
18
227 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
  • 5
  • 5
  • 4
  • +1
18 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 200 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
move a line in eclipse 3 60
sum67 challenge 35 89
lucky13 challenge 11 112
haveThree challenge 22 100
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now