how to find an item in a list control?

hi all,

In a list Control how to find an item. If it is found then the item should 
be highlighted.

how to do this?

i wrote the following code but its not working
what's wrong in the code?

LVFINDINFO info;

int nIndex;

info.flags = LVFI_PARTIAL|LVFI_STRING;

info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;

sprintf(st,"%d",m_ListCtrl.GetItemCount());

MessageBox(st,"Count");

for(int i=0;i < m_ListCtrl.GetItemCount();i++)

{

if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )

{

m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);

}

}

thanks and regards
james


0
leomani001 (16)
6/2/2005 9:10:12 AM
vc.mfc 33608 articles. 0 followers. Follow

15 Replies
1026 Views

Similar Articles

[PageSpeed] 7

james wrote:
> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>
> {
>
> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>
> {
>
> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>
> }
>
> }

This appears to be calling SetItemState only when nIndex == -1, which
means that the FindItem call was unsuccessful. This is probably the
opposite of what you meant so -

if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)

may be worth a try.

Regards,

Hugh

0
hughgray (73)
6/2/2005 10:08:21 AM
i tried that also but still not working
<hughgray@hotmail.co.uk> wrote in message 
news:1117706901.828957.316460@z14g2000cwz.googlegroups.com...
> james wrote:
>> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>>
>> {
>>
>> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>>
>> {
>>
>> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>>
>> }
>>
>> }
>
> This appears to be calling SetItemState only when nIndex == -1, which
> means that the FindItem call was unsuccessful. This is probably the
> opposite of what you meant so -
>
> if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)
>
> may be worth a try.
>
> Regards,
>
> Hugh
> 


0
leomani001 (16)
6/2/2005 10:12:15 AM

hughgray@hotmail.co.uk wrote:
> james wrote:
> > for(int i=0;i < m_ListCtrl.GetItemCount();i++)
> >
> > {
> >
> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
> >
> > {
> >
> > m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >
> > }
> >
> > }
>
> This appears to be calling SetItemState only when nIndex == -1, which
> means that the FindItem call was unsuccessful. This is probably the
> opposite of what you meant so -
>
> if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)
>
> may be worth a try.
>
> Regards,
>
> Hugh

I dont think you need the for loop either. Tip - use the debugger to
step through your code and see exactly what is going on.

Hugh

0
hughgray (73)
6/2/2005 10:12:51 AM
i tried that also but still its not working
james
<hughgray@hotmail.co.uk> wrote in message 
news:1117707171.800531.327230@g14g2000cwa.googlegroups.com...
>
>
> hughgray@hotmail.co.uk wrote:
>> james wrote:
>> > for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>> >
>> > {
>> >
>> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>> >
>> > {
>> >
>> > m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> >
>> > }
>> >
>> > }
>>
>> This appears to be calling SetItemState only when nIndex == -1, which
>> means that the FindItem call was unsuccessful. This is probably the
>> opposite of what you meant so -
>>
>> if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)
>>
>> may be worth a try.
>>
>> Regards,
>>
>> Hugh
>
> I dont think you need the for loop either. Tip - use the debugger to
> step through your code and see exactly what is going on.
>
> Hugh
> 


0
6/2/2005 10:17:32 AM
i tried that but still not working

<hughgray@hotmail.co.uk> wrote in message 
news:1117707171.800531.327230@g14g2000cwa.googlegroups.com...
>
>
> hughgray@hotmail.co.uk wrote:
>> james wrote:
>> > for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>> >
>> > {
>> >
>> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>> >
>> > {
>> >
>> > m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> >
>> > }
>> >
>> > }
>>
>> This appears to be calling SetItemState only when nIndex == -1, which
>> means that the FindItem call was unsuccessful. This is probably the
>> opposite of what you meant so -
>>
>> if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)
>>
>> may be worth a try.
>>
>> Regards,
>>
>> Hugh
>
> I dont think you need the for loop either. Tip - use the debugger to
> step through your code and see exactly what is going on.
>
> Hugh
> 


0
6/2/2005 10:23:02 AM
yes hugh i tried ur suggestion it's still not working
<hughgray@hotmail.co.uk> wrote in message 
news:1117707171.800531.327230@g14g2000cwa.googlegroups.com...
>
>
> hughgray@hotmail.co.uk wrote:
>> james wrote:
>> > for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>> >
>> > {
>> >
>> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>> >
>> > {
>> >
>> > m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> >
>> > }
>> >
>> > }
>>
>> This appears to be calling SetItemState only when nIndex == -1, which
>> means that the FindItem call was unsuccessful. This is probably the
>> opposite of what you meant so -
>>
>> if ((nIndex = m_ListCtrl.FindItem(&info)) != -1)
>>
>> may be worth a try.
>>
>> Regards,
>>
>> Hugh
>
> I dont think you need the for loop either. Tip - use the debugger to
> step through your code and see exactly what is going on.
>
> Hugh
> 


0
leomani001 (16)
6/2/2005 10:30:19 AM
Manikandan wrote:
> i tried that also but still its not working
> james

The following works for me. Simple dialog app with a list control an
edit box and a button. The button handler is as follows -

void CListSearchTestDlg::OnBnClickedButton1()
{
	LVFINDINFO info;
	info.flags = LVFI_PARTIAL|LVFI_STRING;
	CString str;
	m_EditCtrl.GetWindowText(str);
	info.psz = str;

	int nIndex;

	if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
	{
		m_ListCtrl.SetItemState(nIndex, LVIS_SELECTED, LVIS_SELECTED);
		m_ListCtrl.SetFocus(); 
	}
}

0
hughgray (73)
6/2/2005 10:38:34 AM
Try changing the == to !=

if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
{
      m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
}


If I was writing this I would write it like so

If you want to find all and highlight

   LVFINDINFO info;
   info.flags = LVFI_PARTIAL|LVFI_STRING;
   info.psz = (LPCTSTR) Text;

   int nIndex = -1;

   while(1)
   {
      if((nIndex = m_List.FindItem(&info,nIndex)) != -1 )
      {
         m_List.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
      }
      else
      {
         break;
      }
   }

AliR.

"james" <leomani001@hotmail.com> wrote in message
news:OupfzL1ZFHA.3596@tk2msftngp13.phx.gbl...
> hi all,
>
> In a list Control how to find an item. If it is found then the item should
> be highlighted.
>
> how to do this?
>
> i wrote the following code but its not working
> what's wrong in the code?
>
> LVFINDINFO info;
>
> int nIndex;
>
> info.flags = LVFI_PARTIAL|LVFI_STRING;
>
> info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;
>
> sprintf(st,"%d",m_ListCtrl.GetItemCount());
>
> MessageBox(st,"Count");
>
> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>
> {
>
> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>
> {
>
> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>
> }
>
> }
>
> thanks and regards
> james
>
>
>


0
AliR1 (391)
6/2/2005 4:00:52 PM
hi alir
i tried your code but it's still not working.
what to do? pls give some example codes

thanks and regards
james

"AliR." <AliR@newsgroup.nospam> wrote in message 
news:429f2d4b$1_5@alt.athenanews.com...
> Try changing the == to !=
>
> if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
> {
>      m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> }
>
>
> If I was writing this I would write it like so
>
> If you want to find all and highlight
>
>   LVFINDINFO info;
>   info.flags = LVFI_PARTIAL|LVFI_STRING;
>   info.psz = (LPCTSTR) Text;
>
>   int nIndex = -1;
>
>   while(1)
>   {
>      if((nIndex = m_List.FindItem(&info,nIndex)) != -1 )
>      {
>         m_List.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>      }
>      else
>      {
>         break;
>      }
>   }
>
> AliR.
>
> "james" <leomani001@hotmail.com> wrote in message
> news:OupfzL1ZFHA.3596@tk2msftngp13.phx.gbl...
>> hi all,
>>
>> In a list Control how to find an item. If it is found then the item 
>> should
>> be highlighted.
>>
>> how to do this?
>>
>> i wrote the following code but its not working
>> what's wrong in the code?
>>
>> LVFINDINFO info;
>>
>> int nIndex;
>>
>> info.flags = LVFI_PARTIAL|LVFI_STRING;
>>
>> info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;
>>
>> sprintf(st,"%d",m_ListCtrl.GetItemCount());
>>
>> MessageBox(st,"Count");
>>
>> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>>
>> {
>>
>> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>>
>> {
>>
>> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>>
>> }
>>
>> }
>>
>> thanks and regards
>> james
>>
>>
>>
>
> 


0
leomani001 (16)
6/3/2005 5:32:36 AM
What is it not doing?

What is FindItem returning?

AliR.

"james" <leomani001@hotmail.com> wrote in message
news:uNTVp2$ZFHA.3620@TK2MSFTNGP09.phx.gbl...
> hi alir
> i tried your code but it's still not working.
> what to do? pls give some example codes
>
> thanks and regards
> james
>
> "AliR." <AliR@newsgroup.nospam> wrote in message
> news:429f2d4b$1_5@alt.athenanews.com...
> > Try changing the == to !=
> >
> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
> > {
> >      m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> > }
> >
> >
> > If I was writing this I would write it like so
> >
> > If you want to find all and highlight
> >
> >   LVFINDINFO info;
> >   info.flags = LVFI_PARTIAL|LVFI_STRING;
> >   info.psz = (LPCTSTR) Text;
> >
> >   int nIndex = -1;
> >
> >   while(1)
> >   {
> >      if((nIndex = m_List.FindItem(&info,nIndex)) != -1 )
> >      {
> >         m_List.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >      }
> >      else
> >      {
> >         break;
> >      }
> >   }
> >
> > AliR.
> >
> > "james" <leomani001@hotmail.com> wrote in message
> > news:OupfzL1ZFHA.3596@tk2msftngp13.phx.gbl...
> >> hi all,
> >>
> >> In a list Control how to find an item. If it is found then the item
> >> should
> >> be highlighted.
> >>
> >> how to do this?
> >>
> >> i wrote the following code but its not working
> >> what's wrong in the code?
> >>
> >> LVFINDINFO info;
> >>
> >> int nIndex;
> >>
> >> info.flags = LVFI_PARTIAL|LVFI_STRING;
> >>
> >> info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;
> >>
> >> sprintf(st,"%d",m_ListCtrl.GetItemCount());
> >>
> >> MessageBox(st,"Count");
> >>
> >> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
> >>
> >> {
> >>
> >> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
> >>
> >> {
> >>
> >> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >>
> >> }
> >>
> >> }
> >>
> >> thanks and regards
> >> james
> >>
> >>
> >>
> >
> >
>
>
>


0
AliR1 (391)
6/3/2005 2:42:06 PM
FindItem returns the index of the item.

mani

"AliR." <AliR@newsgroup.nospam> wrote in message 
news:42a06c57$1_1@alt.athenanews.com...
> What is it not doing?
>
> What is FindItem returning?
>
> AliR.
>
> "james" <leomani001@hotmail.com> wrote in message
> news:uNTVp2$ZFHA.3620@TK2MSFTNGP09.phx.gbl...
>> hi alir
>> i tried your code but it's still not working.
>> what to do? pls give some example codes
>>
>> thanks and regards
>> james
>>
>> "AliR." <AliR@newsgroup.nospam> wrote in message
>> news:429f2d4b$1_5@alt.athenanews.com...
>> > Try changing the == to !=
>> >
>> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
>> > {
>> >      m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> > }
>> >
>> >
>> > If I was writing this I would write it like so
>> >
>> > If you want to find all and highlight
>> >
>> >   LVFINDINFO info;
>> >   info.flags = LVFI_PARTIAL|LVFI_STRING;
>> >   info.psz = (LPCTSTR) Text;
>> >
>> >   int nIndex = -1;
>> >
>> >   while(1)
>> >   {
>> >      if((nIndex = m_List.FindItem(&info,nIndex)) != -1 )
>> >      {
>> >         m_List.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> >      }
>> >      else
>> >      {
>> >         break;
>> >      }
>> >   }
>> >
>> > AliR.
>> >
>> > "james" <leomani001@hotmail.com> wrote in message
>> > news:OupfzL1ZFHA.3596@tk2msftngp13.phx.gbl...
>> >> hi all,
>> >>
>> >> In a list Control how to find an item. If it is found then the item
>> >> should
>> >> be highlighted.
>> >>
>> >> how to do this?
>> >>
>> >> i wrote the following code but its not working
>> >> what's wrong in the code?
>> >>
>> >> LVFINDINFO info;
>> >>
>> >> int nIndex;
>> >>
>> >> info.flags = LVFI_PARTIAL|LVFI_STRING;
>> >>
>> >> info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;
>> >>
>> >> sprintf(st,"%d",m_ListCtrl.GetItemCount());
>> >>
>> >> MessageBox(st,"Count");
>> >>
>> >> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
>> >>
>> >> {
>> >>
>> >> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
>> >>
>> >> {
>> >>
>> >> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
>> >>
>> >> }
>> >>
>> >> }
>> >>
>> >> thanks and regards
>> >> james
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>
> 


0
6/4/2005 8:02:13 AM
yes its working , but if i try to find another item,previously
found item also gets highlighted. how to stop that.

regards
manikandan


<hughgray@hotmail.co.uk> wrote in message 
news:1117708714.653465.153590@g47g2000cwa.googlegroups.com...
> Manikandan wrote:
>> i tried that also but still its not working
>> james
>
> The following works for me. Simple dialog app with a list control an
> edit box and a button. The button handler is as follows -
>
> void CListSearchTestDlg::OnBnClickedButton1()
> {
> LVFINDINFO info;
> info.flags = LVFI_PARTIAL|LVFI_STRING;
> CString str;
> m_EditCtrl.GetWindowText(str);
> info.psz = str;
>
> int nIndex;
>
> if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
> {
> m_ListCtrl.SetItemState(nIndex, LVIS_SELECTED, LVIS_SELECTED);
> m_ListCtrl.SetFocus();
> }
> }
> 


0
6/4/2005 8:32:45 AM
ur code finds the item,but if i try to find another item
previously found item also get selected how to rectify that.
mani
<hughgray@hotmail.co.uk> wrote in message 
news:1117708714.653465.153590@g47g2000cwa.googlegroups.com...
> Manikandan wrote:
>> i tried that also but still its not working
>> james
>
> The following works for me. Simple dialog app with a list control an
> edit box and a button. The button handler is as follows -
>
> void CListSearchTestDlg::OnBnClickedButton1()
> {
> LVFINDINFO info;
> info.flags = LVFI_PARTIAL|LVFI_STRING;
> CString str;
> m_EditCtrl.GetWindowText(str);
> info.psz = str;
>
> int nIndex;
>
> if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
> {
> m_ListCtrl.SetItemState(nIndex, LVIS_SELECTED, LVIS_SELECTED);
> m_ListCtrl.SetFocus();
> }
> }
> 


0
leomani001 (16)
6/4/2005 8:47:50 AM

Manikandan wrote:
> yes its working , but if i try to find another item,previously
> found item also gets highlighted. how to stop that.

Deselect everything before doing a find.

Hugh

0
hughgray (73)
6/6/2005 7:48:39 AM
If FindItem is really returning the index of the item then what is the
problem!

AliR.
P.S. Who is having the problem anyway, james or mani!?


"Manikandan" <manikandan_r@hotmail.com> wrote in message
news:OwsZ8uNaFHA.3132@TK2MSFTNGP09.phx.gbl...
> FindItem returns the index of the item.
>
> mani
>
> "AliR." <AliR@newsgroup.nospam> wrote in message
> news:42a06c57$1_1@alt.athenanews.com...
> > What is it not doing?
> >
> > What is FindItem returning?
> >
> > AliR.
> >
> > "james" <leomani001@hotmail.com> wrote in message
> > news:uNTVp2$ZFHA.3620@TK2MSFTNGP09.phx.gbl...
> >> hi alir
> >> i tried your code but it's still not working.
> >> what to do? pls give some example codes
> >>
> >> thanks and regards
> >> james
> >>
> >> "AliR." <AliR@newsgroup.nospam> wrote in message
> >> news:429f2d4b$1_5@alt.athenanews.com...
> >> > Try changing the == to !=
> >> >
> >> > if((nIndex = m_ListCtrl.FindItem(&info,-1)) != -1 )
> >> > {
> >> >      m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >> > }
> >> >
> >> >
> >> > If I was writing this I would write it like so
> >> >
> >> > If you want to find all and highlight
> >> >
> >> >   LVFINDINFO info;
> >> >   info.flags = LVFI_PARTIAL|LVFI_STRING;
> >> >   info.psz = (LPCTSTR) Text;
> >> >
> >> >   int nIndex = -1;
> >> >
> >> >   while(1)
> >> >   {
> >> >      if((nIndex = m_List.FindItem(&info,nIndex)) != -1 )
> >> >      {
> >> >         m_List.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >> >      }
> >> >      else
> >> >      {
> >> >         break;
> >> >      }
> >> >   }
> >> >
> >> > AliR.
> >> >
> >> > "james" <leomani001@hotmail.com> wrote in message
> >> > news:OupfzL1ZFHA.3596@tk2msftngp13.phx.gbl...
> >> >> hi all,
> >> >>
> >> >> In a list Control how to find an item. If it is found then the item
> >> >> should
> >> >> be highlighted.
> >> >>
> >> >> how to do this?
> >> >>
> >> >> i wrote the following code but its not working
> >> >> what's wrong in the code?
> >> >>
> >> >> LVFINDINFO info;
> >> >>
> >> >> int nIndex;
> >> >>
> >> >> info.flags = LVFI_PARTIAL|LVFI_STRING;
> >> >>
> >> >> info.psz = (LPCTSTR) str;  //fd.m_strEditCtrl;
> >> >>
> >> >> sprintf(st,"%d",m_ListCtrl.GetItemCount());
> >> >>
> >> >> MessageBox(st,"Count");
> >> >>
> >> >> for(int i=0;i < m_ListCtrl.GetItemCount();i++)
> >> >>
> >> >> {
> >> >>
> >> >> if((nIndex = m_ListCtrl.FindItem(&info,-1)) == -1 )
> >> >>
> >> >> {
> >> >>
> >> >> m_ListCtrl.SetItemState(nIndex,LVIS_SELECTED,LVIS_SELECTED);
> >> >>
> >> >> }
> >> >>
> >> >> }
> >> >>
> >> >> thanks and regards
> >> >> james
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >
> >
>
>
>


0
AliR1 (391)
6/6/2005 3:04:09 PM
Reply:

Similar Artilces:

clip art in list box
i want to insert clip art into a drop list instead of text One word...Can't. Which technically is two words but you still can't... -- HTH... Jim Thomlinson "mrmatt67" wrote: > i want to insert clip art into a drop list instead of text ...

Outlook New Profile without opening mail icon from control panel. #2
Hello team, I am trying to create a new profile without opening control panel. In fact, I do not have privileges to open the control panel. Even I do not have privileges to open any .cpl file from windows\system32 folder. Whenever I try to open any cpl file, it gives me following error message: "The operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator" However, I want to create a new profile for Outlook, as my old profile is corrupted and I am unable to configure email account in the same profile. (Exchange email acc...

Finding data on subcustomers
We have our customers set up such that multiple meters (or subcustomers) have their invoices all roll into one master customer. On our invoices I can see the meter ID to know which sub it applies too. However, I am having trouble finding a way to initially display or sort the invoices (and payments) related to a subcustomer I would like to select using a number located in the User Defined "Tracking Number" field? Please help to tell me how to do so. ...

Finding a function call in queries
Does anyone know of a way to find if a function is being called from a query? Another words, I have a function that might be called from 1 or more queries in my DB and I am looking for a quick way to see which queries it is called from. With over 200 queries in my DB, it will take me some time to check them manually, and I have 2 functions to check. Is there a utility or something that will do this for me? Thanks! On Thu, 6 May 2010 15:57:01 -0700, cherman <cherman@discussions.microsoft.com> wrote: >Does anyone know of a way to find if a function is being calle...

Change events for all controls on a dialog
Is it possible to have a single method that handles all change notifications to text boxes on a dialog? I want to enable the OK button if any text box changes. The application I am porting to MFC has the following code in its dialog handling procedure: switch ( uMessage ) { case WM_COMMAND: // Enable the OK button only when changes are made if ( GET_WM_COMMAND_CMD( wparam, lparam ) == EN_CHANGE ) { Button_Enable( GetDlgItem( hdlg, IDOK ), TRUE ); break; } switch ( GET_WM_COMMAND_ID( wparam, lparam ) ) { // handle other commands } break; .... It seems that in ...

Find in an Exchange Environment
I currently have an issue throughout my entire environment with respects to the FIND tool in Outlook. We are unable to search for an mail that post Dates August 05. We are all running online opposed to cache. I believe it to be a exchange issue but am unsure!? Any Ideas? Dustin ...

Setup was unable to find instance of CRM services
This occours when I try to run the Sales for Outlook, CRM works fine on the same machine through IE. is your workstation and the crm server in the same domain? "Vignir" <anonymous@discussions.microsoft.com> wrote in message news:13a0c01c41ad7$b0162a70$a001280a@phx.gbl... > This occours when I try to run the Sales for Outlook, CRM > works fine on the same machine through IE. > ...

message " cannot save item " when trying to record new events
I get the message " cannot save item " displayed when trying to input new events,meetings, etc into my Microsoft Office Outlook 2003 calander page. Any help would be appreciate , I tried a few normal bypasses without success. Thanks Try resetting the view on the folder. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLET...

Updating Distribution Lists
Just upgraded with a new computer from Outlook XP to Outlook 2003. All Contacts and info appeared to migrate very well. Only problem now is with Distribution Lists which also migrated. But when I try "Update Now," it will not recognize the Contacts folder and wants to convert all recipients to non-Contact status. That means when I update a Contact with a new e-mail address it won't be updated in the Distribution List. I already tried. Any thoughts on how to get the list to recognize the Contacts? DL's never survive an import. You'll have to recreate them if you w...

Scattered Diagram using MS Chart Control
Hi, I have two questions using the ActiveX MSChart Control. Since there obviously is no documentation for Visual C++ I hope to find an answer here. I want to generate an XY chart. Displaying the chart I get a rather big problem. The values on the Y axis range from - 128 to +128, while the X-axis contains data that goes far beyond that range (>1000). Now when I plot the chart I get a long and thin graph, as if the display resolution is the same for the X and Y axis. But I want the graph to completely fill out the designated area, i.e. stretch the Y-axis until it fits. Does anybody ...

Selective Editing of Nickname list
Anyone know if there's anyway to selectively purge or add to the *.nk2 file that is built by outlook to autocomplete e-mail addresses? I know how to start from scratch but it sure would be nice to edit the list. Thanks John K To remove a single entry, * start a new message * type the partial name you want removed * when outlook suggests a name, use the arrow keys to highlight the entry and press the delete key /neo ps - steps above are for outlook 2002/2003. "John K" <anonymous@discussions.microsoft.com> wrote in message news:1e11201c45554$28f11ac0$a601280a@phx.gb...

trying to find duplicate occurances in a string
I was trying to find occurances of duplicate entries in a string something like this "1 + (2++34)-4*6/6*89" So at first I tried this String* str = S"1 + (2++34)-4*6/6*89"; int start; int at; int end; int count; end = str->Length; start = 0; count = 0; at = 0; while((start <= end) && (at > -1)) { count = end - start; at = str->IndexOf(S"++", start, count); if (at == -1) break; Console::Write(S"{0} ", __box( at)); start = at+1; } Console::WriteLine(); Then I realized...

sort list using vba
I'm new to VBA, and I need to sort a list of data (name, team color), and then make it into a new list of people on team purple and one list of people on team yellow. can anyone please help me? thanks Try recording a macro when you do it manually. You may get very close to what you want. But it might be easier to just apply data|filter to your whole range. Then you can filter by team color to just show the Purple team (Vikings???). One other option is to look at how others approached the problem... Both Debra Dalgleish and Ron de Bruin may have solutions for you: Debra's site...

Importing Vendor Item
Is IV00103 the only table I need to update if I want to import Vendor's Item? What is CURRNIDX field for? It is not Currency Index but when I change the currency under Item Vendor Maintenance, this value changes too. TIA, Sugih Yes, IV00103 is the table you need. Manually update the table properly and then get the value out of the CURRNI NDX field. It is a pointer to a GL account associatdd with multi-currency. -- Richard L. Whaley Author / Consultant / MVP 2006-2008 Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.Ac...

List of Missing checks for year or several months
Please tell me how I can run a report that will list only the missing checks from the register. Thanks. Great question. Hmmm. (Five minutes later he returns...) Nothing obvious appears to me. I know how I'd do it--since I don't see an obvious way to get there in Money--is that I'd pull the transactions for the account into Excel using MoneyLink. Then I'd sort by number, do some formula/copy/paste special values/ (repeat) stuff until I had it down to just unique check numbers. Then I'd do a formula looking for cases where the number is more than the previous number + 1. ...

Finding confidence interval
How do I find the CI in t-test analysis? How do you do it manually? "Dahliah2" wrote: > How do I find the CI in t-test analysis? I would like for it to be done automatically, but manually would be fine. "Barb R." wrote: > How do you do it manually? > > > "Dahliah2" wrote: > > > How do I find the CI in t-test analysis? ...

How to find matches, pairs of two SUMPRODUCT?
Dear all, I am facing the following challenge: a given table consists out of a couple of rows/columns the columns represent a cetain task, while the rows represent a certain group. The table is filled with a ranking from A-Z Goal is to find matching pairs within rows = how often occurs certain combination in a row!!! Then those results should be summed up ... the real example occupies more than 6 columns and has about 1000 rows, so it can not be transposed in Excel 2003 :-) e.g. sample table 1 2 3 4 5 6 1 A B C D 2 B F 3 A B 4 C D F 5 X Y Z 6 A C F X Y ...

Domain Controller Issue
We have a couple of DCs in our site along withan Exchange Server. We would like to be able to take down the first-in-site DC when some sort of maintenance is needed and have the other DC simply take over. But each time we take down the PDC Exchange throws a fit and we get dozens of errors in the event viewer. Here are some of the errors: EventID:8250 The Win32 API call 'DsGetDCNameW' returned error code [0x54b] The specified domain either does not exist or could not be contacted. The service could not be initialized. Make sure that the operating system was installed prope...

Help finding first payment date and amount
I have a simple table and I need help finding the first payment date and the amount payed. Here is the table CREATE TABLE [dbo].[Payments]( [MemberID] [nchar](10) NOT NULL, [PaymentDate] [datetime] NOT NULL, [Amount] [money] NULL, CONSTRAINT [PK_Payments] PRIMARY KEY CLUSTERED ( [MemberID] ASC, [PaymentDate] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] Here is some data to insert insert into payments values (101,'01-01-2009',20) insert into payment...

Customer Level Prices Changing After Additional Items Added to A Sale
Hello Ladies & Gents, Here's something wierd I have come across. If you define price levels for an item and then on the POS select a customer with a corresponding level and ring up that item, the item will show up with the level price and the bold font. However, if you ring up additional items that don't have price levels defined, the the price of the first item goes back to regular and the font changes back to normal! However, if you ring up all your items first and then select the customer, then items with price levels will be adjusted accordingly. Obviously, this is not...

Empty custom Address List in Outlook
I don't know if this is an Exchange or Outlook problem yet so I'll start here. I created a custom Address List in the Exchange System Manager. I previewed it, and it looks good. When I go into Outlook and switch to that List, it's empty. I checked the security and it's inheriting from the parent. So it has the same permissions as the default Address Lists. Any ideas? Exchange '03 SP1 on Server '03 SP1, using Outlook '02 SP3 Can you check in OWA and see if it's also empty? James Chong MCSE | M+, S+, MCTS, Security+ msexchangetips.blogspot.com mcoppa@gm...

Accessing Global Address List details with VBA
I have code that reads names from a local Distribution List and looks up the name in the Global Address List. The purpose is to retrieve a few of the details about the user that appear in the properties dialog box ... such as Street Address, City and State. My problem is that I only have Outlook 2003 which apparently does not have the GetExchangeUser object. How can I retrieve these pieces of information without the GetExchangeUser object? Here is my code so far ... which works as long as I have manually selected my local Distribution List. Thanks in advance for any help. ...

Calendar items are one hour ahead after migration (please help)
Hi All, I am in the process of migrating users from Notes to Exchange and I have noticed that all my entries in outlook after migratiion are one hour ahead from what they were in Notes. I have checked time zone settings (day light settings as well) on both servers and also on the clients (outlook and notes) just to be safe and all seems to be ok. I posted similar question before but the only asnwer I got back then was, not to perform migration in summer (common........). Please share your ideas or if you have run into the same problem, please share your experience and let me know what you ...

how to find last row of table and copy to another sheet
I have a spreadsheet with 2 tabs. 1 tab is 'input' with a user form that adds data in columns 'b' to 'i' on another tab called 'PSHCP'. This works great. the user presses a button on the input sheet and a user form comes up in which they input the data and it is added to the next row on the table on the PSHCP tab. What I would like to do is have that info that they and then added shown on the 'input' page. It would always keep the last row info shown so that before one goes in, they can see the last entry info. I am thinking that I could add this co...

Numbering a list of calculated Rows.......Advice Please
Can anyone advise me how to number the first column of my worksheet. I want the number to automatically increment when I enter the first cell of following row. I do not want this number to be entered manually. I need to be able to delete rows randomly and for the the row numbers to automatically renumber in numerical order with no numerical gaps. For example if I have a column 1,2,3,4,5, and delete 3, I would like the column to automatically renumber as 1234 and not 1,2,4,5. I hope I have explained myself correctly. I have a copy of Excel 2002 InsideOut, but can't find a method to do ...