|
I'm creating many buttons dynamically using this to initialize it:
m_Icon[ndx].Create(_T(""), WS_CHILD WS_VISIBLE , CRect(0, 0, 0, 0), this,IDC_BTN );
Then later I'm adding in other information and then putting it on the screen:
m_Icon[0].SetTooltipText((LPCTSTR)ps1,true);
m_Icon[0].ActivateTooltip(true);
m_Icon[0].SetIcon(IDI_ICON1,NULL);
m_Icon[0].MoveWindow(iXpos ,(yscalestart + yscalediff*(profile.counter[0].iStationNum -10)),29,33,TRUE);
Any ideas on why the tool tip doesn't work?
I've used tool tips before using static items and it was never a problem
Thanks,
Jim
|
|
|
|
|
Hi,
You need to relayevent to the tooltip control.
Otherwise, how tooltip control will know when & where to show what?
Also, whether you are using CTooltipCtrl? If so,
then you have to add some more stuff also like addtool, etc..
regards
~Hari~
|
|
|
|
|
Thanks for the reply.
I'm using the CButtonST class that has the relay message in it. I've posted this to the Articles section...
|
|
|
|
|
I'd like to convert project file from visual c++.net to visual c++ 6.0
What should I do ?
Thank you in advanced
|
|
|
|
|
|
|
hi,
is the someone who knows the actual version of the mscomm32.ocx control?
where can i search for a new release?
i have problems with the parity option. after an undefined time of work the control sends only the parity replace char to my software. when i close and start the port again the problem is cleared until it occurs again. this problem happens mainly on laptops. i checked the correct bit stream with an oscilloscope. the bit stream is at any time correct. did you recognize the same problem?
Dr-Kuulun
|
|
|
|
|
In Windows Explorer, right-click on the file and select Properties. You can then see what the version is.
|
|
|
|
|
According to: this[^]
the latest version of mscomm32.ocx is 6.0.81.69
-Sean
----
Shag a Lizard
|
|
|
|
|
Hi
i subclassed CEdit to CMyEdit.
I know when i have a lowercase char. but the problem is to make it uppercase. I checked the string.h but didn't find a proper function to work with (in VC5).
void CMyEdit::OnChar(UINT nChar, ...)
{
..
if ( bLowercase )
{
//Convert char to uppercase
//nChar 'a' -> 'A' needs to be in uppercase
}
// let char. through
CEdit::Onchar(nChar, nRepCnt, nFlags);
}
|
|
|
|
|
Can you just use the ES_UPPERCASE style? If not, use toupper(), or CString::MakeUpper().
|
|
|
|
|
well yes. i found that style earlier and checked it on.
But in my onChar() routine i didn't allow lower cases, i just allowed it and now everything works.
thanks
|
|
|
|
|
check _strupr
or CString::MakeUpper
or convert ur char to an int then add to it 20 hex or 32 dec
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
CString::MakeUpper()
CodeTheDreams();
|
|
|
|
|
How to delete entire row in CListCtrl? I can't find a function which returns the index of the selected row(item).
|
|
|
|
|
use member function
DeleteAllItems();
simple
CodeTheDreams();
|
|
|
|
|
But it deletes all the items(rows)!!!
I want to delete just a single row
|
|
|
|
|
CListCtrl::DeleteItem
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi,
You do the following,
m_LCtrlPtr->DeleteItem(m_LCtrlPtr->GetSelectionMark());
This will delete the currently selected item in the list control.
GetSelectionMark() is to retrieve the currently selected item.
hope this helps!!
regards
~Hari~
|
|
|
|
|
Hi,
if you need to find the selected item in a listcontrol, there is no function, to do it.
In your code for deleting a row you may use this to find the desired index
<br />
long lx;<br />
LV_ITEM lvItem;<br />
lvItem.iItem = 0;<br />
lvItem.iSubItem = 0;<br />
lvItem.mask = 0;<br />
lvItem.state = 0;<br />
lvItem.stateMask = 0;<br />
<br />
if(m_VarForListCtrl.GetSelectedCount() != 1 ) return;<br />
<br />
int iItem = m_VarForListCtrl.GetTopIndex();<br />
int iMax = m_VarForListCtrl.GetCountPerPage();<br />
for( int i = iItem; i < ( iItem + iMax ); i++)<br />
{ lvItem.iItem = i;<br />
lvItem.iSubItem = 0;<br />
lvItem.mask = LVIF_STATE;<br />
lvItem.state = LVIS_SELECTED;<br />
lvItem.stateMask = LVIS_SELECTED;<br />
if( !m_VarForListCtrl.GetItem(&lvItem) )<br />
{ return;
}<br />
if( lvItem.state ) break;
}<br />
if( !lvItem.state ) return;
m_VarForListCtrl.DeleteItem(lvItem.iItem);<br />
This code wil find only the selected item if it's visible.
You must adapt the code, if you are searching the whole list.
Was it this you were looking for?
G. Steudtel
|
|
|
|
|
How to select the entire row in CListControl when clicking on one of its items?
|
|
|
|
|
hi,
i think it is impossible. you can only select one or more cols.
Dr-Kuulun
|
|
|
|
|
DWORD dwstyle = m_myListControl.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE,0,0);
dwstyle |= LVS_EX_FULLROWSELECT;
m_myListControl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwstyle);
this is the hard way, but in VC5 it was the only way to get it work properly.
hope it helps
Greetings
Jens
|
|
|
|
|
try this
DWORD dwStyle = m_listctrl.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE);
dwStyle |= LVS_EX_FULLROWSELECT;
m_listctrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)dwStyle);
i hope this works
ahmed
|
|
|
|
|
use
API
ListView_SetExtendedListViewStyle(handle of ur listctrl, LVS_EX_FULLROWSELECT)
or CListCtrl Member Function
SetExtendedStyle(LVS_EX_FULLROWSELECT)
CodeTheDreams();
|
|
|
|