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

Managed C++/CLI

 
GeneralRe: using unmanaged lib in managed class Pin
carlo.andreoli1-Oct-09 3:34
carlo.andreoli1-Oct-09 3:34 
GeneralRe: using unmanaged lib in managed class Pin
Richard MacCutchan1-Oct-09 5:21
mveRichard MacCutchan1-Oct-09 5:21 
Questioncli::array<any^>^ Array Pin
jashimu29-Sep-09 7:12
jashimu29-Sep-09 7:12 
AnswerRe: cli::array<any^>^ Array Pin
N a v a n e e t h29-Sep-09 17:58
N a v a n e e t h29-Sep-09 17:58 
GeneralRe: cli::array<any^>^ Array Pin
jashimu30-Sep-09 4:32
jashimu30-Sep-09 4:32 
GeneralRe: cli::array<any^>^ Array Pin
Richard MacCutchan30-Sep-09 22:18
mveRichard MacCutchan30-Sep-09 22:18 
GeneralRe: cli::array<any^>^ Array Pin
jashimu1-Oct-09 6:50
jashimu1-Oct-09 6:50 
Questionproblem extending datetimepicker Pin
carlo.andreoli27-Sep-09 21:50
carlo.andreoli27-Sep-09 21:50 
googling around i found some extension to the default tiempicker to make backcolor suitable...what i have till now is:

namespace primoAlpha {

	using namespace System;
	using namespace System::Drawing;
	using namespace System::Windows::Forms;
	using namespace System::Security::Permissions;

	public ref class extendedDateTimePicker : DateTimePicker
	{
	private:		
		Color _BackColor;
	public:
		property Color BackColor  
		{
			virtual Color get() override {
				return _BackColor;
			}
			virtual void set(Color value) override	{
				_BackColor = value;
				Invalidate();
			}
		}

	protected:
		[SecurityPermission(SecurityAction::Demand, Flags=SecurityPermissionFlag::UnmanagedCode)]
		virtual void WndProc( Message% m ) override
		{	
			if ( m.Msg == (int) 0x0014 ) {	//WM_ERASEBKGND
				
				Graphics ^g = Graphics::FromHdc(m.WParam);
				g->FillRectangle(gcnew SolidBrush(_BackColor),
				ClientRectangle);
				g->ReleaseHdc();
				//g->Dispose();
				return;
				
			}
			WndProc(m);
		}
	};

}


the code compile with no error but when i run it gives me an
"An unhandled exception of type 'System.StackOverflowException' occurred in primoAlpha.exe"

any help is really apprecieted, i'm a noob in c++
AnswerRe: problem extending datetimepicker Pin
Luc Pattyn28-Sep-09 0:30
sitebuilderLuc Pattyn28-Sep-09 0:30 
GeneralRe: problem extending datetimepicker Pin
carlo.andreoli28-Sep-09 1:52
carlo.andreoli28-Sep-09 1:52 
GeneralRe: problem extending datetimepicker Pin
Luc Pattyn28-Sep-09 2:08
sitebuilderLuc Pattyn28-Sep-09 2:08 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 2:33
N a v a n e e t h28-Sep-09 2:33 
GeneralRe: problem extending datetimepicker Pin
Luc Pattyn28-Sep-09 2:41
sitebuilderLuc Pattyn28-Sep-09 2:41 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 2:43
N a v a n e e t h28-Sep-09 2:43 
GeneralRe: problem extending datetimepicker Pin
Luc Pattyn28-Sep-09 2:56
sitebuilderLuc Pattyn28-Sep-09 2:56 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 2:31
N a v a n e e t h28-Sep-09 2:31 
GeneralRe: problem extending datetimepicker Pin
carlo.andreoli28-Sep-09 3:12
carlo.andreoli28-Sep-09 3:12 
GeneralRe: problem extending datetimepicker Pin
N a v a n e e t h28-Sep-09 4:04
N a v a n e e t h28-Sep-09 4:04 
GeneralRe: problem extending datetimepicker Pin
carlo.andreoli28-Sep-09 20:37
carlo.andreoli28-Sep-09 20:37 
QuestionCommunicating with main GUI thread from worker thread Pin
LetsMond15-Sep-09 1:25
LetsMond15-Sep-09 1:25 
AnswerRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 2:17
N a v a n e e t h15-Sep-09 2:17 
GeneralRe: Communicating with main GUI thread from worker thread Pin
LetsMond15-Sep-09 3:53
LetsMond15-Sep-09 3:53 
GeneralRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 16:13
N a v a n e e t h15-Sep-09 16:13 
AnswerRe: Communicating with main GUI thread from worker thread Pin
N a v a n e e t h15-Sep-09 2:25
N a v a n e e t h15-Sep-09 2:25 
AnswerRe: Communicating with main GUI thread from worker thread Pin
dybs15-Sep-09 18:32
dybs15-Sep-09 18:32 

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.