|
littleGreenDude wrote: ...the new default date of the 2nd date control should be the value of the 1st date control.
So where/what is your code to do this?
"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
|
|
|
|
|
Right after the range is set.
m_dtFinalizeOnDate = dtBusDate;
|
|
|
|
|
Ok, is m_dtFinalizeOnDate a CDateTimeCtrl or CTime object? If the former, shouldn't you be using the SetTime() method?
"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
|
|
|
|
|
m_dtFinalizeOnDate is a COleDateTime object that is set by a CDateTimeCtrl.
|
|
|
|
|
littleGreenDude wrote: ...is set by a CDateTimeCtrl.
I'm not exactly sure what you mean by this, but your code snippet worked fine for me by making one small change.
"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
|
|
|
|
|
"is set by a CDateTimeCtrl" means the control object on the screen is the date time picker control included with the IDE.
DDX_DateTimeCtrl(pDX, IDC_DTC_FINALIZE_DATE, m_dtFinalizeOnDate);
When using ClassWizard to add a member var to the control you are given 2 options one is by control (CDateTimeCtrl), and the other is by value (COleDateTime).
I chose the latter.
COleDateTime m_dtFinalizeOnDate;
What was the one change you made?
|
|
|
|
|
littleGreenDude wrote: DDX_DateTimeCtrl(pDX, IDC_DTC_FINALIZE_DATE, m_dtFinalizeOnDate);
Did you forget to call UpdateData(FALSE) ?
littleGreenDude wrote: What was the one change you made?
Using CDateTimeCtrl .
"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
|
|
|
|
|
Why would I want to use SetTime()?
|
|
|
|
|
Can't remember off the top of my head but, this looks potentially dangerous.
dtMinRange.SetDate(dtBusDate.GetYear(), dtBusDate.GetMonth(), dtBusDate.GetDay() - 1);
What if dtBusDate.GetDay() returns a 1?
Maybe using COleDateTimeSpan would be safer?
|
|
|
|
|
You are correct. If I choose Jan 1st, it bombs. I defined COleDateTimeSpan, and it seems to work fine. Except the 2nd date is not defaulting to the same date as the 1st control.
const COleDateTimeSpan dtOneDay(1, 0, 0, 0);<br />
<br />
dtMinRange = dtBusDate - dtOneDay;<br />
dtMaxRange = dtBusDate + dtOneDay;
|
|
|
|
|
Left click on the selected item will highlite it but next right click anywhere in control will remove this highlite.
What function does this on / off highlite and can it be contolled?
I basically need to keep the highlite on untill my right click pop-up is done executing not before.
Thanks for your help.
Cheers
Vaclav
|
|
|
|
|
Shift+click and Ctrl+click not working for you?
"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
|
|
|
|
|
Yes shift and ctrl works fine.
I need to do pop-up on right click ( in the control rectangle) which works fine but removes the highlite from control items.
Basically I need to keep the higlite on to show the user which items are being modified.
The way it works now - the user does not have a clue.
For example - I need the pop-up to delete selected items.
|
|
|
|
|
Vaclav_Sal wrote: The way it works now - the user does not have a clue.
For example - I need the pop-up to delete selected items.
Can you list those items in the confirmation dialog?
"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
|
|
|
|
|
Yes, I have that working.
But I have decided that simple pop-up menu would be nicer since I do just few modifications (delete, modify single subitem)to the list which is partially visible anyway.
I'll try to set focus on the selection and see if that works.
|
|
|
|
|
Have you tried using LVS_SHOWSELALWAYS ?
"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
|
|
|
|
|
Yes, same results.
However, just noticed that the selection higlite rectangle does not cover the whole first (item) column - it covers item text only.Also when the color ( I assume some Windoze standard - dark blue) goes away it leaves dotted rectangle which stays when I do right click on the control.
I'll do some more research on the list control itself - this has to be documented somewhere - I hope.
Thanks for your input.
Cheers
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: However, just noticed that the selection higlite rectangle does not cover the whole first (item) column - it covers item text only.
Try setting the LVS_EX_FULLROWSELECT style.
"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
|
|
|
|
|
I migrate the project from vc6 to vs2008.
In vs2008 resource editor, the control looks nice, but when I run it, it is still the vc6 style?
Why?
Any way to show with the vs2008 style?
BTW: Is there any way to make control nicer with mfc9?
I'm working for a project that needs a better UI.
Thanks a lot.
|
|
|
|
|
Try adding this line to your stdafx.h file...
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
More info here...[^]
Most, if not all the controls you are using are common controls
provided by the operating system. If you want them to look different,
you need to draw them yourself. Search for "custom draw" and "owner draw"
here and you'll find lots of examples.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
followait wrote: In the IDE, I choose Help/Check for updates, but it doesn't detect vs2008 updates. BTW, I've installed vss2005, there is one update for vs2005.
I can't use bcg now.
You have to purchase an "upgrade" license to upgrade from VS2005 to VS2008. If not, the auto update is just providing you the bug updates for VS2005.
Maxwell Chen
|
|
|
|
|
|
get out of here, immediately !
If you were a serious developer, would you expect people to crack your own work ? damnit !
I've been reporting your post as abusive FYI...
|
|
|
|
|
followait wrote: No other way?
You can always get a free copy of Visual GCC.
Maxwell Chen
|
|
|
|