-
Are you writting in MFC and calling AfxInitRichEdit () ?
(does not look like MFC )
Have called InitCommonControls ()
Obviuosly you have included richedit.h
Put 'chCntrlName' into a messagebox before you use it to create the control and ensure it contains the correct string.
Check the hwnd and hInstance.
Try creating an edit (instead of the richedit) and see if that can be created. That is find if the create is OK.
-
I am not using MFC, and nothing I have ever read told me to call InitCommonControls()... however, when I added the call to my program it said that it could not locate the function and assumed it was returning int. Which header do I have to include in order to call this function? My current includes are as follows:
windows.h
process.h
richedit.h
stdio.h
token.h
-
Bugger!
You need to InitCommonControls to use anything like listviews, treeviews or richedits.
commctrl.h
comctl32.lib
-
I've never understood why InitCommonControls() is necessary, when you link with comctl32.lib. Is it because comctl32.lib is only a static link library?
-
I've included the commctrl.h and added the comctl32.lib to my project, however, it still doesn't create the richedit and I still receive the 1407 error.
Any other suggestions?