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

x
?
Solved

view,messages and events

Posted on 1998-12-02
4
Medium Priority
?
199 Views
Last Modified: 2013-11-20
I have a dialog box that consists of two check boxes.I am calling my dialog box in a function named DRAWLINE.In this
function if one of the check boxes in the dialog box is checked then I ask for the coordinates to draw a line. this part is working.however if the other check box is checked then "OnLbuttonDown" function should get enabled.how can i
make it possible?.both functions ie.. drawline and onlbuttondown belong to the same view.
    Until this dialog box is called the view should not get enabled.how to make it possible?
0
Comment
Question by:manjunath_k_v
  • 2
4 Comments
 
LVL 4

Expert Comment

by:pagladasu
ID: 1325695
I would like you to clarify a few points:
DrawLine() is a member function of your view class. In this function you call the DoModal() function to display the dialog box. Here there are two check boxes. After your dialog box closes, in your DrawLine() function you somehow test the state of the check boxes and make calls to appropriate functions.
Are you trying to do this or trying to call the OnLbuttonDown() from the dialog box. Secondly what exactly do you mean by 'Until this dialog box is called the view should not get enabled' . Please clarify.

thanks
pagladasu
0
 

Author Comment

by:manjunath_k_v
ID: 1325696
  my view consists of the following functions. OnLButtonDown,OnMouseMove,OnLButtonUp and drawline. The first three corresponds to the message maps regarding mousemove.
In drawline i am calling dialogbox.
my dialog box has two check buttons named yes and no.i call this dialog box thru domodal()in the function drawline. if checkbox "yes" is checked I ask for the coordinates for the line.if checkbox "no" is checked then I must be able to draw the line in the view just by clicking the leftmousebutton and dragging the mouse.
my problem is i dont know how to connect my mouse movement with the dialog box called in drawline. Right now i am able to draw the line just by clicking the mouse an dragging.This i want to avoid.This is what i meant by saying my view should not get activated.
        I must be able to draw the line only after passing thru the dialogbox.
PLEASE HELP.
   
0
 
LVL 4

Expert Comment

by:pagladasu
ID: 1325697
You see, the view must receive input focus for the drawing. In order to do so, you can close the dialog box the appropriate check box is checked.

0
 
LVL 3

Accepted Solution

by:
plaroche earned 100 total points
ID: 1325698
Keep a member variable named m_bFreeHand in your view and check it in the button down handler.  
If it's TRUE then enable the user to draw the line, if not just call the base class and return.
Check that variable in your handlers to enable their functionality.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

886 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