Click here to Skip to main content
15,925,499 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: iterator Pin
Zac Howland29-Jun-06 8:12
Zac Howland29-Jun-06 8:12 
QuestionScope Pin
Jay0329-Jun-06 5:26
Jay0329-Jun-06 5:26 
AnswerRe: Scope Pin
Chris Losinger29-Jun-06 5:33
professionalChris Losinger29-Jun-06 5:33 
AnswerRe: Scope Pin
Zac Howland29-Jun-06 6:38
Zac Howland29-Jun-06 6:38 
GeneralRe: Scope Pin
Jay0329-Jun-06 7:40
Jay0329-Jun-06 7:40 
GeneralRe: Scope Pin
Blake Miller30-Jun-06 10:25
Blake Miller30-Jun-06 10:25 
QuestionHow to dynamically change a window class name? Pin
yjzh29-Jun-06 5:12
yjzh29-Jun-06 5:12 
AnswerRe: How to dynamically change a window class name? Pin
ovidiucucu29-Jun-06 5:24
ovidiucucu29-Jun-06 5:24 
VC 6.0

  • right-click on the top level node in "ResourceView" window and choose "Properties" menu item
  • in the "Resource File Properties" dialog, uncheck "Enable MFC features".
  • right-click on dialog template and choose "Properties".
  • in "Dialog Properties" dialog, type the class name, e.g. "Mama Leone"; NOTE: unless the first two steps "Class name" field is disabled.
  • in InitInstance of your application add the following
    WNDCLASS wc;
    
    // Get the info for this class.
    // #32770 is the default class name for dialogs boxes.
    ::GetClassInfo(AfxGetInstanceHandle(), _T("#32770"), &wc);
    
    // Change the name of the class.
    wc.lpszClassName = _T("Mama Leone");
    
    // Register the class
    AfxRegisterClass(&wc);
    


    VC .NET
    Like in VC6.0 except, instead of type the new dialog's class name in resource editor/"Dialog Properties", you have to add by hand CLASS statement in resource file:
    IDD_MY_DIALOG DIALOGEX  0, 0, 320, 200
    STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION
     | DS_MODALFRAME
     | WS_SYSMENU
    EXSTYLE WS_EX_APPWINDOW
    CAPTION "My Dialog"
    CLASS "Mama Leone"
    


    Ovidiu Cucu
    Microsoft MVP - Visual C++

GeneralRe: How to dynamically change a window class name? Pin
Tara1429-Jun-06 5:45
Tara1429-Jun-06 5:45 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu29-Jun-06 6:08
ovidiucucu29-Jun-06 6:08 
GeneralRe: How to dynamically change a window class name? Pin
Tara1429-Jun-06 7:15
Tara1429-Jun-06 7:15 
QuestionRe: How to dynamically change a window class name? Pin
yjzh29-Jun-06 16:51
yjzh29-Jun-06 16:51 
QuestionRe: How to dynamically change a window class name? Pin
yjzh29-Jun-06 15:33
yjzh29-Jun-06 15:33 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu29-Jun-06 23:34
ovidiucucu29-Jun-06 23:34 
QuestionRe: How to dynamically change a window class name? Pin
yjzh30-Jun-06 21:04
yjzh30-Jun-06 21:04 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu1-Jul-06 22:38
ovidiucucu1-Jul-06 22:38 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 18:16
yjzh3-Jul-06 18:16 
QuestionRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 19:03
yjzh3-Jul-06 19:03 
AnswerRe: How to dynamically change a window class name? Pin
ovidiucucu3-Jul-06 22:33
ovidiucucu3-Jul-06 22:33 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 23:06
yjzh3-Jul-06 23:06 
GeneralRe: How to dynamically change a window class name? Pin
yjzh3-Jul-06 23:07
yjzh3-Jul-06 23:07 
QuestionRe: How to dynamically change a window class name? Pin
yjzh4-Jul-06 18:10
yjzh4-Jul-06 18:10 
AnswerRe: How to dynamically change a window class name? [modified] Pin
ovidiucucu4-Jul-06 21:08
ovidiucucu4-Jul-06 21:08 
QuestionRe: How to dynamically change a window class name? Pin
yjzh4-Jul-06 23:40
yjzh4-Jul-06 23:40 
AnswerRe: How to dynamically change a window class name? Pin
ovidiucucu5-Jul-06 2:42
ovidiucucu5-Jul-06 2:42 

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.