Click here to Skip to main content
15,905,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: header file Pin
NewbieStats4-Apr-05 15:06
NewbieStats4-Apr-05 15:06 
GeneralRe: header file Pin
ThatsAlok4-Apr-05 18:33
ThatsAlok4-Apr-05 18:33 
GeneralRe: header file Pin
mpapeo4-Apr-05 21:47
mpapeo4-Apr-05 21:47 
GeneralRe: header file Pin
David Crow4-Apr-05 17:11
David Crow4-Apr-05 17:11 
GeneralRe: header file Pin
Christian Graus4-Apr-05 17:16
protectorChristian Graus4-Apr-05 17:16 
GeneralRe: header file Pin
Ryan Binns4-Apr-05 18:37
Ryan Binns4-Apr-05 18:37 
GeneralMSXML Memory Leak Pin
Demián Gutierrez4-Apr-05 11:44
Demián Gutierrez4-Apr-05 11:44 
GeneralShowHTMLDialog working with XP not Win98 Pin
georgiek504-Apr-05 9:37
georgiek504-Apr-05 9:37 
I have a small function in my app that displays an HTML dialog that works find in Windows XP but not 98. Code is as follows:

<br />
void ShowExportTemplatePreview(HWND hwnd)<br />
{<br />
	// Function to show a template export preview in another dialog window<br />
<br />
	HINSTANCE hinstMSHTML = LoadLibrary(TEXT("MSHTML.DLL"));<br />
<br />
	if(hinstMSHTML)<br />
    {<br />
		SHOWHTMLDIALOGFN  *pfnShowHTMLDialog;<br />
		pfnShowHTMLDialog = (SHOWHTMLDIALOGFN*) GetProcAddress(hinstMSHTML, TEXT("ShowHTMLDialog"));<br />
<br />
		if(pfnShowHTMLDialog)<br />
		{<br />
			char szTemplatePreview[MAX_PATH];<br />
			wsprintf(szTemplatePreview, "%s\\Temp_0.html", cStartupData.szAppDirectory);<br />
<br />
			WCHAR wcTemplatePreview[MAX_PATH];<br />
<br />
			MultiByteToWideChar(CP_THREAD_ACP, NULL, szTemplatePreview, sizeof(szTemplatePreview), <br />
								wcTemplatePreview, MAX_PATH);<br />
<br />
			IMoniker *pURLMoniker;<br />
			CreateURLMoniker(NULL, wcTemplatePreview, &pURLMoniker);<br />
<br />
			if (pURLMoniker)<br />
			{<br />
				BSTR bstrOptions = SysAllocString(L"dialogHeight:30;dialogWidth:45;resizable:yes");<br />
<br />
				(*pfnShowHTMLDialog)(hwnd, pURLMoniker, NULL, (char*) bstrOptions, NULL);<br />
<br />
				SysFreeString(bstrOptions);<br />
				<br />
				pURLMoniker->Release();<br />
			}<br />
		}<br />
   <br />
		FreeLibrary(hinstMSHTML);<br />
	}<br />
}<br />

This is mostly copied from MSDN and I am trying to find compatibility issues with no success. We have pinpointed the problem to:
(*pfnShowHTMLDialog)(hwnd, pURLMoniker, NULL, (char*) bstrOptions, NULL);
But i have no idea as to what is causing the error or how to even go about solving it. Does anyone have any experience with this function that could be of help? Thanks in advance.
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Neville Franks4-Apr-05 11:07
Neville Franks4-Apr-05 11:07 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
georgiek504-Apr-05 11:48
georgiek504-Apr-05 11:48 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Neville Franks4-Apr-05 11:56
Neville Franks4-Apr-05 11:56 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Michael Dunn4-Apr-05 12:47
sitebuilderMichael Dunn4-Apr-05 12:47 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
georgiek505-Apr-05 5:46
georgiek505-Apr-05 5:46 
GeneralCTreeCtrl items highlight Pin
Maximilien4-Apr-05 8:10
Maximilien4-Apr-05 8:10 
GeneralRe: CTreeCtrl items highlight Pin
Neville Franks4-Apr-05 11:16
Neville Franks4-Apr-05 11:16 
GeneralRe: CTreeCtrl items highlight Pin
Maximilien4-Apr-05 12:47
Maximilien4-Apr-05 12:47 
GeneralResources not included Pin
dabs4-Apr-05 8:10
dabs4-Apr-05 8:10 
Questionhow to write in text file Pin
smarty124-Apr-05 7:55
smarty124-Apr-05 7:55 
AnswerRe: how to write in text file Pin
NewbieStats4-Apr-05 9:24
NewbieStats4-Apr-05 9:24 
GeneralSecure FTP Pin
Member 18509854-Apr-05 6:39
Member 18509854-Apr-05 6:39 
GeneralRe: Secure FTP Pin
RobJones4-Apr-05 7:27
RobJones4-Apr-05 7:27 
GeneralScrollBar Message Handling Pin
blinkered4-Apr-05 6:28
blinkered4-Apr-05 6:28 
GeneralRe: ScrollBar Message Handling Pin
PJ Arends4-Apr-05 8:26
professionalPJ Arends4-Apr-05 8:26 
GeneralHelp Urgent, Windows folder size without file searching Pin
inbakumar.G4-Apr-05 5:57
inbakumar.G4-Apr-05 5:57 
GeneralRe: Help Urgent, Windows folder size without file searching Pin
David Crow4-Apr-05 9:40
David Crow4-Apr-05 9:40 

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.