Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to open an exist file of disk and print on the screen? Pin
gentleguy10-Jan-08 13:49
gentleguy10-Jan-08 13:49 
AnswerRe: how to open an exist file of disk and print on the screen? Pin
Maxwell Chen10-Jan-08 17:35
Maxwell Chen10-Jan-08 17:35 
NewsRe: how to open an exist file of disk and print on the screen? Pin
gentleguy10-Jan-08 17:59
gentleguy10-Jan-08 17:59 
QuestionServer Memory Management - large database. Pin
Mike Doner10-Jan-08 13:06
Mike Doner10-Jan-08 13:06 
GeneralRe: Server Memory Management - large database. Pin
Mark Salsbery10-Jan-08 14:07
Mark Salsbery10-Jan-08 14:07 
GeneralRe: Server Memory Management - large database. Pin
Mike Doner11-Jan-08 2:54
Mike Doner11-Jan-08 2:54 
GeneralRe: Server Memory Management - large database. Pin
upredsun10-Jan-08 18:24
upredsun10-Jan-08 18:24 
Generalshdocvw.dll - WebBrowser control Pin
Force Code10-Jan-08 11:17
Force Code10-Jan-08 11:17 
Trying to create and access a WebBrowser control behind the scenes in a win32 console app:

::CoInitialize(NULL);
  
SHDocVw::IWebBrowser2Ptr brwsr = NULL;
HRESULT hResult;

hResult = brwsr.CreateInstance(__uuidof(SHDocVw::WebBrowser));
  
//hResult = CoCreateInstance(_uuidof(SHDocVw::WebBrowser), NULL, 
//   CLSCTX_SERVER, __uuidof(IWebBrowser2), (LPVOID*)&brwsr);

I can then call brwsr->get_Name, brwsr->get_FullName etc. with no problem.

brwsr->Navigate(...) is causing a runtime crash (with CoCreateInstance or CreateInstance.)

Here's the current method I'm using:

BSTR oURL;
oURL = SysAllocString(L"http://www.google.com");
VARIANT var;
var.vt = VT_EMPTY;
brwsr->Navigate((BSTR)oURL, &var, &var,
  &var,&var);
SysFreeString(oURL);  
(which I copied and pasted from somewhere).

Have no idea if anybody still uses COM, but does someone know what I'm doing wrong.
GeneralRe: shdocvw.dll - WebBrowser control Pin
CPallini10-Jan-08 12:18
mveCPallini10-Jan-08 12:18 
GeneralRe: shdocvw.dll - WebBrowser control Pin
Force Code10-Jan-08 12:46
Force Code10-Jan-08 12:46 
GeneralRe: shdocvw.dll - WebBrowser control Pin
CPallini10-Jan-08 21:08
mveCPallini10-Jan-08 21:08 
GeneralRe: shdocvw.dll - WebBrowser control Pin
Lim Bio Liong10-Jan-08 17:17
Lim Bio Liong10-Jan-08 17:17 
GeneralLoading Bitmaps - Distorted image Pin
Gadjuka10-Jan-08 10:15
Gadjuka10-Jan-08 10:15 
GeneralRe: Loading Bitmaps - Distorted image Pin
Mark Salsbery10-Jan-08 11:15
Mark Salsbery10-Jan-08 11:15 
GeneralRe: Loading Bitmaps - Distorted image Pin
CPallini10-Jan-08 12:04
mveCPallini10-Jan-08 12:04 
GeneralRe: Loading Bitmaps - Distorted image Pin
Californian210-Jan-08 13:00
Californian210-Jan-08 13:00 
GeneralRe: Loading Bitmaps - Distorted image Pin
Gadjuka11-Jan-08 0:42
Gadjuka11-Jan-08 0:42 
GeneralRe: Loading Bitmaps - Distorted image Pin
Gadjuka11-Jan-08 14:25
Gadjuka11-Jan-08 14:25 
QuestionMenu Notifications on MFC Pin
blackbondi10-Jan-08 9:00
blackbondi10-Jan-08 9:00 
GeneralRe: Menu Notifications on MFC Pin
CPallini10-Jan-08 9:50
mveCPallini10-Jan-08 9:50 
GeneralRe: Menu Notifications on MFC Pin
blackbondi10-Jan-08 23:59
blackbondi10-Jan-08 23:59 
QuestionRe: Menu Notifications on MFC Pin
David Crow10-Jan-08 9:52
David Crow10-Jan-08 9:52 
GeneralRe: Menu Notifications on MFC Pin
blackbondi11-Jan-08 0:16
blackbondi11-Jan-08 0:16 
GeneralRe: Menu Notifications on MFC Pin
David Crow11-Jan-08 2:21
David Crow11-Jan-08 2:21 
GeneralRe: Menu Notifications on MFC Pin
blackbondi11-Jan-08 4:39
blackbondi11-Jan-08 4:39 

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.