How to force uppercase in a CListCtrl

I have a class the is derived from CListCtrl. There are two columns, one is 
fixed, the other is editable. I would like to make it so that characters 
entered in the editable column always appear in uppercase (much like setting 
the Uppercase property to True on a CEdit).

I've tried a number of things, but none seem to work. I am not an MFC expert 
by any means. Any help would be appreciated.
0
Jacobi (2)
3/21/2008 6:57:04 PM
vc.mfc 33608 articles. 0 followers. Follow

13 Replies
1087 Views

Similar Articles

[PageSpeed] 12

I'd start by just setting it in the edit control you get in EditLabel()

http://msdn2.microsoft.com/en-us/library/4xxsdd7z(VS.80).aspx

I haven't tried it, but I think you can call ModifyStyle()

http://msdn2.microsoft.com/en-us/library/0xhz2t1c(VS.80).aspx

With the style:

ES_UPPERCASE

http://msdn2.microsoft.com/en-us/library/6e36b89f(VS.80).aspx

Tom

"Matt Jacobi" <Matt Jacobi@discussions.microsoft.com> wrote in message 
news:1005A03F-D80A-4B3D-8A3E-6783391DB055@microsoft.com...
>I have a class the is derived from CListCtrl. There are two columns, one is
> fixed, the other is editable. I would like to make it so that characters
> entered in the editable column always appear in uppercase (much like 
> setting
> the Uppercase property to True on a CEdit).
>
> I've tried a number of things, but none seem to work. I am not an MFC 
> expert
> by any means. Any help would be appreciated. 

0
tom.nospam (3240)
3/21/2008 8:09:08 PM
Tom,

Thanks so much for quick reply. However, the one thing you suggested was the 
one thing I had already tried (to no avail). However, maybe I am doing 
something wrong. Here is my code:

int SerialNumberList::InsertRow (Row& rowData) {
    [...]
    int item = InsertItem(GetItemCount(), rowData.at(1).c_str());
    SetItemText(item, 1, rowData.at(0).c_str());

    // Start New Code
    SetFocus(); // EditLabel() returns a null pointer without this for some 
reason
    CEdit* edit = EditLabel(item);
    edit->ModifyStyle(0, ES_UPPERCASE);
    // End New Code

    [...]
}

This code appears to have absolutely no effect (if I type lowercase chars, 
they appear as lowercase).

Also, since ModifyStyle() employs SetWindowLong(), I was looking at the 
documentation for SetWindowLong() and saw this: 

"Certain window data is cached, so changes you make using SetWindowLong will 
not take effect until you call the SetWindowPos function. Specifically, if 
you change any of the frame styles, you must call SetWindowPos with the 
SWP_FRAMECHANGED flag for the cache to be updated properly."

As a result, I also tried changing
edit->ModifyStyle(0, ES_UPPERCASE);
to
edit->ModifyStyle(0, ES_UPPERCASE, SWP_FRAMECHANGED);
but that didn't seem to make any difference.

Any more help/ideas would be greatly appreciated!

"Tom Serface" wrote:

> I'd start by just setting it in the edit control you get in EditLabel()
> 
> http://msdn2.microsoft.com/en-us/library/4xxsdd7z(VS.80).aspx
> 
> I haven't tried it, but I think you can call ModifyStyle()
> 
> http://msdn2.microsoft.com/en-us/library/0xhz2t1c(VS.80).aspx
> 
> With the style:
> 
> ES_UPPERCASE
> 
> http://msdn2.microsoft.com/en-us/library/6e36b89f(VS.80).aspx
> 
> Tom
0
3/21/2008 10:06:00 PM
It may have the same effect, but have you tried using:

http://msdn2.microsoft.com/en-us/library/c4x5de10.aspx

To get the control instead before doing the EditLabel() stuff.

Otherwise you may have to place your own edit control in there instead using 
something like:

http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4179/

Tom

"Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message 
news:7E87E9AF-9179-47DA-A3BD-6A09CB539BB4@microsoft.com...
> Tom,
>
> Thanks so much for quick reply. However, the one thing you suggested was 
> the
> one thing I had already tried (to no avail). However, maybe I am doing
> something wrong. Here is my code:
>
> int SerialNumberList::InsertRow (Row& rowData) {
>    [...]
>    int item = InsertItem(GetItemCount(), rowData.at(1).c_str());
>    SetItemText(item, 1, rowData.at(0).c_str());
>
>    // Start New Code
>    SetFocus(); // EditLabel() returns a null pointer without this for some
> reason
>    CEdit* edit = EditLabel(item);
>    edit->ModifyStyle(0, ES_UPPERCASE);
>    // End New Code
>
>    [...]
> }
>
> This code appears to have absolutely no effect (if I type lowercase chars,
> they appear as lowercase).
>
> Also, since ModifyStyle() employs SetWindowLong(), I was looking at the
> documentation for SetWindowLong() and saw this:
>
> "Certain window data is cached, so changes you make using SetWindowLong 
> will
> not take effect until you call the SetWindowPos function. Specifically, if
> you change any of the frame styles, you must call SetWindowPos with the
> SWP_FRAMECHANGED flag for the cache to be updated properly."
>
> As a result, I also tried changing
> edit->ModifyStyle(0, ES_UPPERCASE);
> to
> edit->ModifyStyle(0, ES_UPPERCASE, SWP_FRAMECHANGED);
> but that didn't seem to make any difference.
>
> Any more help/ideas would be greatly appreciated!
>
> "Tom Serface" wrote:
>
>> I'd start by just setting it in the edit control you get in EditLabel()
>>
>> http://msdn2.microsoft.com/en-us/library/4xxsdd7z(VS.80).aspx
>>
>> I haven't tried it, but I think you can call ModifyStyle()
>>
>> http://msdn2.microsoft.com/en-us/library/0xhz2t1c(VS.80).aspx
>>
>> With the style:
>>
>> ES_UPPERCASE
>>
>> http://msdn2.microsoft.com/en-us/library/6e36b89f(VS.80).aspx
>>
>> Tom 

0
tom.nospam (3240)
3/21/2008 11:09:08 PM
Tom,

Thanks for your help. By looking at the source code of the edit control you 
pointed me to, plus some further Googling based on what I saw there, I was 
able to come up with a solution. All I had to do was override one function in 
my class.

Here is what I came up with:

BOOL SerialNumberList::PreTranslateMessage(MSG* pMsg) {
    if (pMsg->message == WM_CHAR) {
        pMsg->wParam = toupper(pMsg->wParam);
    }
    return CListCtrl::PreTranslateMessage(pMsg);
}

Thanks again for your help!
-- Matt

"Tom Serface" wrote:

> It may have the same effect, but have you tried using:
> 
> http://msdn2.microsoft.com/en-us/library/c4x5de10.aspx
> 
> To get the control instead before doing the EditLabel() stuff.
> 
> Otherwise you may have to place your own edit control in there instead using 
> something like:
> 
> http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4179/
> 
> Tom
0
3/24/2008 4:33:06 PM
That's great that  you got it working.  This is going to make everything 
uppercase.  Is that what you wanted?  If so, good stuff!  Thanks for posting 
the final solution.  It's always interesting to have threads completed.

Tom

"Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message 
news:E0A67451-D88F-4E82-90E1-FF561B012720@microsoft.com...
> Tom,
>
> Thanks for your help. By looking at the source code of the edit control 
> you
> pointed me to, plus some further Googling based on what I saw there, I was
> able to come up with a solution. All I had to do was override one function 
> in
> my class.
>
> Here is what I came up with:
>
> BOOL SerialNumberList::PreTranslateMessage(MSG* pMsg) {
>    if (pMsg->message == WM_CHAR) {
>        pMsg->wParam = toupper(pMsg->wParam);
>    }
>    return CListCtrl::PreTranslateMessage(pMsg);
> }
>
> Thanks again for your help!
> -- Matt

0
tom.nospam (3240)
3/24/2008 5:51:59 PM
Like Tom pointed out the solution that you have posted will make everything 
typed upper case, and might be ok in your case.

The correct solution is to catch the LVN_BEGINLABELEDIT message of the list 
control and change the style of the edit control.

class CMyListCtrl : public CListCtrl
{
 DECLARE_DYNAMIC(CMyListCtrl)

public:
 CMyListCtrl() {}
 virtual ~CMyListCtrl() {}

protected:
 afx_msg void OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult);
 DECLARE_MESSAGE_MAP()
};

// CMyListCtrl

IMPLEMENT_DYNAMIC(CMyListCtrl, CListCtrl)

BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
 ON_NOTIFY_REFLECT(LVN_BEGINLABELEDIT, &CMyListCtrl::OnLvnBeginlabeledit)
END_MESSAGE_MAP()


void CMyListCtrl::OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
{
 NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);

 CEdit *pEdit = GetEditControl();
 ASSERT(pEdit);
 pEdit->ModifyStyle(0,ES_UPPERCASE);

 *pResult = 0;
}



That way you can control this if they are editing a different column or item 
that does not need to be all upper case.


AliR.


"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:uvcJHfdjIHA.4396@TK2MSFTNGP04.phx.gbl...
> That's great that  you got it working.  This is going to make everything 
> uppercase.  Is that what you wanted?  If so, good stuff!  Thanks for 
> posting the final solution.  It's always interesting to have threads 
> completed.
>
> Tom
>
> "Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message 
> news:E0A67451-D88F-4E82-90E1-FF561B012720@microsoft.com...
>> Tom,
>>
>> Thanks for your help. By looking at the source code of the edit control 
>> you
>> pointed me to, plus some further Googling based on what I saw there, I 
>> was
>> able to come up with a solution. All I had to do was override one 
>> function in
>> my class.
>>
>> Here is what I came up with:
>>
>> BOOL SerialNumberList::PreTranslateMessage(MSG* pMsg) {
>>    if (pMsg->message == WM_CHAR) {
>>        pMsg->wParam = toupper(pMsg->wParam);
>>    }
>>    return CListCtrl::PreTranslateMessage(pMsg);
>> }
>>
>> Thanks again for your help!
>> -- Matt
> 


0
AliR3470 (3236)
3/24/2008 7:19:35 PM
Thanks for the information AliR. The code you posted is somewhat similar to 
where I was at at one point along the way, but I simplified it down because 
this is a very simple implementation with two columns: one fixed, one 
editable. As far as this grid is concerned, I don't ever see there being 
multiple editable columns. However, this is def good knowledge to have for 
the future in case a similar situation ever arises. Thanks again for the help.

-- Matt

"AliR (VC++ MVP)" wrote:

> Like Tom pointed out the solution that you have posted will make everything 
> typed upper case, and might be ok in your case.
> 
> The correct solution is to catch the LVN_BEGINLABELEDIT message of the list 
> control and change the style of the edit control.
> 
> class CMyListCtrl : public CListCtrl
> {
>  DECLARE_DYNAMIC(CMyListCtrl)
> 
> public:
>  CMyListCtrl() {}
>  virtual ~CMyListCtrl() {}
> 
> protected:
>  afx_msg void OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult);
>  DECLARE_MESSAGE_MAP()
> };
> 
> // CMyListCtrl
> 
> IMPLEMENT_DYNAMIC(CMyListCtrl, CListCtrl)
> 
> BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
>  ON_NOTIFY_REFLECT(LVN_BEGINLABELEDIT, &CMyListCtrl::OnLvnBeginlabeledit)
> END_MESSAGE_MAP()
> 
> 
> void CMyListCtrl::OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
> {
>  NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
> 
>  CEdit *pEdit = GetEditControl();
>  ASSERT(pEdit);
>  pEdit->ModifyStyle(0,ES_UPPERCASE);
> 
>  *pResult = 0;
> }
> 
> 
> 
> That way you can control this if they are editing a different column or item 
> that does not need to be all upper case.
> 
> 
> AliR.
> 
> 
> "Tom Serface" <tom.nospam@camaswood.com> wrote in message 
> news:uvcJHfdjIHA.4396@TK2MSFTNGP04.phx.gbl...
> > That's great that  you got it working.  This is going to make everything 
> > uppercase.  Is that what you wanted?  If so, good stuff!  Thanks for 
> > posting the final solution.  It's always interesting to have threads 
> > completed.
> >
> > Tom
> >
> > "Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message 
> > news:E0A67451-D88F-4E82-90E1-FF561B012720@microsoft.com...
> >> Tom,
> >>
> >> Thanks for your help. By looking at the source code of the edit control 
> >> you
> >> pointed me to, plus some further Googling based on what I saw there, I 
> >> was
> >> able to come up with a solution. All I had to do was override one 
> >> function in
> >> my class.
> >>
> >> Here is what I came up with:
> >>
> >> BOOL SerialNumberList::PreTranslateMessage(MSG* pMsg) {
> >>    if (pMsg->message == WM_CHAR) {
> >>        pMsg->wParam = toupper(pMsg->wParam);
> >>    }
> >>    return CListCtrl::PreTranslateMessage(pMsg);
> >> }
> >>
> >> Thanks again for your help!
> >> -- Matt
> > 
> 
> 
> 
0
3/24/2008 7:51:01 PM
That's fine.  I just wanted to post the solution in case someone else needs 
a solution to this problem.

When it comes to simplicity, they are both two lines of code!  Your if 
statement will get evaluated something like a 1000 times a second as the 
mouse moves around the list control (as the PreTranslateMessage gets called 
for every message that gets sent to the list control). Where the 
LVN_BEGINLABELEDIT message will only get sent when the label is about to be 
edited.  Therefore I don't think the argument that one is simpler than the 
other is valid.

AliR.


"Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message 
news:D69E60B9-16C5-4AC9-9F04-36C438F9D049@microsoft.com...
> Thanks for the information AliR. The code you posted is somewhat similar 
> to
> where I was at at one point along the way, but I simplified it down 
> because
> this is a very simple implementation with two columns: one fixed, one
> editable. As far as this grid is concerned, I don't ever see there being
> multiple editable columns. However, this is def good knowledge to have for
> the future in case a similar situation ever arises. Thanks again for the 
> help.
>
> -- Matt
>
> "AliR (VC++ MVP)" wrote:
>
>> Like Tom pointed out the solution that you have posted will make 
>> everything
>> typed upper case, and might be ok in your case.
>>
>> The correct solution is to catch the LVN_BEGINLABELEDIT message of the 
>> list
>> control and change the style of the edit control.
>>
>> class CMyListCtrl : public CListCtrl
>> {
>>  DECLARE_DYNAMIC(CMyListCtrl)
>>
>> public:
>>  CMyListCtrl() {}
>>  virtual ~CMyListCtrl() {}
>>
>> protected:
>>  afx_msg void OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult);
>>  DECLARE_MESSAGE_MAP()
>> };
>>
>> // CMyListCtrl
>>
>> IMPLEMENT_DYNAMIC(CMyListCtrl, CListCtrl)
>>
>> BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
>>  ON_NOTIFY_REFLECT(LVN_BEGINLABELEDIT, &CMyListCtrl::OnLvnBeginlabeledit)
>> END_MESSAGE_MAP()
>>
>>
>> void CMyListCtrl::OnLvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
>> {
>>  NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
>>
>>  CEdit *pEdit = GetEditControl();
>>  ASSERT(pEdit);
>>  pEdit->ModifyStyle(0,ES_UPPERCASE);
>>
>>  *pResult = 0;
>> }
>>
>>
>>
>> That way you can control this if they are editing a different column or 
>> item
>> that does not need to be all upper case.
>>
>>
>> AliR.
>>
>>
>> "Tom Serface" <tom.nospam@camaswood.com> wrote in message
>> news:uvcJHfdjIHA.4396@TK2MSFTNGP04.phx.gbl...
>> > That's great that  you got it working.  This is going to make 
>> > everything
>> > uppercase.  Is that what you wanted?  If so, good stuff!  Thanks for
>> > posting the final solution.  It's always interesting to have threads
>> > completed.
>> >
>> > Tom
>> >
>> > "Matt Jacobi" <MattJacobi@discussions.microsoft.com> wrote in message
>> > news:E0A67451-D88F-4E82-90E1-FF561B012720@microsoft.com...
>> >> Tom,
>> >>
>> >> Thanks for your help. By looking at the source code of the edit 
>> >> control
>> >> you
>> >> pointed me to, plus some further Googling based on what I saw there, I
>> >> was
>> >> able to come up with a solution. All I had to do was override one
>> >> function in
>> >> my class.
>> >>
>> >> Here is what I came up with:
>> >>
>> >> BOOL SerialNumberList::PreTranslateMessage(MSG* pMsg) {
>> >>    if (pMsg->message == WM_CHAR) {
>> >>        pMsg->wParam = toupper(pMsg->wParam);
>> >>    }
>> >>    return CListCtrl::PreTranslateMessage(pMsg);
>> >> }
>> >>
>> >> Thanks again for your help!
>> >> -- Matt
>> >
>>
>>
>> 


0
AliR3470 (3236)
3/24/2008 8:06:13 PM
Hi Ali,

If that works then you are correct that it is a better solution, but we were 
having trouble getting the style to change.  Maybe the secret is to change 
the style before the control is actually created.  I forgot that there are 
some styles that can't be changed afterwards.  If this is called before the 
window is created then perhaps it could work, but otherwise it looks like 
Matt may have the same result.

Tom

"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:AVTFj.10337$qS5.458@nlpi069.nbdc.sbc.com...
> That's fine.  I just wanted to post the solution in case someone else 
> needs a solution to this problem.
>
> When it comes to simplicity, they are both two lines of code!  Your if 
> statement will get evaluated something like a 1000 times a second as the 
> mouse moves around the list control (as the PreTranslateMessage gets 
> called for every message that gets sent to the list control). Where the 
> LVN_BEGINLABELEDIT message will only get sent when the label is about to 
> be edited.  Therefore I don't think the argument that one is simpler than 
> the other is valid.
>
> AliR.

0
tom.nospam (3240)
3/24/2008 8:24:47 PM
I tested the code that I posted, and it worked find.

AliR.


"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:87491389-B4BA-4B23-B82B-627CC21D177D@microsoft.com...
> Hi Ali,
>
> If that works then you are correct that it is a better solution, but we 
> were having trouble getting the style to change.  Maybe the secret is to 
> change the style before the control is actually created.  I forgot that 
> there are some styles that can't be changed afterwards.  If this is called 
> before the window is created then perhaps it could work, but otherwise it 
> looks like Matt may have the same result.
>
> Tom
>
> "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
> news:AVTFj.10337$qS5.458@nlpi069.nbdc.sbc.com...
>> That's fine.  I just wanted to post the solution in case someone else 
>> needs a solution to this problem.
>>
>> When it comes to simplicity, they are both two lines of code!  Your if 
>> statement will get evaluated something like a 1000 times a second as the 
>> mouse moves around the list control (as the PreTranslateMessage gets 
>> called for every message that gets sent to the list control). Where the 
>> LVN_BEGINLABELEDIT message will only get sent when the label is about to 
>> be edited.  Therefore I don't think the argument that one is simpler than 
>> the other is valid.
>>
>> AliR.
> 


0
AliR3470 (3236)
3/24/2008 8:40:30 PM
That's great.  I learned something new.  The LVN_BEGINLABELEDIT must be 
fired before the window is created or something like that.  Thanks.

Tom

"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:OpUFj.10343$qS5.9278@nlpi069.nbdc.sbc.com...
>I tested the code that I posted, and it worked find.
>
> AliR.
>
>
> "Tom Serface" <tom.nospam@camaswood.com> wrote in message 
> news:87491389-B4BA-4B23-B82B-627CC21D177D@microsoft.com...
>> Hi Ali,
>>
>> If that works then you are correct that it is a better solution, but we 
>> were having trouble getting the style to change.  Maybe the secret is to 
>> change the style before the control is actually created.  I forgot that 
>> there are some styles that can't be changed afterwards.  If this is 
>> called before the window is created then perhaps it could work, but 
>> otherwise it looks like Matt may have the same result.
>>
>> Tom

0
tom.nospam (3240)
3/24/2008 9:57:03 PM
The edit control is already created when LVN_BEGINLABELEDIT is sent, if you 
look inside the CWnd * you will see that it has a valid HWND.

I'm not a 100% sure where you guys where setting the ES_UPPERCASE style. 
But as far as I can tell, it is something you can do on the fly.

AliR.


"Tom Serface" <tom.nospam@camaswood.com> wrote in message 
news:99E5F44C-59CB-47C3-831D-104CF034DDBC@microsoft.com...
> That's great.  I learned something new.  The LVN_BEGINLABELEDIT must be 
> fired before the window is created or something like that.  Thanks.
>
> Tom
>
> "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
> news:OpUFj.10343$qS5.9278@nlpi069.nbdc.sbc.com...
>>I tested the code that I posted, and it worked find.
>>
>> AliR.
>>
>>
>> "Tom Serface" <tom.nospam@camaswood.com> wrote in message 
>> news:87491389-B4BA-4B23-B82B-627CC21D177D@microsoft.com...
>>> Hi Ali,
>>>
>>> If that works then you are correct that it is a better solution, but we 
>>> were having trouble getting the style to change.  Maybe the secret is to 
>>> change the style before the control is actually created.  I forgot that 
>>> there are some styles that can't be changed afterwards.  If this is 
>>> called before the window is created then perhaps it could work, but 
>>> otherwise it looks like Matt may have the same result.
>>>
>>> Tom
> 


0
AliR3470 (3236)
3/24/2008 10:03:42 PM
Yeah, I must have been missing something easy... thanks for the heads-up. 
It's not something I use very often, but I won't forget that one again.

Tom

"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:VDVFj.8212$Rq1.2314@nlpi068.nbdc.sbc.com...
> The edit control is already created when LVN_BEGINLABELEDIT is sent, if 
> you look inside the CWnd * you will see that it has a valid HWND.
>
> I'm not a 100% sure where you guys where setting the ES_UPPERCASE style. 
> But as far as I can tell, it is something you can do on the fly.
>
> AliR.

0
tom.nospam (3240)
3/25/2008 5:42:51 AM
Reply:

Similar Artilces:

Tooltip & clistctrl
Hi NG, I have a CListCtrl and I have put it the LVS_EX_INFOTIP ! But I have a problem. Sometimes, items contain a lot of informations, and we don't show all of it beacuse it's too long. When the line is too long, I want it to be a multiline text! For example, I want to my tooltip, take 2 lines when 1 line is too short. Is it possible? How do I do ? Regards, Salim ...

Force password change
I am trying to force all users in my domain (OWA especially) to change their passwords at the next logon and then require them to change passwords every 90 days thereafter. I know from testing that I can get the local users to change their passwords through AD. What I am having trouble w/ is the OWA users. I need to be able to force a pw change. Will the group policy options in AD work for the OWA accounts too? All help is welcome. Thanks in advance for responding. Kelli -- kskate2 ------------------------------------------------------------------------ Posted via http://www.webse...

Forced to Upgrade!
Today I opened Money 2006 and tried to download my checking and savings account data. When I get this stupid banner that I must upgrade. F*$% You! I will not, this is a function of your software like printing! So I will upgrade to QUICKEN!!! Okay! A$$%*^%'s! Please tell us your data migration strategy. Oh, and Quicken enforces time limits on online services as well. If they didn't do it, Money wouldn't do it. "Jerry" <Jerry@discussions.microsoft.com> wrote in message news:C311AA9A-4B3C-4FFF-9D42-B7D26F2A009F@microsoft.com... > Today I opened Money 2006 a...

Using CListCtrl #4
When I get NM_CLICK notification message, Can I get index of previously selected List Item? ...

Forcing Odd Pages
Can I force an odd page every time a "Title" style is encountered (the "Title" style is what I used for my chapter titles)? :)Thanks, Lyndie ...

Forcing Distribution list to new server
I just moved to a new Exchange 2003 server following the procedures in knowledgebase Article 822931. This move was from one Exchange 2003 server to another 2003 server. When I stopped the Exchange services on the original machine, I started having problems with one distribution list being sent from the original box, not from the second box. I thought distribution lists were stored in active directory. How can I force this list to come from the new Exchange server. I know it is coming from the first machine because of the header information in outlook. If you stopped Exchange se...

Forcing a view to be the active view
Hello! I have an SDI application that has a splitter window with two views. The first view is an CFormView and the second is a CView. I want the CFormView to always be the Active view. Even if the user selects the CView. How do I accomplish this? // Anders Anders Eriksson wrote: > Hello! > > I have an SDI application that has a splitter window with two views. The > first view is an CFormView and the second is a CView. I want the CFormView > to always be the Active view. Even if the user selects the CView. > > How do I accomplish this? > > // Anders I'd ...

Force GP to save changed field on Vendor Maintenance form
I am changing a field in PM_Vendor_Maintenance table buffer. I want GP to save those entries in the table. How can I force GP to save the form? When I make similar change on RM_Customer_Maintenance table buffer on Customer Maintenance form, I change the '(L) Form Changed' field of window RM_Customer_Maintenance of form RM_Customer_Maintenance. This forces GP to save the changed table buffer when the form closes. Is there any similar field on Vendor Maintenance form? Thanks. ------=_NextPart_0001_1A6F6232 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi There If u...

CListCtrl #7
Hello, I am trying to create a CListCtrl that has 4 columns in report mode. The first 3 columns need to be bitmaps and the 4th column needs to be text. I can get the first column set to a bitmap but the next two subitems will not display the bitmaps. Anyone have a solution to this problem?? Thanks in advance! ...

Force user to enter an item from a list box
Hi, I have a bounded form that has a dropdown list called "Type", this dropdown list can be left blank(is not a required field to submit the form) , but my cocern is that is if the list needs to be used, then the user should only be able to select from the list and not type a third option like my users have been doing How do I enforce this? I appreciate your sugestions You are using a list box, you can't type anything into it. You are saying list box, but I think you really are using a Combo Box. If that is the case, you use the Not In List event to tell the user to us...

force
...

How to force saveas instead of save with CDocument
I have a problem with how to force saveas instead of save document. Thanks, Volodia. ...

Displaying images in CListCtrl
Hi, I have a Report-style CListCtrl and I need to display an image in the second column of the list control. Calling SetItem() by specifying the image index from the ListCtrl's imagelist member and the subitem index corresponding to the second column does not work. I can only get the image to display in the first column, and I dont want the image there. Would appreciate any help in this regard. Thanks Gautham You're going to have to derive you're own class from CListCtrl and draw it yourself. Here are a couple of links to articles where they use bitmaps in CListCtrls that ma...

CListCtrl inserting an item
Hi I have my list control being populated and nicely working from my scrollbar and page up/down buttons. The problem I have is, that when I click an item it gets erased. I had thought that maybe I could retrieve the LV_ITEM information, but I am not totally sure how to retrieve my LV_ITEM struct from my list control. I have tried doing a hit test and getting the information with GetItem(LV_ITEM*) from the acquired item number, but this doesnt get populated in any way. Any help guys? Secondly, is it possible to use the LV_ITEM lParam member to store an address of data, so that it can be...

SHGetFIleInfo: shell icon list for CListCtrl icons
THis sample is should get the default icon for the ".zip" extension then use it in a list control. When executed, the target contol shows the text item ("virtual.zip"), but no image. SHFILEINFO sfi; HIMAGELIST hil; ZeroMemory(&sfi,sizeof(sfi)); hil = (HIMAGELIST)SHGetFileInfo(".zip", FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_USEFILEATTRIBUTES|SHGFI_ICON); // hil now contains the handle to the system image list // containing the large icon images. /...

Outlook 2003 & cmd process forcing processor to 100%
I have narrowed a problem down to Outlook 2003 opening cmd in processes and forcing the processor close to 100% and making any program until using Task Manager and ending the cmd process. I have scanned for viruses with 2 different programs, run Adaware and Spybot Search and Destroy and found nothing. This problem only occurs when using Outlook 2003. I am using Windows XPSP2 (beta) , Problem was occuring before SP2 for XP. Appreciate any help Does is also happen when you start Outlook in safe mode with the /safe switch? -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft ...

Printing Reports: Force A4 Format 07-19-07
hello! i am having trouble forcing a report to be in the A4 format when sending to the printer. it happens all the time that the report get send with the format 'letter' which causes the printer to stop and request for paper in letter format. the report i generate totally fits in the A4 format but it won't work the way i want it to! this is pretty annoying because i always have to manually push a button on the printer so that the report can be printed. is there a way through any preferences or vba code to make this work ? maybe someone can help me or give me a hint. thanks in adv...

Hiding a row in CListCtrl
This has been asked on a few different posts, but I hope I can add a different spin to the question. I need to hide a row in CListCtrl rather than delete/insert a row. I realize hiding a row isn't supported, but has anybody successfully simulated a hidden row, such as setting the height of a row to zero? Thanks, Jared jared_hagel@hotmail.com wrote: > I need to hide a row in CListCtrl rather than delete/insert a row. I > realize hiding a row isn't supported, but has anybody successfully > simulated a hidden row, such as setting the height of a row to zero? Why not "sim...

how to scroll a ClistCtrl
How can I scroll a ClistCtrl by programamtion ? mosfet a �crit : > How can I scroll a ClistCtrl by programamtion ? Actually my question is a bit more complex. I have a CDialog app with a a few controls and a CListCtrl on it. My CListCtrl doesn't fit in the dialog so there is a vertical scrollbar. When I click on UP/DOWN key the focus moves from a controls and when it arrives on my CListCtrl cursor moves from line to line while I would like to scroll the listctrl create listbox with noscroll and modify the style property on activate message. "mosfet" <richom.v@free.fr...

How to insert an image in 2nd column of a CListCtrl.
Hi How do I insert an image in a column( any column other than the first one) of a ClistCtrl? Is it possible? At present I am setting LV_ITEMs iSubItem to the column number but it still inserts it in the first column. :( . Here is the Sample code that I have been using. lvitem.mask = LVIF_TEXT;//Sets the mask type (Text Type) lvitem.state = 0; lvitem.stateMask = 0; lvitem.iItem = nPos;//Sets the position of the row in the list lvitem.pszText = (LPSTR) pText; //Some text lvitem.iSubItem = 0; nIndex = m_lctlRearrangeTyreList.InsertItem ( &lvitem) ; for (int i = 1; i < nNoOfCo...

Changing CListCtrl Report View Line Height
Is it possible to change the height of a line in the CListCtrl report view? If so, how? I don't need to make each line a different height (although that would be nice); just changing the global height would be sufficient. Thanks. I don't know how to do it directly, but I know of a "hack" that should work. The ClistCtrl adjusts to height of a row so as to accommodate an image at the head of the row. So, call SetImageList and pass in a CImageList that contains a transparent image of the desired height, and maybe only one pixel wide so that there's not an unnatural spa...

force new page criteria
My report shows monthly meeting information [date, event, location, time, etc] grouped/sorted by date, then time. How can I get the report to start a new page for each week, beginning on Mondays? I just have the table of information and the report, no query. Thanks!! Create a query from your table and add a calculate field. TheMonday: DateAdd("d", vbmonday - DatePart("w", [MeetDate]), [MeetDate]) That will create a date field that is the Monday of the week the date is in. Then add a Group to your sorting an grouping for TheMonday. Set the Force New Page property i...

CListCtrl question: dock columns to right
Hi, I have a CListCtrl which is a child of a resizable dialog. (The list control changes its size when the dialog is resizing). I need that the columns of the list will always be aligned to the right. All the columns (accept the first) have a fixed size. In order to achieve this behaviour I catch the WM_SIZE event of the list control and call to SetColumnWidth of the first column. The width that I set to the first column is the width of the list control minus the sum of the width of all other columns. (see code at the end of the question). Generally it works fine, but I get the most strange be...

Forced Archiving
I'm going to try this again. We have Exchange std 2003 and do not want to go to the premium version for the cost reason. We are getting to the ceiling on the exchange database size. I don't want to delete any old mail but am willing to archive it to .pst files so it is out of the exchange database. I looked at outlk11.adm as a way to manage/control this centrally. I enabled and set the autoarchive option. When I tested this it had the effect of pushing out the default autoarchive parameters to the users. HOWEVER, it does not force these default parameters to apply to each individ...

Hide the Gridline for a cell in CListCtrl ??
Hi: I have a CListCtrl with gridlines turned on. Just wonder, is there a way to remove or hide the grid line for a particular cell? Thanks Polaris ...