Click here to Skip to main content
15,907,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Richard MacCutchan4-Sep-14 21:15
mveRichard MacCutchan4-Sep-14 21:15 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
sma123#4-Sep-14 22:24
sma123#4-Sep-14 22:24 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Richard MacCutchan4-Sep-14 23:58
mveRichard MacCutchan4-Sep-14 23:58 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
sma123#5-Sep-14 3:14
sma123#5-Sep-14 3:14 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Richard MacCutchan5-Sep-14 3:28
mveRichard MacCutchan5-Sep-14 3:28 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Albert Holguin5-Sep-14 5:29
professionalAlbert Holguin5-Sep-14 5:29 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
jschell5-Sep-14 10:02
jschell5-Sep-14 10:02 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Albert Holguin8-Sep-14 2:50
professionalAlbert Holguin8-Sep-14 2:50 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Stefan_Lang11-Sep-14 3:05
Stefan_Lang11-Sep-14 3:05 
GeneralRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Albert Holguin11-Sep-14 3:26
professionalAlbert Holguin11-Sep-14 3:26 
AnswerRe: Is Edit and continue support available for X64 application in VS2010 ? Pin
Randor 5-Sep-14 10:29
professional Randor 5-Sep-14 10:29 
QuestionReturn bidimensional array Pin
_Flaviu4-Sep-14 2:07
_Flaviu4-Sep-14 2:07 
QuestionRe: Return bidimensional array Pin
David Crow4-Sep-14 3:33
David Crow4-Sep-14 3:33 
AnswerRe: Return bidimensional array Pin
_Flaviu4-Sep-14 21:31
_Flaviu4-Sep-14 21:31 
GeneralRe: Return bidimensional array Pin
Freak304-Sep-14 21:36
Freak304-Sep-14 21:36 
GeneralRe: Return bidimensional array Pin
_Flaviu4-Sep-14 22:38
_Flaviu4-Sep-14 22:38 
AnswerRe: Return bidimensional array Pin
CPallini4-Sep-14 3:35
mveCPallini4-Sep-14 3:35 
AnswerRe: Return bidimensional array Pin
nv34-Sep-14 23:55
nv34-Sep-14 23:55 
I would neither store nor return the bitmap data in that way. What you are creating here is a so-called "ragged" array, in which each row can have a different length. In a bitmap this luxury is not needed, all rows are of equal length by definition. Therefore a one-dimensional array is good enough and in some regards even superior.

a) A one-dimensional array can be allocated in one chunk (whereas your ragged array needs N allocations, N being the number of rows)

b) A one-dimensional array does not incur the overhead that comes with a ragged array, which is easily 3 x 64bits per row.

To access the members of the one-dimensional array in a 2D fashion, simply use the algorithm:
C++
index of pixel (x, y) = x + y*pixelsPerRow

As a return value for your access function I would suggest you use a simple pointer (const COLORREF*).
For the caller to know how to access that 1D array you should provide addition access functions for the number or rows and number of columns.
GeneralRe: Return bidimensional array Pin
_Flaviu5-Sep-14 0:25
_Flaviu5-Sep-14 0:25 
GeneralRe: Return bidimensional array Pin
nv35-Sep-14 1:19
nv35-Sep-14 1:19 
GeneralRe: Return bidimensional array Pin
_Flaviu5-Sep-14 2:43
_Flaviu5-Sep-14 2:43 
GeneralRe: Return bidimensional array Pin
_Flaviu9-Sep-14 1:22
_Flaviu9-Sep-14 1:22 
GeneralRe: Return bidimensional array Pin
nv39-Sep-14 20:30
nv39-Sep-14 20:30 
QuestionWhat if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
shaktikanta3-Sep-14 22:43
shaktikanta3-Sep-14 22:43 
AnswerRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
CPallini3-Sep-14 23:09
mveCPallini3-Sep-14 23:09 

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.