|
Hi,
I currently have both a keyboard and mouse hook (both non-low-level) to monitor various events. Occassionally, I need to block both types messages after my hook function processes them, so the hook Proc function returns -1. The problem is that the mouse hook is inserted first, and so when that function returns -1, the keyboard proc is never called, so my application can't process the events it needs to. Is there some way I can work around this or should I change my hook setup? According to MSDN, a JournalRecord hook shouldn't modify the messages that it recieves. So any suggestions would be appriciated.
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
maybe a WH_GETMESSAGE hook can do this...
|
|
|
|
|
Actually, that seems like the right kind of hook to use, I'll switch to that and see how it works.
Thanks
modified 12-Jul-20 21:01pm.
|
|
|
|
|
I am having a problem with a treeview not showing tooltips. I'm using Borland builder C++ which uses VCL (MFC for Borland).
The treeview has the TVS_INFOTIP style set but not the TVS_NOTOOLTIPS style. I have verified that the WM_NOTIFY message is not getting sent to the parent window or the treeview itself. So unless I am missing something, the TVN_GETINFOTIP notification message is not being sent.
Has anybody else run into this type of problem?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Well, I figured out what my problem was. I USE $%@@ing Borland Products. Stupid software deletes the window and recreates it when you try to re-parent a form window. This results in your tooltip controls attached to the treeviews being deleted.
I HATE VCL!!!!
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hey can anyone possibly give me some tips on how i can make a detachable dialog that can be inserted back into the main part of the main dialog or poiint me to an article about it i did a seach here but only 3 artciles came up and non where what i was looking for
i think the thing im looking for is a dialogbar but i havent seen any articles on how to use them let a lone using them in a dialog based app
thanks for all the help
|
|
|
|
|
Hello.
I've made a MFC SDI app with the AppWizzard. The main window is a CFormView child, with an associated dialog. I've created another dialog (IDD_D2), and with the appwizzard i've created another class, a CFormView child, and i've associated it to the new dialog IDD_D2.
The project is called jmn. In jmnView.h & jmnView.cpp i've got the main window. The new CFormView is in other files.
Should i declare an object for the new CFormView i've created? where? in jmnView.h?
How do i create, show it, and close it?
i know that with dialogs you've got the DoModal function. I don't want a dialog, i want a resizable window, that's why i want a CFormView child.
thanks!!
|
|
|
|
|
Depends on what you're really trying to do. If you wanted to use your formview, in your app's InitInstance() you'll see something like:
CSingleDocTemplate* pDocTemplate;<br />
pDocTemplate = new CSingleDocTemplate(<br />
IDR_MAINFRAME,<br />
RUNTIME_CLASS(CTest1Doc),<br />
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CTest1View));
AddDocTemplate(pDocTemplate);<br />
replace your formview's class name with whatever you named it with in the wizard. e.g. above CTest1View would be replaced with the name of your form view.
I may have missed something else but I believe that is basically it. If on the other hand you want to keep your appwizard's auto generated formview and your formview, you'll have to either switch views and/or use a splitter window implementation to show both views simultaneously. This is usually done in mainframe.cpp. HTH.
|
|
|
|
|
that's not really what i meant, sorry..
i don't want to change the main view. What i want, is to open another window, for example when i press a button. If i used a dialog, i would use the DoModal method, but i want to open a Frame window, a window which i could resize. i think i didn't have to use the word CFormView
|
|
|
|
|
Does anyone have code that downloads a file from the internet and saves it into a file. I know I have to use this:
HRESULT URLDownloadToFile( LPUNKNOWN pCaller,
LPCTSTR szURL,
LPCTSTR szFileName,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
But I am not sure how I get this to work.
-Ryan M.
|
|
|
|
|
CString strUrl = _T("http://ravib.com");
CString strFilename = _T("C:\\ravib.txt");
HRESULT hResult = ::URLDownloadToFile (NULL, strUrl, strFilename, 0, NULL);
if (hResult != S_OK)
error(); /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
|
Hey can someone please point me to an article about how to set up a keyboard accelerator in a dialog based application i didnt see a link for stuff on accelerators here :P
|
|
|
|
|
|
:-Opleas help my to creat a graphic veiw to telnet aplication
thenk for all
|
|
|
|
|
Im having trouble using sockets with MFC
i have downloaded many examples
but everytime i try to compile my own they wont work
i need a simple tutorial to get me started with them
i would also like to figure out how to use sockets without MFC
|
|
|
|
|
Beej's Guide to Network Programming[^]... the best tutorial i've ever read about sockets. there, search for the PDF.
in fact, it's not exactly about windows sockets (it is even linux oriented), but this recalls the Berkeley sockets, which is quite the same whatever the plateform.
For windows, you just have to #include <winsock.h> , and to write some lines with WSADATA :
<font style="color:blue;">#include</font> <winsock.h>
<font style="color:green;">
{
WSADATA wsaData; <font style="color:green;">
<font style="color:green;">
<font style="color:blue;">if</font> (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
fprintf(stderr, <font style="color:purple;">WSAStartup failed.\n"</font>);
exit(1);
}
<font style="color:green;">//...</font>
}
But don't worry, that is explain it the 1.5. Note for Windows Programmers
have a look, that's interresting !
Best regards
TOXCCT >>> GEII power
|
|
|
|
|
Here are a couple of nice non-MFC tutorials:
You'd need to provide more information about the compilation errors you're getting if you'd like help!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
socketsdlg.h(34) : error C2146: syntax error : missing ';' before identifier 'cmSocket'
socketsdlg.h(34) : error C2501: 'CMySocket' : missing storage-class or type specifiers
socketsdlg.h(34) : error C2501: 'cmSocket' : missing storage-class or type specifiers
SocketsDlg.cpp
socketsdlg.h(34) : error C2146: syntax error : missing ';' before identifier 'cmSocket'
socketsdlg.h(34) : error C2501: 'CMySocket' : missing storage-class or type specifiers
socketsdlg.h(34) : error C2501: 'cmSocket' : missing storage-class or type specifiers
SocketsDlg.cpp(176) : error C2065: 'cmSocket' : undeclared identifier
SocketsDlg.cpp(176) : error C2228: left of '.Create' must have class/struct/union type
SocketsDlg.cpp(177) : error C2228: left of '.Connect' must have class/struct/union type
you can view the source of the files here
http://members.lycos.co.uk/archer282/Sockets/
|
|
|
|
|
You need to #include MySocket.h .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
thank you.
i never even thought to make sure thet it was inlcluding the header.
i just assumed since it was an MFC project that it would have been done automatically.
|
|
|
|
|
You all must be familiar with the send to menu in win, like when you right-click a file you get send to and then some program can I ad my program here(programaticly that is). Or even better can you ad it to the right-click menu instead, like when you right click it it will say edit with myapp next to edit with visual studio.?
|
|
|
|
|
|
I guess it's as simple as adding *.lnk file to some directory in windows root (at least it worked with simple directory links). Too bad I forgot the exact path, but you can easily find it anyway, I'm sure.
|
|
|
|