Click here to Skip to main content
15,898,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Tons of Variable Declarations Pin
Herboren27-Sep-09 21:02
Herboren27-Sep-09 21:02 
QuestionRe: Tons of Variable Declarations Pin
CPallini27-Sep-09 21:14
mveCPallini27-Sep-09 21:14 
QuestionUsing font in CPaintDC VC6 [solved] Pin
Eka Candra27-Sep-09 20:33
Eka Candra27-Sep-09 20:33 
AnswerRe: Using font in CPaintDC VC6 Pin
«_Superman_»27-Sep-09 20:36
professional«_Superman_»27-Sep-09 20:36 
NewsRe: Using font in CPaintDC VC6 Pin
Eka Candra27-Sep-09 20:54
Eka Candra27-Sep-09 20:54 
GeneralRe: Using font in CPaintDC VC6 Pin
Iain Clarke, Warrior Programmer28-Sep-09 19:58
Iain Clarke, Warrior Programmer28-Sep-09 19:58 
Questionchange color and font push button VC6 Pin
Eka Candra27-Sep-09 20:23
Eka Candra27-Sep-09 20:23 
AnswerRe: change color and font push button VC6 Pin
«_Superman_»27-Sep-09 20:34
professional«_Superman_»27-Sep-09 20:34 
GeneralRe: change color and font push button VC6 Pin
Eka Candra27-Sep-09 20:48
Eka Candra27-Sep-09 20:48 
GeneralRe: change color and font push button VC6 Pin
«_Superman_»27-Sep-09 20:55
professional«_Superman_»27-Sep-09 20:55 
GeneralRe: change color and font push button VC6 Pin
Eka Candra27-Sep-09 21:14
Eka Candra27-Sep-09 21:14 
GeneralRe: change color and font push button VC6 Pin
«_Superman_»28-Sep-09 5:49
professional«_Superman_»28-Sep-09 5:49 

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.