Click here to Skip to main content
15,906,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A toolbar question Pin
Neville Franks19-Mar-03 4:09
Neville Franks19-Mar-03 4:09 
GeneralRe: A toolbar question Pin
User 988519-Mar-03 4:23
User 988519-Mar-03 4:23 
GeneralCombobox dropdown showing wrong selection Pin
Richard Jones19-Mar-03 2:49
Richard Jones19-Mar-03 2:49 
GeneralShellExecuteEx & WaitForSingleObject Pin
Brian Delahunty19-Mar-03 2:21
Brian Delahunty19-Mar-03 2:21 
GeneralRe: ShellExecuteEx & WaitForSingleObject Pin
Joel Lucsy19-Mar-03 2:37
Joel Lucsy19-Mar-03 2:37 
GeneralRe: ShellExecuteEx & WaitForSingleObject Pin
Brian Delahunty19-Mar-03 2:45
Brian Delahunty19-Mar-03 2:45 
GeneralButton and Text control Pin
wavewave19-Mar-03 2:07
wavewave19-Mar-03 2:07 
GeneralSubclassing Pin
Mathias S.19-Mar-03 1:24
Mathias S.19-Mar-03 1:24 
I need a class that creates the controller I need dynamically. When this class is created it loads up some data from a file and depending on what it says in that file the controller should be a CListCtrl or a CEdit.

So I thought I create a dummy controller inherited directly from CWnd let my dialog creates it and then this controller will load the data in the file and then creates the CListCtrl or CEdit and subclass it to my own controller.

It should work, but I don't get it to. I think I might have misunderstood some things with subclassing.

In OnInitDialog I have

// Created Dynamically for now
m_DummyController.create( this , CRect( x , y, w , h ) , 1 );
And then DummyController is doing its stuff (checking what kind of controller it wants to transform into)

CMyDummyCtrl::BeAEditCtrl()
{
	CEdit pEdit = new CEdit;
		
	// Should I really run this ?
	if( pEdit->create( WS_CHILD | WS_BORDER | WS_VISIBLE , CRect( x , y, w , h ) , GetParent() , 0 ) )
	{
		pEdit->SubclassWindow( this->GetSafeHwnd() );
	}
}
This doesn't work at all. I tried different versions of it so I’m properly going at this problem the wrong way. So any help with be good.

/Mathias
GeneralRe: Subclassing Pin
Joan M19-Mar-03 3:54
professionalJoan M19-Mar-03 3:54 
GeneralRe: Subclassing - Better explanation of problem Pin
Mathias S.19-Mar-03 4:19
Mathias S.19-Mar-03 4:19 
GeneralEvents fired by CHotKeyCtrl Pin
dabs19-Mar-03 1:00
dabs19-Mar-03 1:00 
GeneralRe: Events fired by CHotKeyCtrl Pin
Michael Dunn19-Mar-03 6:46
sitebuilderMichael Dunn19-Mar-03 6:46 
GeneralVisual Source Safe - Help Need Quickly!! Pin
IrishSonic19-Mar-03 0:58
IrishSonic19-Mar-03 0:58 
GeneralUsing Classes created in C++ in a VB.Net program Pin
Brynn19-Mar-03 0:43
Brynn19-Mar-03 0:43 
GeneralRe: Using Classes created in C++ in a VB.Net program Pin
AlexO19-Mar-03 3:36
AlexO19-Mar-03 3:36 
QuestionHow to open a browser window Pin
Jump_Around19-Mar-03 0:38
Jump_Around19-Mar-03 0:38 
AnswerRe: How to open a browser window Pin
Johnny ²19-Mar-03 0:45
Johnny ²19-Mar-03 0:45 
GeneralRe: How to open a browser window Pin
Jump_Around19-Mar-03 1:10
Jump_Around19-Mar-03 1:10 
AnswerRe: How to open a browser window Pin
savaNT19-Mar-03 4:35
savaNT19-Mar-03 4:35 
QuestionLooking for a VC++ Sample for Wake up on LAN (WOL)? Pin
Ralph18-Mar-03 23:48
Ralph18-Mar-03 23:48 
AnswerRe: Looking for a VC++ Sample for Wake up on LAN (WOL)? Pin
Scott H. Settlemier19-Mar-03 1:22
Scott H. Settlemier19-Mar-03 1:22 
GeneralRe: Looking for a VC++ Sample for Wake up on LAN (WOL)? Pin
Anonymous19-Mar-03 6:36
Anonymous19-Mar-03 6:36 
Generalreferences VS. data members Pin
Makover18-Mar-03 23:37
Makover18-Mar-03 23:37 
GeneralRe: references VS. data members Pin
Dave Bryant19-Mar-03 8:49
Dave Bryant19-Mar-03 8:49 
GeneralRe: references VS. data members Pin
Makover19-Mar-03 8:55
Makover19-Mar-03 8:55 

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.