April 4th, 1999, 08:43 AM
I have a couple more queries to do with the calendar application I am writing so again help would be most appreciated.
I have managed to create the calendar in the SDI application and can change the date. To create it you have to specify the dimensions of it using CRect(int, int, int, int). I want it to be full screen however and don't know how to do this. I also would like it to remain full screen when the user changes the size of the window. I know I should use the WM_SIZE message and based on the answer to the above question should be able to implement that. What I am not sure about is how to do it so the window won't go below a certain size, or if the user makes the window smaller then the specified size then the calender should stop shrinking with it and scroll bars should appear.
Secondly I am not sure how to catch when the user changes the date by clicking on the calendar. I would like to open a dialog box when the user does this. I have an OnLButtonDown function but that only works when the user clicks elsewhere in the window (i.e. where the calender isn't). I don't know if there is a way to catch this or not.
Finally I would like to give an edit box focus but don't know how to do this. I was told in a previous post to call SetFocus, but call it on what. I know its not the variable of the Edit box but is it the ID of the edit box or something else. The function returns a pointer to a CWnd object but that does not help me.
Thanks for your help
Mark
I have managed to create the calendar in the SDI application and can change the date. To create it you have to specify the dimensions of it using CRect(int, int, int, int). I want it to be full screen however and don't know how to do this. I also would like it to remain full screen when the user changes the size of the window. I know I should use the WM_SIZE message and based on the answer to the above question should be able to implement that. What I am not sure about is how to do it so the window won't go below a certain size, or if the user makes the window smaller then the specified size then the calender should stop shrinking with it and scroll bars should appear.
Secondly I am not sure how to catch when the user changes the date by clicking on the calendar. I would like to open a dialog box when the user does this. I have an OnLButtonDown function but that only works when the user clicks elsewhere in the window (i.e. where the calender isn't). I don't know if there is a way to catch this or not.
Finally I would like to give an edit box focus but don't know how to do this. I was told in a previous post to call SetFocus, but call it on what. I know its not the variable of the Edit box but is it the ID of the edit box or something else. The function returns a pointer to a CWnd object but that does not help me.
Thanks for your help
Mark