|
Would you happen to know of any example code for CBT hooks? I've looked at MSDN and I was unable to find some examples.
--Trey
|
|
|
|
|
This is a long shot, but I am looking for a way to view HTML pages as if in a browser, but not using MFC, and definately NOT using Internet Explorer.
Just to really push the possibility of an answer, I would prefer to be able to use it from/in 'C' code (nnot C++).
Am I dreaming, or is this possible?
Thanks for any help,
James Millson
|
|
|
|
|
The man you need to contact is Russ Freeman. He has several web sites but the one that I can think of right off hand is http://www.gipsysoft.com
He has a product that is called QHTM. He is currently not pushing it because he has bigger and better things but if you email him about he will give you some info on it. There is a freeware version on www.codeguru.com and he has a version that is updated with many new features.
Tell him that Rodney at MediaVergence Group referred you to him.
Another option would be wxWindows 2.
|
|
|
|
|
I want to create a dialog but have it hidden right from the beginning and open it at a later time with ShowWindow()
|
|
|
|
|
It's really pretty simple, though. Just create your dialog with the editor. Let Class Wizard make your classes for it like normal. I imagine you'll be showing/hiding from your main app, so if, say you were a dialog based app, simply include your header for your hidden dialog(s) in the header for your main dialog and make a member or two:
CHiddenDlg* m_pHidden;
Now assuming your resource ID for the hidden dialog is IDD_HIDDEN_DIALOG, in the CPP of you main in OnInitDialog just do this:
m_pHidden1 = new CHiddenDlg(this);
m_pHidden1->Create(IDD_HIDDEN_DIALOG, this);
Then, whenever you want to show/hide just use
m_pHidden1->ShowWindow(SW_SHOW);
m_pHidden1->ShowWindow(SW_HIDE);
Make sure you clean up at the end and you'll want to be a little better than I was about checking that your dialogs got created and all that.
|
|
|
|
|
In MFC, do you know how to launch the Internet Explorer .exe and then open the URL and then download the html from this URL?
Thanks a lot for your help!!
|
|
|
|
|
Use thhe MFC-internet functions/classes directly.
Uwe Keim
http://www.zeta-software.de
|
|
|
|
|
Is that I need to use CHtmlView?
What's the procedure to use the MFC internet class and it's function? I'm sorry that I'm a new programmer in MFC, I'm know a little about it.
Thx for your help!!
|
|
|
|
|
Look for CHttpFile in your documentation:
"... The class CHttpFile provides the functionality to request and read files on an HTTP server ..."
Uwe Keim
http://www.zeta-software.de
|
|
|
|
|
|
|
Thx a lot!!
I've downloaded the source code of the URLdownload and WebGrab! It seems quite useful for my project! I will take a look within these days! Thx again!
|
|
|
|
|
There is yet another way.
Look up the article "Internet Downloading Using Asynchronous Monikers". Deriving a class from MFC's CAsyncMonikerFile class is a very easy way to get a URL off the net.
|
|
|
|
|
Hi Milke,
I have tried to build the exe from the source code of URLdownload, however, it shows there is a link error "mfc42ud.lib". I just know it is a unicode library but how can I fix this error? Otherwise, I can't trace the flow of the program.
Looking forward to your reply! Thanks a lot!!
Regards,
Dig
|
|
|
|
|
You're building the Unicode debug configuration, but you didn't install the Unicode files when you installed VC. Switch to the (regular) debug build instead. If you really want the Unicode build, you'll need to rerun the VC setup and install the Unicode libraries.
--Mike--
http://home.inreach.com/mdunn/
Is history an illusion caused by the passage of time, or is time an illusion caused by the passage of history?
|
|
|
|
|
Thanks Micheal.
However, I get another question.
You are using worker thread to handle the downloading process in the program, however, you declared that this is not good. Then do you know how to avoid using thread to handle the downloading process?
Thanks for your valuable advice!
|
|
|
|
|
No, what I did wrong was pass a CWnd object between threads. The proper way to do it is to pass the dialog's HWND between threads. From the worker thread, you can then do the UI updates with SendDlgItemMessage() calls.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
What I got from your sentence is that it was not good to pass the pointer "this" in the pParam, right?
If I want to do the handle passing properly, is that I need to change the pParam to this->GetSafeHwnd()? Besides, what I need to modify in the related functions apart from this?
pWorkerThread = AfxBeginThread ( gThreadProc, this,
THREAD_PRIORITY_NORMAL, 0,
CREATE_SUSPENDED );
I am sorry that I am a beginner in Visual C++ and MFC so that I need to ask such kind of question! Thanks for your advice a lot!
|
|
|
|
|
In the worker thread (specifically CCallback::OnProgress() ), you'll need to update the UI (progress bars, static text controls) with SendDlgItemMessage() instead of calling the ProgressUpdate() function in the dialog class.
Alternatively, you can package up the info sent to ProgressUpdate() into a struct, and send a custom window message to the dialog. The dialog's handler would read the data from the struct and update the UI.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Besides, since actually I am doing my project for those question, can I make wholly use of the class you'd written "BindStatusCallBack.h"? Since I know it concerns with the copyright, so that I have to ask for your permission beforehand.
Thx!
|
|
|
|
|
Does anyone know where to find a good
tutorial for DirectX 8 programming?
Thanks in advance,
Gregor Schuster
|
|
|
|
|
Download the documentation with DX8. It is commonly accepted that there are no great books on DX, and that the best source of info is the online documentation. I personally used the Microsoft DX and D3D books as a starting point, but remember, they relate to DX5.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
How do I disable Alt-F4 so that my app doesn't exit on this shortcut?
|
|
|
|
|
If you don't want to close at all handle the WM_CLOSE message and do nothing.
If it is just ALT+F4, try overriding PretranslateMessage() (Assuming you're using MFC)
Christian Skovdal Andersen
|
|
|
|
|
How can deal with PreTranslateMessage to
disable Alt+F4?
|
|
|
|