Click here to Skip to main content
15,942,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 5:15
Sternocera2-Aug-07 5:15 
QuestionRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow2-Aug-07 5:17
David Crow2-Aug-07 5:17 
AnswerRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 5:19
Sternocera2-Aug-07 5:19 
QuestionRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow2-Aug-07 5:27
David Crow2-Aug-07 5:27 
AnswerRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 5:29
Sternocera2-Aug-07 5:29 
AnswerRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
led mike2-Aug-07 7:15
led mike2-Aug-07 7:15 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 7:21
Sternocera2-Aug-07 7:21 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
led mike2-Aug-07 7:31
led mike2-Aug-07 7:31 
Sternocera wrote:
it is from a codeproject tutorial.


Which one? Post a link.

Sternocera wrote:
Could you elaborate on why it is (potentially)such a bad idea?


The arg list is not infinite and the function relies on the number of columns matching the number of arguments. If they aren't, which appears to be what you are experiencing, I don't believe the test for NULL is not going to work because that is not how va_arg() works. I believe it will just keep reading memory beyond the end of what was actually provided by the caller.



GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 7:35
Sternocera2-Aug-07 7:35 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow2-Aug-07 8:05
David Crow2-Aug-07 8:05 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 10:08
Sternocera2-Aug-07 10:08 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow2-Aug-07 10:44
David Crow2-Aug-07 10:44 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 22:13
Sternocera2-Aug-07 22:13 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow3-Aug-07 2:43
David Crow3-Aug-07 2:43 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera2-Aug-07 22:24
Sternocera2-Aug-07 22:24 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
David Crow3-Aug-07 2:45
David Crow3-Aug-07 2:45 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Sternocera3-Aug-07 2:46
Sternocera3-Aug-07 2:46 
GeneralRe: MFC: CListCtrl derived class, "creportctrl" tutorial problem Pin
Haroon Sarwar2-Aug-07 18:26
Haroon Sarwar2-Aug-07 18:26 
QuestionGet controlls of a dialog if handle is known? Pin
robshere2-Aug-07 4:52
robshere2-Aug-07 4:52 
AnswerRe: Get controlls of a dialog if handle is known? Pin
Hamid_RT2-Aug-07 5:05
Hamid_RT2-Aug-07 5:05 
QuestionRe: Get controlls of a dialog if handle is known? Pin
David Crow2-Aug-07 5:18
David Crow2-Aug-07 5:18 
QuestionDisplay detection Pin
Trollslayer2-Aug-07 3:55
mentorTrollslayer2-Aug-07 3:55 
AnswerRe: Display detection Pin
Randor 2-Aug-07 7:58
professional Randor 2-Aug-07 7:58 
Questionhow to write a program that would swap the left and right audio channel Pin
rajneshmalik2-Aug-07 3:45
rajneshmalik2-Aug-07 3:45 
AnswerRe: how to write a program that would swap the left and right audio channel Pin
Russell'2-Aug-07 4:02
Russell'2-Aug-07 4:02 

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.