Click here to Skip to main content
15,917,631 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: performing operations when assigning to class member in C++ Pin
Cedric Moonen28-Sep-09 2:18
Cedric Moonen28-Sep-09 2:18 
GeneralRe: performing operations when assigning to class member in C++ Pin
CPallini28-Sep-09 2:34
mveCPallini28-Sep-09 2:34 
GeneralRe: performing operations when assigning to class member in C++ Pin
Acutura28-Sep-09 19:44
Acutura28-Sep-09 19:44 
GeneralRe: performing operations when assigning to class member in C++ Pin
CPallini28-Sep-09 20:50
mveCPallini28-Sep-09 20:50 
AnswerRe: performing operations when assigning to class member in C++ Pin
CPallini28-Sep-09 2:12
mveCPallini28-Sep-09 2:12 
QuestionProblem using Windows FindFirstFile function and its related ones Pin
Danzy8328-Sep-09 1:02
Danzy8328-Sep-09 1:02 
AnswerRe: Problem using Windows FindFirstFile function and its related ones Pin
CPallini28-Sep-09 2:03
mveCPallini28-Sep-09 2:03 
Questionhow to Split a String ? [modified] Pin
omarko_hjw28-Sep-09 1:00
omarko_hjw28-Sep-09 1:00 
QuestionRe: how to Split Numeric , and String ? Pin
CPallini28-Sep-09 2:02
mveCPallini28-Sep-09 2:02 
AnswerRe: how to Split Numeric , and String ? Pin
Maximilien28-Sep-09 2:51
Maximilien28-Sep-09 2:51 
AnswerRe: how to Split a String ? Pin
CPallini28-Sep-09 3:02
mveCPallini28-Sep-09 3:02 
QuestionHow to use Windows FindFirstFile function and its related ones Pin
Danzy8328-Sep-09 0:59
Danzy8328-Sep-09 0:59 
QuestionRe: How to use Windows FindFirstFile function and its related ones Pin
CPallini28-Sep-09 1:59
mveCPallini28-Sep-09 1:59 
QuestionHow can create cab file for pocket pc? Pin
Le@rner28-Sep-09 0:29
Le@rner28-Sep-09 0:29 
AnswerRe: How can create cab file for pocket pc? Pin
«_Superman_»28-Sep-09 6:01
professional«_Superman_»28-Sep-09 6:01 
Questionbasic c++ question Pin
tasumisra28-Sep-09 0:05
tasumisra28-Sep-09 0:05 
AnswerRe: basic c++ question Pin
CPallini28-Sep-09 0:45
mveCPallini28-Sep-09 0:45 
AnswerRe: basic c++ question Pin
Cedric Moonen28-Sep-09 0:56
Cedric Moonen28-Sep-09 0:56 
GeneralRe: basic c++ question Pin
tasumisra28-Sep-09 1:08
tasumisra28-Sep-09 1:08 
Questionproblem extending datetimepicker -> moved discussion in managed c++ forum Pin
carlo.andreoli27-Sep-09 21:53
carlo.andreoli27-Sep-09 21:53 
googling around i found some extension to the default datetimepicker 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++

modified on Monday, September 28, 2009 4:12 AM

AnswerRe: problem extending datetimepicker Pin
CPallini27-Sep-09 22:00
mveCPallini27-Sep-09 22:00 
QuestionTons of Variable Declarations Pin
Herboren27-Sep-09 20:38
Herboren27-Sep-09 20:38 
AnswerRe: Tons of Variable Declarations Pin
«_Superman_»27-Sep-09 20:58
professional«_Superman_»27-Sep-09 20:58 
GeneralRe: Tons of Variable Declarations Pin
Herboren27-Sep-09 21:01
Herboren27-Sep-09 21:01 
AnswerRe: Tons of Variable Declarations Pin
CPallini27-Sep-09 20:59
mveCPallini27-Sep-09 20:59 

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.