Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question.RC file formating differences Pin
KayakCoder21-Dec-07 10:40
KayakCoder21-Dec-07 10:40 
GeneralI hate programming today (project conflict/calling convention conflict, ... ) Pin
Maximilien21-Dec-07 7:24
Maximilien21-Dec-07 7:24 
GeneralGetting the bitmap in and out of a CGIPLUS Image class Pin
Anthony Appleyard21-Dec-07 6:39
Anthony Appleyard21-Dec-07 6:39 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery21-Dec-07 7:32
Mark Salsbery21-Dec-07 7:32 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Anthony Appleyard21-Dec-07 12:19
Anthony Appleyard21-Dec-07 12:19 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery21-Dec-07 12:39
Mark Salsbery21-Dec-07 12:39 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class [modified] Pin
Anthony Appleyard21-Dec-07 23:29
Anthony Appleyard21-Dec-07 23:29 
GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
Mark Salsbery22-Dec-07 7:06
Mark Salsbery22-Dec-07 7:06 
Anthony Appleyard wrote:
for(i=0;i<=n;i++) fn[i]=filename[i];


I'm not sure how you got that to compile, but you
need to actually convert the char string to a
WCHAR string before passing it to the constructor.

One way is with the ATL string conversion macros....
#include <AtlConv.h>
...

using namespace Gdiplus;
...

short jpgread (image&I, char*filename)
{
//   int CurY; 

   GdiplusStartupInput gdiplusStartupInput;
   ULONG_PTR gdiplusToken;
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

   // converts ANSI string to WCHAR string
   CA2W wcharfilename(filename);

   Bitmap MyBitmap(wcharfilename);

   GdiplusShutdown(gdiplusToken);
   return 1;
}

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Getting the bitmap in and out of a CGIPLUS Image class Pin
poda18-Mar-10 19:53
poda18-Mar-10 19:53 
GeneralGDI+ Why does the trick fail, one Rect to two Points Pin
followait21-Dec-07 6:16
followait21-Dec-07 6:16 
GeneralRe: GDI+ Why does the trick fail, one Rect to two Points Pin
Mark Salsbery21-Dec-07 6:26
Mark Salsbery21-Dec-07 6:26 
GeneralRe: GDI+ Why does the trick fail, one Rect to two Points Pin
followait21-Dec-07 7:45
followait21-Dec-07 7:45 
GeneralRe: GDI+ Why does the trick fail, one Rect to two Points Pin
Mark Salsbery21-Dec-07 8:48
Mark Salsbery21-Dec-07 8:48 
GeneralGDI+ A transformation from world coordinate to page coordinate makes picture foggy Pin
followait21-Dec-07 6:08
followait21-Dec-07 6:08 
GeneralRe: GDI+ A transformation from world coordinate to page coordinate makes picture foggy Pin
CPallini21-Dec-07 6:49
mveCPallini21-Dec-07 6:49 
GeneralGetUserName() return "SYSTEM" FOR SYSTEM PROCESS Pin
vicky0000021-Dec-07 4:25
vicky0000021-Dec-07 4:25 
GeneralRe: GetUserName() return "SYSTEM" FOR SYSTEM PROCESS Pin
myshketer21-Dec-07 5:05
myshketer21-Dec-07 5:05 
GeneralRe: GetUserName() return "SYSTEM" FOR SYSTEM PROCESS Pin
vicky0000021-Dec-07 6:02
vicky0000021-Dec-07 6:02 
GeneralRe: GetUserName() return "SYSTEM" FOR SYSTEM PROCESS Pin
Mark Salsbery21-Dec-07 6:35
Mark Salsbery21-Dec-07 6:35 
GeneralRe: GetUserName() return "SYSTEM" FOR SYSTEM PROCESS Pin
Mark Salsbery21-Dec-07 7:44
Mark Salsbery21-Dec-07 7:44 
GeneralExtra bytes between struct elements spoiling match between structs and binary file formats: cure found Pin
Anthony Appleyard21-Dec-07 1:59
Anthony Appleyard21-Dec-07 1:59 
GeneralRe: Extra bytes between struct elements spoiling match between structs and binary file formats: cure found Pin
Matthew Faithfull21-Dec-07 2:13
Matthew Faithfull21-Dec-07 2:13 
JokeIndeed... Pin
CPallini21-Dec-07 2:52
mveCPallini21-Dec-07 2:52 
JokeRe: Indeed... Pin
Matthew Faithfull21-Dec-07 3:04
Matthew Faithfull21-Dec-07 3:04 
GeneralRe: Indeed... Pin
CPallini21-Dec-07 3:15
mveCPallini21-Dec-07 3:15 

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.