Click here to Skip to main content
15,889,661 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: StreamWriter - How can I write as a .CSV file ? Pin
J_E_D_I2-Mar-09 5:10
J_E_D_I2-Mar-09 5:10 
GeneralRe: StreamWriter - How can I write as a .CSV file ? Pin
J_E_D_I2-Mar-09 5:16
J_E_D_I2-Mar-09 5:16 
GeneralRe: StreamWriter - How can I write as a .CSV file ? Pin
Luc Pattyn2-Mar-09 5:19
sitebuilderLuc Pattyn2-Mar-09 5:19 
AnswerRe: StreamWriter - How can I write as a .CSV file ? Pin
N a v a n e e t h1-Mar-09 14:03
N a v a n e e t h1-Mar-09 14:03 
GeneralNewLine Pin
J_E_D_I2-Mar-09 5:26
J_E_D_I2-Mar-09 5:26 
AnswerRe: StreamWriter - How can I write as a .CSV file ? Pin
Jens.Bonnermann6-Mar-09 7:01
Jens.Bonnermann6-Mar-09 7:01 
AnswerRe: StreamWriter - How can I write as a .CSV file ? Pin
Jens.Bonnermann6-Mar-09 7:02
Jens.Bonnermann6-Mar-09 7:02 
QuestionConverting System.Drawing.Image to a DirectDrawSurface Pin
bfoo7527-Feb-09 13:04
bfoo7527-Feb-09 13:04 
Hi - I've saved a System.Drawing.Image to a file stream from C# and now I'm trying to load it in Managed C++...

I have some other data that is included inbetween the bitmap data in the filestream and when I blt the surface to the backbuffer, the surface thats supposed to hold the bitmap data is entirely black. :-/

Tiles[i].Init(lpDD7);   //Creates the DD7 Surface 
bool Walkable = br->ReadBoolean();
MemoryStream^ ms = gcnew MemoryStream(br->ReadBytes(TILE_BITMAPSIZE));
Image^ bm = Image::FromStream(ms, true, true);
Graphics^ g = Graphics::FromImage(bm);
IntPtr^ hDC = g->GetHdc();
HDC src = static_cast<HDC>(hDC->ToPointer());
HDC dst;

Tiles[i].Walkable = Walkable;
Tiles[i].Surface->GetDC(&dst);
BitBlt(dst, 0, 0, 32, 32, src, 0, 0, SRCCOPY);
Tiles[i].Surface->ReleaseDC(dst);


Heres the INIT function

void Init(LPDIRECTDRAW7 lpDD7)
{
    DDSURFACEDESC2 ddsd;
    INIT_DXSTRUCT(ddsd);
    ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH;
    ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
    ddsd.dwWidth = 32;
    ddsd.dwHeight = 32;
    HRESULT hr = lpDD7->CreateSurface(&ddsd, &Surface, NULL);
}


Thanks.
AnswerRe: Converting System.Drawing.Image to a DirectDrawSurface Pin
bfoo7528-Feb-09 13:57
bfoo7528-Feb-09 13:57 
QuestionReading the registry once and storing the values Pin
naveen_bij27-Feb-09 10:04
naveen_bij27-Feb-09 10:04 
QuestionRe: Reading the registry once and storing the values Pin
Mark Salsbery28-Feb-09 7:45
Mark Salsbery28-Feb-09 7:45 
AnswerRe: Reading the registry once and storing the values Pin
naveen_bij28-Feb-09 22:57
naveen_bij28-Feb-09 22:57 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 13:27
N a v a n e e t h1-Mar-09 13:27 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 17:40
naveen_bij1-Mar-09 17:40 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 20:59
N a v a n e e t h1-Mar-09 20:59 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 21:30
naveen_bij1-Mar-09 21:30 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 21:57
N a v a n e e t h1-Mar-09 21:57 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 22:17
naveen_bij1-Mar-09 22:17 
QuestionAfter CLR conversion debugging is slow. Pin
KASR126-Feb-09 17:25
KASR126-Feb-09 17:25 
AnswerRe: After CLR conversion debugging is slow. Pin
Mark Salsbery27-Feb-09 6:24
Mark Salsbery27-Feb-09 6:24 
AnswerRe: After CLR conversion debugging is slow. Pin
Luc Pattyn27-Feb-09 7:02
sitebuilderLuc Pattyn27-Feb-09 7:02 
Questionifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I26-Feb-09 1:19
J_E_D_I26-Feb-09 1:19 
AnswerRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h26-Feb-09 3:42
N a v a n e e t h26-Feb-09 3:42 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I27-Feb-09 10:03
J_E_D_I27-Feb-09 10:03 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h1-Mar-09 13:25
N a v a n e e t h1-Mar-09 13:25 

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.