Click here to Skip to main content
14,385,458 members

C / C++ / MFC

 
GeneralRe: How read XLSX file without office automation? Pin
Le@rner20-Nov-19 23:29
MemberLe@rner20-Nov-19 23:29 
QuestionRe: How read XLSX file without office automation? Pin
David Crow19-Nov-19 3:52
MemberDavid Crow19-Nov-19 3:52 
AnswerRe: How read XLSX file without office automation? Pin
leon de boer19-Nov-19 20:23
Memberleon de boer19-Nov-19 20:23 
QuestionHelp with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
EternalWyrm18-Nov-19 14:02
MemberEternalWyrm18-Nov-19 14:02 
AnswerRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
Victor Nijegorodov18-Nov-19 21:59
MemberVictor Nijegorodov18-Nov-19 21:59 
AnswerRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
Richard MacCutchan18-Nov-19 22:26
mveRichard MacCutchan18-Nov-19 22:26 
AnswerRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
leon de boer19-Nov-19 0:14
Memberleon de boer19-Nov-19 0:14 
QuestionRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
EternalWyrm20-Nov-19 7:58
MemberEternalWyrm20-Nov-19 7:58 
Thanks for the help Leon!!

I did manage to get the bmp code working good, however, I noticed as I compressed the bmp further and further with StretchBlt() it got ugly...



When I tried using your JPG/GIF loading code, was it supposed to proc a Dlgbox? or no? I had some trouble with the LPOLESTR converting from my program... but I think I got that fixed... here's the code:

HDC MemDCFromJPG_GIF_File(CString filename, int iWidth, int iHeight)
{
const int HIMETRIC_PER_INCH = 2540;

SIZE sizeInHiMetric;
IPicture* Ipic = NULL;

HDC MemDC = 0; // Preset return value to fail


BSTR b = filename.AllocSysString();
LPOLESTR pOLE_stringpath = b;


HRESULT hr = OleLoadPicturePath(pOLE_stringpath, NULL, 0, 0,
IID_IPicture, (LPVOID*)&Ipic); // Load the picture
if ((hr == S_OK) & (Ipic != 0)) // Picture loaded okay
{
...


However, the Ipic pointer is returning NULL every time? I don't know how to fix that??

Thanks again for your help!
Ryan.
AnswerRe: Help with Resizing Bitmap loaded with LoadImage() and Attach to CImagelist object Pin
leon de boer10hrs 54mins ago
Memberleon de boer10hrs 54mins ago 
QuestionVS2008 Map files, this can't be this hard! Pin
charlieg18-Nov-19 13:48
Membercharlieg18-Nov-19 13:48 
AnswerRe: VS2008 Map files, this can't be this hard! Pin
Randor 24-Nov-19 17:04
professional Randor 24-Nov-19 17:04 
GeneralRe: VS2008 Map files, this can't be this hard! Pin
charlieg25-Nov-19 6:45
Membercharlieg25-Nov-19 6:45 
GeneralRe: VS2008 Map files, this can't be this hard! Pin
Randor 25-Nov-19 8:08
professional Randor 25-Nov-19 8:08 
Questionc++ string_view Pin
T Bones Jones14-Nov-19 12:38
MemberT Bones Jones14-Nov-19 12:38 
AnswerRe: c++ string_view Pin
Graham Breach14-Nov-19 13:10
MemberGraham Breach14-Nov-19 13:10 
GeneralRe: c++ string_view Pin
T Bones Jones15-Nov-19 4:44
MemberT Bones Jones15-Nov-19 4:44 
QuestionPROGRAMMER'S MOM- Needs your help =) Pin
Member 1465597214-Nov-19 8:57
MemberMember 1465597214-Nov-19 8:57 
AnswerRe: PROGRAMMER'S MOM- Needs your help =) Pin
OriginalGriff14-Nov-19 8:59
mveOriginalGriff14-Nov-19 8:59 
Questionpassword in star form Pin
Member 1461560312-Nov-19 0:34
MemberMember 1461560312-Nov-19 0:34 
AnswerRe: password in star form Pin
CPallini12-Nov-19 1:33
mveCPallini12-Nov-19 1:33 
SuggestionRe: password in star form Pin
David Crow12-Nov-19 6:48
MemberDavid Crow12-Nov-19 6:48 
AnswerRe: password in star form Pin
Stefan_Lang12-Nov-19 22:07
MemberStefan_Lang12-Nov-19 22:07 
QuestionHow to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136910-Nov-19 16:36
MemberMember 1308136910-Nov-19 16:36 
AnswerRe: How to make the heap address(by new) have the same every time the program runs? Pin
k505410-Nov-19 17:19
Memberk505410-Nov-19 17:19 
GeneralRe: How to make the heap address(by new) have the same every time the program runs? Pin
Member 1308136920-Nov-19 16:48
MemberMember 1308136920-Nov-19 16:48 

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.