Click here to Skip to main content
16,016,134 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: __property oddity Pin
Nish Nishant2-May-02 14:17
sitebuilderNish Nishant2-May-02 14:17 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 14:23
James T. Johnson2-May-02 14:23 
GeneralRe: __property oddity Pin
Nish Nishant2-May-02 14:29
sitebuilderNish Nishant2-May-02 14:29 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 14:34
James T. Johnson2-May-02 14:34 
GeneralRe: __property oddity Pin
Tom Archer2-May-02 14:33
Tom Archer2-May-02 14:33 
GeneralRe: __property oddity Pin
Nish Nishant2-May-02 14:47
sitebuilderNish Nishant2-May-02 14:47 
GeneralRe: __property oddity Pin
Tom Archer2-May-02 15:06
Tom Archer2-May-02 15:06 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 14:37
James T. Johnson2-May-02 14:37 
Here is the offending code

// ScreenSaverUtils.h
 
#pragma once
 
#pragma unmanaged
#include <windows.h>
 
#pragma managed
 
#using <System.dll>		// For System.Diagnostics.Debug class
 
using namespace System;
using namespace System::Drawing;
 
namespace ScreenSaverUtils
{
	public __gc class OptimizedBitmap : public IDisposable
	{
	private:
		OptimizedBitmap(void)
		{
		}
 
	public:
 
		OptimizedBitmap(Graphics *g, Bitmap *bmpToCopy ) : _disposed(false)
		{
			// Copy bitmap
		}
 
		~OptimizedBitmap(void)
		{
			Dispose();
		}
 
		void Dispose()
		{
			// Free resources
		}
 
		__property Graphics* get_Graphics()
		{
			System::Diagnostics::Debug::Assert(!_disposed);
 
			return Graphics::FromImage(bitmap);
		}
 
		__property Bitmap* get_Bitmap()
		{
			System::Diagnostics::Debug::Assert(!_disposed);
 
			return dynamic_cast<Bitmap*>(bitmap->Clone());
		}
 
	private:
		bool _disposed;
		HDC hdc;
		HBITMAP hbitmap;
		Graphics *graphics;
		Bitmap *bitmap;
	};
}
Thanks for everyone's help Smile | :)

[Edit: I'm no longer interested in using those two as properties because the original intent has changed; but I still want to know why its failing to compile Smile | :) ]

James

Simplicity Rules!
GeneralRe: __property oddity Pin
Neil Van Note2-May-02 20:45
Neil Van Note2-May-02 20:45 
GeneralRe: __property oddity Pin
James T. Johnson2-May-02 20:50
James T. Johnson2-May-02 20:50 
GeneralRe: __property oddity Pin
Neil Van Note2-May-02 21:26
Neil Van Note2-May-02 21:26 
GeneralRe: __property oddity Pin
Tom Archer3-May-02 4:14
Tom Archer3-May-02 4:14 
GeneralRe: __property oddity Pin
James T. Johnson3-May-02 4:44
James T. Johnson3-May-02 4:44 
GeneralRe: __property oddity Pin
Rama Krishna Vavilala3-May-02 4:28
Rama Krishna Vavilala3-May-02 4:28 
GeneralRe: __property oddity Pin
James T. Johnson3-May-02 4:48
James T. Johnson3-May-02 4:48 
GeneralRe: __property oddity Pin
Neil Van Note3-May-02 7:41
Neil Van Note3-May-02 7:41 
GeneralGeneral MC++ Info Pin
Brian Delahunty1-May-02 4:17
Brian Delahunty1-May-02 4:17 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:06
sitebuilderAlbert Pascual1-May-02 7:06 
GeneralRe: General MC++ Info Pin
Brian Delahunty1-May-02 7:31
Brian Delahunty1-May-02 7:31 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:34
sitebuilderAlbert Pascual1-May-02 7:34 
GeneralRe: General MC++ Info Pin
Brian Delahunty1-May-02 7:39
Brian Delahunty1-May-02 7:39 
GeneralRe: General MC++ Info Pin
Albert Pascual1-May-02 7:40
sitebuilderAlbert Pascual1-May-02 7:40 
GeneralRe: General MC++ Info Pin
Brian Delahunty3-May-02 2:21
Brian Delahunty3-May-02 2:21 
GeneralRe: General MC++ Info Pin
Michael P Butler1-May-02 22:51
Michael P Butler1-May-02 22:51 
GeneralRe: General MC++ Info Pin
Brian Delahunty3-May-02 2:22
Brian Delahunty3-May-02 2:22 

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.