Click here to Skip to main content
15,893,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionchange the program's entry point function Pin
LiYS26-Apr-08 3:56
LiYS26-Apr-08 3:56 
GeneralRe: change the program's entry point function Pin
Saurabh.Garg26-Apr-08 18:30
Saurabh.Garg26-Apr-08 18:30 
Questionfont problem Pin
trioum26-Apr-08 1:19
trioum26-Apr-08 1:19 
GeneralRe: font problem Pin
Hamid_RT26-Apr-08 4:16
Hamid_RT26-Apr-08 4:16 
GeneralRe: font problem Pin
trioum27-Apr-08 22:01
trioum27-Apr-08 22:01 
GeneralRe: font problem Pin
phanindra varma28-Apr-08 0:33
phanindra varma28-Apr-08 0:33 
GeneralRe: font problem Pin
Hamid_RT28-Apr-08 5:04
Hamid_RT28-Apr-08 5:04 
QuestionIs MSDN wrong? Pin
zengkun10026-Apr-08 1:09
zengkun10026-Apr-08 1:09 
Here is a code snippet about CListCtrl from MSDN. And I don't think MSDN give correct code.

   // Get indexes of the first and last visible items in <br />
   // the listview control.<br />
   int index = m_myListCtrl.GetTopIndex();<br />
   int last_visible_index = index + m_myListCtrl.GetCountPerPage();<br />
   if (last_visible_index > m_myListCtrl.GetItemCount())<br />
       last_visible_index = m_myListCtrl.GetItemCount();<br />
<br />
   // Loop until number visible items has been reached.<br />
   while (index <= last_visible_index)<br />
   {<br />
       //……<br />
<br />
       // Get the next item in listview control.<br />
       index++;<br />
   }


IMO, variable last_visible_index is more than one. So the While statement should be written like this:
while (index < last_visible_index)
Am I wrong? Or MSND?

Thank you all! Smile | :)

A Chinese VC++ programmer

GeneralRe: Is MSDN wrong? Pin
Mukesh Kumar26-Apr-08 2:26
Mukesh Kumar26-Apr-08 2:26 
GeneralRe: Is MSDN wrong? Pin
zengkun10026-Apr-08 2:42
zengkun10026-Apr-08 2:42 
GeneralRe: Is MSDN wrong? Pin
ThatsAlok1-Jul-09 0:02
ThatsAlok1-Jul-09 0:02 
GeneralRe: Is MSDN wrong? Pin
CPallini26-Apr-08 2:48
mveCPallini26-Apr-08 2:48 
GeneralRe: Is MSDN wrong? Pin
zengkun10026-Apr-08 2:54
zengkun10026-Apr-08 2:54 
GeneralRe: Is MSDN wrong? Pin
CPallini26-Apr-08 4:12
mveCPallini26-Apr-08 4:12 
GeneralRe: Is MSDN wrong? Pin
zengkun10026-Apr-08 6:06
zengkun10026-Apr-08 6:06 
GeneralRe: Is MSDN wrong? Pin
peterchen27-Apr-08 0:40
peterchen27-Apr-08 0:40 
GeneralRe: Is MSDN wrong? Pin
zengkun10027-Apr-08 16:35
zengkun10027-Apr-08 16:35 
GeneralRe: Is MSDN wrong? Pin
peterchen27-Apr-08 20:30
peterchen27-Apr-08 20:30 
QuestionAbout AUTONUMBERS AND UPDATION Pin
savitri26-Apr-08 0:31
savitri26-Apr-08 0:31 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
Christian Graus26-Apr-08 0:50
protectorChristian Graus26-Apr-08 0:50 
QuestionRe: About AUTONUMBERS AND UPDATION Pin
savitri26-Apr-08 2:07
savitri26-Apr-08 2:07 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
MANISH RASTOGI26-Apr-08 2:19
MANISH RASTOGI26-Apr-08 2:19 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
savitri26-Apr-08 2:23
savitri26-Apr-08 2:23 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
MANISH RASTOGI26-Apr-08 2:27
MANISH RASTOGI26-Apr-08 2:27 
GeneralRe: About AUTONUMBERS AND UPDATION Pin
savitri26-Apr-08 2:36
savitri26-Apr-08 2:36 

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.