Click here to Skip to main content
15,917,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConverting a MFC CView app to an ActiveX control Pin
AJ1237-Sep-03 7:29
AJ1237-Sep-03 7:29 
GeneralRe: Converting a MFC CView app to an ActiveX control Pin
igor19607-Sep-03 10:34
igor19607-Sep-03 10:34 
GeneralDomains and Workgroups List Pin
Frank Deo7-Sep-03 7:20
Frank Deo7-Sep-03 7:20 
GeneralRe: Domains and Workgroups List Pin
Frank Deo7-Sep-03 9:56
Frank Deo7-Sep-03 9:56 
GeneralReferencing "internal" resources in MFC Pin
Antti Keskinen7-Sep-03 5:28
Antti Keskinen7-Sep-03 5:28 
GeneralRe: Referencing "internal" resources in MFC Pin
Michael Dunn7-Sep-03 8:17
sitebuilderMichael Dunn7-Sep-03 8:17 
GeneralRe: Referencing "internal" resources in MFC Pin
PJ Arends7-Sep-03 8:21
professionalPJ Arends7-Sep-03 8:21 
GeneralRe: Referencing "internal" resources in MFC Pin
Antti Keskinen7-Sep-03 10:45
Antti Keskinen7-Sep-03 10:45 
Thank you both for a swift response.

Mike's suggestion yielded a working solution. Using a string resource might have worked as well,
but pushing 3 kb of HTML code into a string resource just didn't sound nice.
If nothing else, it would look ugly in the String Table Smile | :)

I'll post the code snippet here in case someone wants to utilize it.
I must say though, it looks like a SERIOUS hack Suspicious | :suss:
Note that you need to check the resource integer number for FindResource() manually from 'resource.h'

<code>
// Load the HTML file
char* ptrChar = (char*)LockResource(LoadResource(NULL, FindResource(NULL, "#130" ,RT_HTML)));

// Construct a CString from the resource
CString HTMLFile(ptrChar);
</code>

Greetings,
Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Referencing &quot;internal&quot; resources in MFC Pin
Michael Dunn7-Sep-03 13:07
sitebuilderMichael Dunn7-Sep-03 13:07 
GeneralRe: Referencing &quot;internal&quot; resources in MFC Pin
Antti Keskinen7-Sep-03 18:12
Antti Keskinen7-Sep-03 18:12 
Generalnon modal Dialog in Background Pin
DarkMarine7-Sep-03 5:11
DarkMarine7-Sep-03 5:11 
GeneralRe: non modal Dialog in Background Pin
valikac7-Sep-03 5:14
valikac7-Sep-03 5:14 
GeneralRe: non modal Dialog in Background Pin
Nish Nishant7-Sep-03 18:18
sitebuilderNish Nishant7-Sep-03 18:18 
GeneralRe: non modal Dialog in Background Pin
DarkMarine7-Sep-03 21:54
DarkMarine7-Sep-03 21:54 
GeneralGet router stats Pin
pma7-Sep-03 3:51
pma7-Sep-03 3:51 
GeneralRe: Get router stats Pin
geo_m7-Sep-03 6:01
geo_m7-Sep-03 6:01 
GeneralModeless Dialog box Pin
Ph@ntom6-Sep-03 23:40
Ph@ntom6-Sep-03 23:40 
GeneralRe: Modeless Dialog box Pin
valikac7-Sep-03 5:16
valikac7-Sep-03 5:16 
GeneralRe: Modeless Dialog box Pin
Ph@ntom7-Sep-03 7:44
Ph@ntom7-Sep-03 7:44 
Questionapplying skinmagic toolkit to vc++ programs ? Pin
AdrenalineDetonator6-Sep-03 23:15
AdrenalineDetonator6-Sep-03 23:15 
AnswerRe: applying skinmagic toolkit to vc++ programs ? Pin
Neville Franks7-Sep-03 11:01
Neville Franks7-Sep-03 11:01 
QuestionHow to handle events in List Control if I don't have a variable? Pin
ben26-Sep-03 22:27
ben26-Sep-03 22:27 
AnswerRe: How to handle events in List Control if I don't have a variable? Pin
Anonymous7-Sep-03 8:16
Anonymous7-Sep-03 8:16 
GeneralReproducing key events Pin
Minoo_Sh6-Sep-03 22:21
Minoo_Sh6-Sep-03 22:21 
GeneralRe: Reproducing key events Pin
Taka Muraoka6-Sep-03 23:28
Taka Muraoka6-Sep-03 23:28 

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.