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

C / C++ / MFC

 
GeneralRe: Forget ALSO... Pin
jmkhael7-Jun-04 4:50
jmkhael7-Jun-04 4:50 
GeneralNavigating through CForimView controls Pin
dart136-Jun-04 23:59
dart136-Jun-04 23:59 
GeneralRe: Navigating through CForimView controls Pin
Johan Rosengren7-Jun-04 6:10
Johan Rosengren7-Jun-04 6:10 
GeneralRe: Navigating through CForimView controls Pin
dart138-Jun-04 1:07
dart138-Jun-04 1:07 
GeneralRe: Navigating through CForimView controls Pin
Johan Rosengren8-Jun-04 1:24
Johan Rosengren8-Jun-04 1:24 
GeneralPrblm in video capturing Pin
Zeeshan Bilal6-Jun-04 23:32
Zeeshan Bilal6-Jun-04 23:32 
QuestionRetrieving control's original class by its ID? Pin
Daredevil6-Jun-04 23:13
Daredevil6-Jun-04 23:13 
AnswerRe: Retrieving control's original class by its ID? Pin
Andrew Quinn AUS6-Jun-04 23:33
Andrew Quinn AUS6-Jun-04 23:33 
Hi Daredevil,

All MFC classes that derive from CObject (of which CWnd does) have a CRuntimeClass object associated with it.
So to see if your object is a CEdit control:

CWnd* pWndControl = m_arrMyControls[i]; // or however you've implemented the collection of controls
if (pWndControl && pWnd->GetSafeHwnd())
{
 CRuntimeClass* pClass = pWnd->GetRuntimeClass();
     // MSDN says that pClass will never be NULL, but we should always check pointers before use
     if (pClass)
     {
     CString strName = pClass->m_lpszClassName;
         // Now you can do whatever you need to do based on what the runtime class is
         // ...
         // ...
         // ...
     }
}


Hope this helps,
Andy
AnswerRe: Retrieving control's original class by its ID? Pin
David Crow7-Jun-04 2:10
David Crow7-Jun-04 2:10 
GeneralCIndexes help required.. Pin
Chris Ulliott6-Jun-04 23:12
Chris Ulliott6-Jun-04 23:12 
Generalcommunication on serial port com Pin
jetournier6-Jun-04 21:57
jetournier6-Jun-04 21:57 
GeneralCreate menu !!! Icon Pin
Qdlaty6-Jun-04 21:48
Qdlaty6-Jun-04 21:48 
GeneralChange Header & Footer when use CHtmlView Pin
MachineMHK6-Jun-04 21:36
MachineMHK6-Jun-04 21:36 
QuestionA simple way to encrypt/decrypt a CString? Pin
anderslundsgard6-Jun-04 21:25
anderslundsgard6-Jun-04 21:25 
AnswerRe: A simple way to encrypt/decrypt a CString? Pin
Brian Delahunty6-Jun-04 21:39
Brian Delahunty6-Jun-04 21:39 
QuestionHow to Close the instance by if i have its HANDLE Pin
Zeeshan Bilal6-Jun-04 20:58
Zeeshan Bilal6-Jun-04 20:58 
GeneralRe: How to Close the instance by if i have its HANDLE Pin
Diddy7-Jun-04 0:46
Diddy7-Jun-04 0:46 
GeneralRe: How to Close the instance by if i have its HANDLE Pin
Anthony_Yio7-Jun-04 1:37
Anthony_Yio7-Jun-04 1:37 
GeneralAccessing folders of remote system Pin
aparajita6-Jun-04 20:58
aparajita6-Jun-04 20:58 
GeneralRe: Accessing folders of remote system Pin
Brian Delahunty6-Jun-04 21:47
Brian Delahunty6-Jun-04 21:47 
GeneralRe: Accessing folders of remote system Pin
aparajita13-Jun-04 21:34
aparajita13-Jun-04 21:34 
GeneralRe: Accessing folders of remote system Pin
David Crow7-Jun-04 2:19
David Crow7-Jun-04 2:19 
GeneralCreating movable bar Pin
aparajita6-Jun-04 20:47
aparajita6-Jun-04 20:47 
GeneralRe: Creating movable bar Pin
Anthony_Yio6-Jun-04 20:48
Anthony_Yio6-Jun-04 20:48 
GeneralProblem with header file -MAC Address Pin
6-Jun-04 20:25
suss6-Jun-04 20:25 

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.