|
Thanks Hamid!
Very good link. I think private byte only includes the RAM, not including the page swap file, right?
regards,
George
|
|
|
|
|
i have a check box and an edit box in my application. the edit box displays values from 1 to 100. and there is a timer which helps to display all the values. when i click on the check box the values should get logged in to a file. i am only getting the last digit. i need the value from the moment i check the check box. and when i uncheck it it should stop loggin. what needs to be done. i think i need to use a while loop. is that right?
|
|
|
|
|
What type of project are you working at?
MFC or Win32 SDK?
Maxwell Chen
|
|
|
|
|
|
Have a global boolean flag declared and set its value to true/false after the user is clicking on the checkbox. Modify the code which updates the value in edit control to check for true state of boolean flag. If the flag is true, append the present value to your log file.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
...formerly known as brahmma
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Did you have any code for save previous values of edit ctrl?
|
|
|
|
|
If I understood your requirement correctly, you can do it by the following steps...
1. Create a control variable of type CButton
2. In the timer function, by using (m_check.GetCheck() & BST_CHECKED) you can identify the state.
3. If it is checked then log the value.
|
|
|
|
|
NS17 wrote: 2. In the timer function, by using (m_check.GetCheck() & BST_CHECKED) you can identify the state.
Since the GetCheck() method can only return one of three values, why use the bitwise AND operator rather than just check for equality?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: why use the bitwise AND operator rather than just check for equality?
Yes. It's a mistake.
|
|
|
|
|
NS17 wrote: Yes. It's a mistake.
No. In fact it isn't, because you're lucky guy. However checking for equality is more appropriate.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini wrote: However checking for equality is more appropriate.
Yes, I know bitwise AND will work. But ofcourse as you said checking for equality is more appropriate.
|
|
|
|
|
NS17 wrote: Yes, I know bitwise AND will work
Because there are wise guys at Microsoft.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hi,
I am looking for a control that switches between a set of fixed strings in the toolbar. Like a month selector. It should have a button on both ends to swith to the next/previous value. I have no idea how this control could be called, so searching the web is rather difficult.
Does anyone have
a) an idea what I should search for
b) such a component in source or a link to a vendor that offers such a thing
I don´t like the approach to add a Button, a Edit Control and an other Button to the toolbar.
Thanks for your help...
Wolfgang
|
|
|
|
|
I'm not aware of such a control either.
I don't see the big deal about two buttons and a static control.
Or, just use a static control with SS_NOTIFY, and set the string to include the < & >s. Then monitor for WM_LBUTTONUPs, and check roughly where in the control it is.
Or... you could write your own control to do this, and make it into an article here on CP.
Iain.
|
|
|
|
|
Hi Iain,
thanks for your reply. The idea with the static control is good. I think I will do this. I is a pitty that I need the control in two weeks, so the design of a new control will not work for me right now, but I will keep this in mind. Maybe I find the time to do it after roll out...
Thanks for your help - any other comments are still welcome!
Wolfgang
|
|
|
|
|
Hi
I have four property page in my program.i want to know which event or message is generated when i pressed the tab of property page
Thank u in advance
|
|
|
|
|
Do you mean TCN_SELCHANGE [^]?
Of course the David Crow reply [^] is the appropriate one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
modified on Wednesday, January 09, 2008 9:14:12 AM
|
|
|
|
|
FYI
Generally we identify the messages using Spy++ tool.
|
|
|
|
|
NS17 wrote: Generally we identify the messages using Spy++ tool.
You experimental scientists do that!
We (theoreticians) have first a look at the documentation.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini wrote: You experimental scientists do that!
Thank you...
BTW, theories should be tested (experimentally) before applying.
|
|
|
|
|
NS17 wrote: BTW, theories should be tested (experimentally) before applying.
That's your role.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini wrote: That's your role.
Ok... I agreed boss...
|
|
|
|
|
Check out the PSN_SETACTIVE notification.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thank u sir u give me perfact solution
|
|
|
|
|
Hi everyone i'm getting link error 1103 when i try to execute some code related to WMI can any one diagonise this problem. I'm using VC6.0 is that a problem or should i try implementing it in any higher versions of VC.
Kings
|
|
|
|