CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Posts
    1

    Question Using the CImg library

    Hey everybody!

    Am a new user to this forum, have a newbie question

    We are doing an image processing project using Visual C++ 2010 Express, and are not really used to this format since we usually work with MATLAB.

    We were advised to use the CImg library since it is supposed to be quite good with handling images, however in spite of working for days trying to get it to work with Visual C++ 2010, we have not even been able to read the image into the program..

    So this is a really beginner-level question - how can we use Visual C++ 2010 with CImg to read an image into our C++ code?

    I'm running Windows 7..

    Any and all help will be appreciated greatly in this regard!

    Thank you so much for your time..

    (The error we get when we run the code using the standard settings is:

    1>c:\users\admin\documents\visual studio 2010\projects\cimgtry\cimgtry\cimg.h(2765): error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [10]' to 'LPCWSTR'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    )

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Using the CImg library

    Your project is compiled in UNICODE. The parameter your are passing to the function is char*. A char* is not unicode. Lookup how the visual studio works with normal text and UNICODE.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured