Click here to Skip to main content
15,922,407 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSPI_SETWORKAREA Pin
Shotgun4-Apr-05 15:18
Shotgun4-Apr-05 15:18 
GeneralRe: SPI_SETWORKAREA Pin
Michael Dunn4-Apr-05 19:50
sitebuilderMichael Dunn4-Apr-05 19:50 
GeneralSecurity form Pin
Mahyar Es.4-Apr-05 14:31
Mahyar Es.4-Apr-05 14:31 
GeneralRe: Security form Pin
NewbieStats4-Apr-05 15:24
NewbieStats4-Apr-05 15:24 
Generalheader file Pin
mpapeo4-Apr-05 12:19
mpapeo4-Apr-05 12:19 
GeneralRe: header file Pin
qcha0s4-Apr-05 12:28
qcha0s4-Apr-05 12:28 
GeneralRe: header file Pin
mpapeo4-Apr-05 12:36
mpapeo4-Apr-05 12:36 
GeneralRe: header file Pin
qcha0s4-Apr-05 12:52
qcha0s4-Apr-05 12:52 
GeneralRe: header file Pin
Christian Graus4-Apr-05 12:57
protectorChristian Graus4-Apr-05 12:57 
GeneralRe: header file Pin
mpapeo4-Apr-05 13:12
mpapeo4-Apr-05 13:12 
GeneralRe: header file Pin
Christian Graus4-Apr-05 12:55
protectorChristian Graus4-Apr-05 12:55 
GeneralRe: header file Pin
mpapeo4-Apr-05 13:01
mpapeo4-Apr-05 13:01 
GeneralRe: header file Pin
Christian Graus4-Apr-05 13:09
protectorChristian Graus4-Apr-05 13:09 
GeneralRe: header file Pin
mpapeo4-Apr-05 13:17
mpapeo4-Apr-05 13:17 
GeneralRe: header file Pin
Christian Graus4-Apr-05 14:22
protectorChristian Graus4-Apr-05 14:22 
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 

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.