Click here to Skip to main content
15,902,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Difference between malloc and LocalAlloc Pin
Member 2214801-Jan-04 21:57
Member 2214801-Jan-04 21:57 
GeneralRe: Difference between malloc and LocalAlloc Pin
Tibor Blazko2-Jan-04 0:40
Tibor Blazko2-Jan-04 0:40 
Generalflex.exe Pin
murali_utr1-Jan-04 20:50
murali_utr1-Jan-04 20:50 
GeneralRe: flex.exe Pin
murali_utr1-Jan-04 20:57
murali_utr1-Jan-04 20:57 
Generalproblem in windows programming...please help Pin
sam_mou1-Jan-04 20:12
sam_mou1-Jan-04 20:12 
GeneralRe: problem in windows programming...please help Pin
Marek Grzenkowicz1-Jan-04 21:03
Marek Grzenkowicz1-Jan-04 21:03 
Generalselection of .lib as per the client Pin
utkarsharma1-Jan-04 18:31
utkarsharma1-Jan-04 18:31 
GeneralGetting two listboxes to track quicker Pin
shultas1-Jan-04 16:58
shultas1-Jan-04 16:58 
Hello all.

I have two listboxes in my program (side by side) that I am storing different data in. I want it so that when you click inside one of the listboxes, the other one "tracks it", meaning if I click on item #1 in listbox1, I want to instantly select item #1 in listbox2.

Currently, I am doing it this way:

void CMyTestAppDlg::OnLbnSelchangeList1()
{
int curSel = m_ListBox.GetCurSel();
m_ListBox2.SetCurSel(curSel);
}

( I also do the same code for the changeList2() )

This method works for me, the only problem is that it is slower than I had hoped. (When I click on one of the listboxes, it takes a good half second or so before the other one "catches up"). I am wondering if there is some other way of "linking" the listboxes so that the tracking is instant? (I know it's a long shot, but worth the question anyways Smile | :)

BTW: If I use the UP/DOWN arrow to move the selection in one of the listboxes, the tracking is instant and looks beautiful. I am guessing that the additional bit of overhead in processing the mouse click is what is slowing down the tracking process.


Thanks!


GeneralRe: Getting two listboxes to track quicker Pin
Gary R. Wheeler2-Jan-04 4:18
Gary R. Wheeler2-Jan-04 4:18 
GeneralRe: Getting two listboxes to track quicker Pin
shultas2-Jan-04 11:01
shultas2-Jan-04 11:01 
GeneralRe: Getting two listboxes to track quicker Pin
Gary R. Wheeler2-Jan-04 13:56
Gary R. Wheeler2-Jan-04 13:56 
Generalcolon operation Pin
FlyingDancer1-Jan-04 16:31
FlyingDancer1-Jan-04 16:31 
GeneralRe: colon operation Pin
Ted Ferenc1-Jan-04 21:57
Ted Ferenc1-Jan-04 21:57 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 0:22
FlyingDancer2-Jan-04 0:22 
GeneralRe: colon operation Pin
Ted Ferenc2-Jan-04 0:32
Ted Ferenc2-Jan-04 0:32 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 1:28
FlyingDancer2-Jan-04 1:28 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 2:22
FlyingDancer2-Jan-04 2:22 
GeneralRe: colon operation Pin
Ted Ferenc2-Jan-04 2:53
Ted Ferenc2-Jan-04 2:53 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 16:48
FlyingDancer2-Jan-04 16:48 
GeneralRe: colon operation Pin
Prakash Nadar1-Jan-04 22:14
Prakash Nadar1-Jan-04 22:14 
GeneralRe: colon operation Pin
FlyingDancer2-Jan-04 2:17
FlyingDancer2-Jan-04 2:17 
GeneralRe: colon operation Pin
Jörgen Sigvardsson2-Jan-04 8:45
Jörgen Sigvardsson2-Jan-04 8:45 
GeneralRe: colon operation Pin
Roger Wright2-Jan-04 12:44
professionalRoger Wright2-Jan-04 12:44 
GeneralRe: colon operation Pin
Jörgen Sigvardsson2-Jan-04 12:47
Jörgen Sigvardsson2-Jan-04 12:47 
GeneralZModem Pin
Nandiator1-Jan-04 15:45
Nandiator1-Jan-04 15:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.