none
Rich edit control preventing Dialog Box from opening.

    Question

  • When I add a RichEditControl to my dialog box my program stops running. Has anyone had this problem in Visual Studio 2010?
    Tuesday, September 14, 2010 6:40 PM

Answers

  •  

    Hi,

     

    You can use GetLastError() to get this message where you think would cause the problem, if we get the message we might know how to solve it.

     

    Regards!

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, September 16, 2010 2:54 AM
    Moderator
  • Read about InitCommonControlsEx
    Tuesday, September 14, 2010 7:05 PM
  • You may also need to throw in a LoadLibrary depending on which version of the rich edit control you are trying to use.

     

    INITCOMMONCONTROLSEX cc = { sizeof(INITCOMMONCONTROLSEX), 
      ICC_WIN95_CLASSES };
    if(!InitCommonControlsEx(&cc))
      {
      ...
      }
    
    LoadLibrary("RichEd20.dll");
    
    


    Microsoft Test - http://tester.poleyland.com/
    Tuesday, September 14, 2010 7:08 PM
  • If this is an MFC dialog, then call AfxInitRichEdit2() at initialization stage, for example in your InitInstance function.

    Tuesday, September 14, 2010 7:18 PM

All replies

  • Read about InitCommonControlsEx
    Tuesday, September 14, 2010 7:05 PM
  • You may also need to throw in a LoadLibrary depending on which version of the rich edit control you are trying to use.

     

    INITCOMMONCONTROLSEX cc = { sizeof(INITCOMMONCONTROLSEX), 
      ICC_WIN95_CLASSES };
    if(!InitCommonControlsEx(&cc))
      {
      ...
      }
    
    LoadLibrary("RichEd20.dll");
    
    


    Microsoft Test - http://tester.poleyland.com/
    Tuesday, September 14, 2010 7:08 PM
  • If this is an MFC dialog, then call AfxInitRichEdit2() at initialization stage, for example in your InitInstance function.

    Tuesday, September 14, 2010 7:18 PM
  •  

    Hi,

     

    You can use GetLastError() to get this message where you think would cause the problem, if we get the message we might know how to solve it.

     

    Regards!

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, September 16, 2010 2:54 AM
    Moderator
  •  

    Hi,

     

    Did you solve your problem?

    If so please share the solution with us and mark the right answer.

    If not please let me know.

     

    Have a nice day!

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, September 17, 2010 6:47 AM
    Moderator