Click here to Skip to main content
16,005,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Programmatic control of mouse cursor Pin
El'Cachubrey2-Dec-03 4:36
El'Cachubrey2-Dec-03 4:36 
Generalwriting in a file Pin
karteek2-Dec-03 0:53
karteek2-Dec-03 0:53 
GeneralRe: writing in a file Pin
BaldwinMartin2-Dec-03 1:09
BaldwinMartin2-Dec-03 1:09 
GeneralRe: writing in a file Pin
karteek2-Dec-03 1:15
karteek2-Dec-03 1:15 
GeneralRe: writing in a file Pin
judo2-Dec-03 1:53
judo2-Dec-03 1:53 
GeneralRe: writing in a file Pin
BaldwinMartin2-Dec-03 2:12
BaldwinMartin2-Dec-03 2:12 
GeneralRe: writing in a file Pin
David Crow2-Dec-03 3:20
David Crow2-Dec-03 3:20 
QuestionDeleting listbox item jumps to top? Pin
Moak2-Dec-03 0:43
Moak2-Dec-03 0:43 
Hi,
when I delete a listbox item it seams the top index is set to 0, is this a normal behaviour? Can I switch this off or is there any good workaround?

Thanks for help, Moak

Here is a little MFC code snippet to produce the effect:
<br />
BOOL CTest1Dlg::OnInitDialog()<br />
{<br />
    CDialog::OnInitDialog();<br />
<br />
    for(int t=1;t<20;++t) // fill listbox<br />
    {<br />
        CString sText;<br />
        sText.Format("listbox line %d", t);<br />
        m_list.AddString(sText);<br />
    }<br />
	m_list.SendMessage(WM_VSCROLL, SB_BOTTOM, NULL); //scroll to bottom<br />
<br />
	return TRUE;<br />
}<br />
<br />
void CTest1Dlg::OnButton1() <br />
{<br />
    m_list.DeleteString(0); //delete an entry, annoying jump to top happens here<br />
	<br />
}<br />

AnswerRe: Deleting listbox item jumps to top? Pin
BaldwinMartin2-Dec-03 0:48
BaldwinMartin2-Dec-03 0:48 
AnswerRe: Deleting listbox item jumps to top? Pin
includeh102-Dec-03 0:50
includeh102-Dec-03 0:50 
GeneralRe: Deleting listbox item jumps to top? Pin
Moak2-Dec-03 1:00
Moak2-Dec-03 1:00 
GeneralRe: Deleting listbox item jumps to top? Pin
Moak2-Dec-03 1:09
Moak2-Dec-03 1:09 
GeneralXP style Pin
viliam2-Dec-03 0:00
viliam2-Dec-03 0:00 
GeneralRe: XP style Pin
Chris Morrison7-Dec-03 7:54
Chris Morrison7-Dec-03 7:54 
GeneralSlow Editor in VC+ 6.0 Pin
BadJerry1-Dec-03 23:50
BadJerry1-Dec-03 23:50 
GeneralRe: Slow Editor in VC+ 6.0 Pin
VC++ Boy2-Dec-03 1:44
VC++ Boy2-Dec-03 1:44 
GeneralRe: Slow Editor in VC+ 6.0 Pin
BadJerry2-Dec-03 1:56
BadJerry2-Dec-03 1:56 
GeneralRe: Slow Editor in VC+ 6.0 Pin
Brian Shifrin2-Dec-03 5:50
Brian Shifrin2-Dec-03 5:50 
GeneralRe: Slow Editor in VC+ 6.0 Pin
BadJerry2-Dec-03 7:11
BadJerry2-Dec-03 7:11 
Generalkey sound Pin
viliam1-Dec-03 23:48
viliam1-Dec-03 23:48 
GeneralRe: key sound Pin
David Crow2-Dec-03 9:53
David Crow2-Dec-03 9:53 
GeneralRe: key sound Pin
viliam2-Dec-03 22:30
viliam2-Dec-03 22:30 
GeneralChanging COLORREF to RGB Pin
harinat1-Dec-03 23:41
harinat1-Dec-03 23:41 
GeneralRe: Changing COLORREF to RGB Pin
Steve S1-Dec-03 23:44
Steve S1-Dec-03 23:44 
GeneralRe: Changing COLORREF to RGB Pin
BaldwinMartin2-Dec-03 1:04
BaldwinMartin2-Dec-03 1:04 

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.