|
|
How to embed webbrowser control in the MFC DLL?
Download this page by the MFC DLL and extract data.
thanks.
|
|
|
|
|
I think you are talking about using the Internet Explorer based CDHtmlDialog[^] (MSDN sample[^]) or something like SimpleBrowser[^].
If you don't want to use Internet Explorer, look into Webkit[^] - I have not tried this out myself, so I am not sure how easy it is to use.
[EDIT]
Here is another useful CodeProject article: IWebBrowser2 Wrapper Class[^]
[/EDIT]
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
|
The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have:
.h -
CToolTipCtrl* p_TTCtrl;
.ccp -
<pre lang="cs">p_TTCtrl = new CToolTipCtrl;
ASSERT(p_TTCtrl->Create(this));
CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);
VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
p_TTCtrl->Activate(TRUE);</pre>
When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens.
Can someone please point out what I am missing or have wrong.
Thanks,
Barry
|
|
|
|
|
Did you add the text for the tooltip? UpdateTipText()[^]
EDIT:
Nevermind, I didn't notice that the AddTool function already specifies the text.
The difficult we do right away...
...the impossible takes slightly longer.
modified 23-Feb-14 17:04pm.
|
|
|
|
|
In an ancient VC6.0 there is a "add C++ components " option which
does the grunt work of adding tooltip for you. I would guess that the latest VS has a similar tool.
|
|
|
|
|
I found it. I was creating the CMFCTooltipCtrl class improperly.
Thanks for the effort,
Barry
|
|
|
|
|
Maybe it sounds stupid, but how can i shutdown my app gracefully at CMainFrame Initialization ? I just want to do some system checks and if they fail, then immediately terminate the app before any window is created.
Any known methods like PostQuitMessage(0), PostMessage or OnClose etc fails because mainframe window is not created yet. Where to use exit code ?
PS: I dont want to use the InitInstance from my App.
Regards,
sdancer75
|
|
|
|
|
PostQuitMessage definitely works when called from the constructor of CMainFrame .
You can check the exit code using the function GetExitCodeProcess .
This can be used when invoking the application using the CreateProcess API, where it first waits for the program to terminate using the WaitForSingleObject function.
Otherwise you can get the exit code by checking the ERRORLEVEL variable when run from the command prompt or a batch file.
Here is more information on this - ERRORLEVEL is not %ERRORLEVEL%[^]
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
Thanks for the reply.
Yes indeed it works but since i am using codejock's library i get assertion errors and the app is not closing as it would expected but it stays alive doing nothing (no mouse or keyboard response).
Regards,
sdancer75
|
|
|
|
|
how to create checkpoint for svn if want to make new changes in source files?
|
|
|
|
|
Every commit done in SVN automatically assigns a version number to it.
You can, at any time, look at the SVN log and rollback your working copy to the desired version.
You can also tag a particular version so that you give it a human readable or easily recognizable name.
Here you can use the tag name for the rollback.
You can get detailed log information by looking at the revision graph.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
Every time you check in you essentially create a checkpoint, hence you can undo/track any changes in source. Usually your main source is kept in a folder labeled as a "trunk", projects are kept in a "branch" until they're finished and ready to be re-integrated into the trunk, and you can create a "tag" of any major event (such as software releases).
|
|
|
|
|
Hello,
I have some CUDA code in .cu file that I add to my solution (MFC project in VS 2008) as a source file and it all works fine. Now I would like to access the same functions that I defined in .cu file in my application via a DLL equivalent of that .cu file so that I can keep the soruce code away from users.
Could someone help me out with this? I already tried on nvidia forums, but didn't get any reply.
thanks in advance.
PKNT
|
|
|
|
|
|
I am aware of writing DLLs in C++ and I have written many before. I started out in the same way and stumbled upon errors specific to cuda header files that are included in the project.
Specifically syntax missing error for the lines
texture<Complex, 2, cudaReadModeElementType> texDataIn;
texture<Complex, 2, cudaReadModeElementType> texDataMid;
texture<Complex, 2, cudaReadModeElementType> texDataOut;
PKNT
|
|
|
|
|
|
For all those 3 lines, the error log shows
1>error C2143: syntax error : missing ';' before '<'
1>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>error C2143: syntax error : missing ';' before '<'
1>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>error C2086: 'int texture' : redefinition
1>see declaration of 'texture'
1>error C2143: syntax error : missing ';' before '<'
1>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>error C2086: 'int texture' : redefinition
1>see declaration of 'texture'
thanks
PKNT
|
|
|
|
|
That first error essentially says that the texture<> template is undefined. Make sure you have the appropriate header included.
|
|
|
|
|
Hello there,
I have a CDHtmlDialog app in which am trying to add a CSS media query in the HTML file as shown below, but it doesn't work.
@media(max-width:20em) {
table, thead, tbody, tfoot, th, td, tr { display:block; }
tr + tr { margin-top:1em; }
}
The same CSS works fine if i open in a browser like IE, FireFox, Chrome. But inside the CDHtmlDialog app this doesn't work.
I am using Visual Studio 2012 for development and have IE 11 installed in my machine.
Any ideas?
THanks in advance.
|
|
|
|
|
I know I already addressed this in my answer to one of your previous questions[^], but let me repeat just to make sure since you did not say if that fixed your problem.
The version of IE used in CDHtmlDialog depends on your OS and what version of IE you have installed, but that does not mean it defaults to using IE11 compatibility even if you have IE11 installed.
Make sure your HTML file has <!DOCTYPE html> at the beginning and you might have to have <meta http-equiv="X-UA-Compatible" content="IE=edge"> in your document as well.
You might have to take to the registry to get the browser control to behave correctly. Check out this on SO[^], this on MSDN[^] and check your settings by connecting to this[^]
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Did the trick for me!
Thanks SoMad!
|
|
|
|
|
Great!
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
HI, in a MFC program.
I use CDC* pDC = GetDC(); get a CDC pointer of screen.
but I need to create a new font, so I use:
HDC hdc = pDC->GetSateHdc();
my question is, after I done the function, I use:
Release(pDC), released the CDC object.
then do I need to release hdc handle? like Release(hdc)?
modified 21-Feb-14 15:43pm.
|
|
|
|