|
Does anyone know how to implement a tracker that will take either MM or inches? Let's say if I was to set a rectangle to 1 inch, I'll get 96 pixel. But setting 1.005 inches will also give me 96 pixel. Then I can move the tracker without losing the 1.005 inches. If I only get 96 pixel, then converting it back will only get 1 inch and I'll lose the .005 inch.
|
|
|
|
|
moonreflection2000 wrote: Does anyone know how to implement a tracker that will take either MM or inches?
As opposed to what?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Well, with CRectTracker. m_rect is only stored in pixel. That mean I can't really store 1.005 inch as the size.
|
|
|
|
|
Implement the tracker using double variables instead of int/long.
Only do integer conversions when necessary - like when converting to pixels.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
has anyone used BrowseForFiles_demo project.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: has anyone used BrowseForFiles_demo project.
This one[^] , if so then no, I haven't.
But what is your question about the demo ?
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
|
deeps_cute wrote: has anyone used BrowseForFiles_demo project.
Yes, I'm fairly sure that at least someone has.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Yes, I'm fairly sure that at least someone has.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
deeps_cute wrote:
has anyone used BrowseForFiles_demo project.
google.. mam.. google! first need for every programmer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi chaps,
I have a CDialogBar that is most often used as a modeless floating (ie undocked) tool window.
My problem is that I want to intercept when the user clicks the little X in the top right of the title bar to close the dialog. To my surprise, Windows does not send my control WM_CLOSE or WM_SHOWWINDOW. In fact, it does not seem to send any Windows message that I can think of.
Does anybody know what (if any!) message it sends, or how to intercept this action?
Thanks,
Jim
|
|
|
|
|
Do you get a WM_SYSCOMMAND message?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I thought of that too - it's kind of on the system menu, perhaps it gets WM_SYSCOMMAND?
Nope.
I also tried WM_DESTROY out of desperation, it didn't get that either. I've drawn a total blank. Surely there must be SOME way to intercept this action?
|
|
|
|
|
Maybe this is a clue...
"Dialog bars are extensions to a main window and any dialog-bar control-notification messages,
such as BN_CLICKED or EN_CHANGE, will be sent to the parent of the dialog bar, the main
window."
I know it's in the MFC source somewhere....I can't seem to track it down. Maybe after the
caffeine kicks in.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Ah, now there's a new path to try - I'll give that a go next time I look at that dialog again.
Thanks,
Jim
|
|
|
|
|
Jim @ JCT wrote: h, now there's a new path to try - I'll give that a go next time I look at that dialog again.
SYSCOMMAND .. SC_CLOSE or have a look at this :- http://www.visualcpp.org/?p=39[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
dear all,
Now a doing a small project, in which I used MS FlexGrid to demonstrate my Data, so I would like to export these data from this Grid to Text file .txt and save them to my drive. Anyone know please show me more detail. Thank in advance all of you
|
|
|
|
|
|
Kiethnt wrote: Now a doing a small project, in which I used MS FlexGrid to demonstrate my Data, so I would like to export these data from this Grid to Text file .txt and save them to my drive. Anyone know please show me more detail. Thank in advance all of you
you can use CStdioFile for storing data in the file!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
What is the better way to validate edit control?
Is it on KillFocus of the control or onOk of the dialog??
Is there any other better way?
Suggestions are appreciated.
|
|
|
|
|
Depends if your application must responds to an immediate change to the edit box value; i.e. if something must be refresh with the new value.
|
|
|
|
|
Is it possible to pop up message if the edit box value exceeds the limits on typing the value itself?
|
|
|
|
|
Yes, but why would you want to do this? Just send the control a EM_LIMITTEXT message and be done with it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
That depends on what you mean by validate. I find the best approach to be disabling the OK button until all controls have valid data in them.
If your edit control is for a phone number, there are many ways for the user to input such a number, and you certainly do not want to start complaining to them until you know for sure they are through entering data and it is indeed incorrect.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you david for the suggestion. Yes its good idea to disable Ok button until valid data is entered. I will implement the same way in my project.
The requirement for me is like there are lot of dialogs which contains many edit controls, and i have stored all the minimum,maximum values for edit box in a file, so is it possible to write some generic version for validation check of edit controls, validation here is like if the input entered is greater or less than the maximum,minimum value it has to display a message.
|
|
|
|