I am using a windows hook(WH_JOURNALRECORD) to hook right-click message system-wide. Once I detect a right-click message in the hook procedure, I want to remove the right-click message from the system message queue and prevent it from passing on to any window under the cursor or desktop('cause that will bring up whatever right-click context menu. I have no success on this. Could you please show me how to achieve this? Thank you very much in advance.
Could anyone please show me how to create an Always On Top window like ICQ or Task Manager except it is transparent? I want the window to be Topmost and no application being maximized can stay above it. I am creating my window like this, but it is not always on top. Please help, tell, or show me what to do, thank you.
// Create the window (this doesn't work, I don't know why)
// If I do a Alt-Tab, other windows being maximized can still go above it
hwndHotkey = CreateWindowEx(WS_EX_TRANSPARENT | WS_EX_TOPMOST,
WS_POPUP, 0, 0,
NULL, NULL, ghInstance, NULL);
Ulf is on the right track. However, I like the thick frame style so I take a somewhat backdoor approach. Catch the WM_NCHITTEST message (I think it is), which is the non-client hit test and tell the OS that it never hits the corners or sides. If you don't want it to be unmoveable then don't "let" it hit the title bar. This way, you can have a standard appearance but the window will be non-resizable and unmovable.
I agree that apps look better with the thick border style. Catching WM_NCHITTEST is not 100% foolproof, though. It prevents the user from resizing the window, but Windows can still resize it (if the user, for example, clicks "Tile windows" from the task bar). Also, if the window has a status bar, it can be resized with the status bar's gripper. These problems can be solved by catching WM_GETMINMAXINFO and setting the window's min and max tracking sizes.
"Aagh!! I'm a victim of a Random Act of Management!"
I'm working on a personal project using MFC. I'm still a beginner with it, however One thing that I'm having problems with is trying to figure out how to communicate between the different components of my application. I have a Main Frame window with the Report Control View (http://www.codeproject.com/miscctrl/reportctrl.asp), a toolbar, and a menu. Now, what I would like to do is allow the user to delete/edit entries in the view using the keyboard (catching windows messages for the view) and also using the toolbar and menu on the main window. How can I communicate with the view through the main window class? I'm finding it confusing trying to figure out the message maps for both view and frame.
I'm sure it will fall together when I get other peoples' ideas. I hope my description wasn't too confusing
HOw do I make a drop down list multiple selection?
CComboBox has dropdown list but with single selection. Wheread if i use listbox with multiple selection, I do not get the dropdown feature.
e-mail me at firstname.lastname@example.org
Your message did not reach some or all of the intended recipients.
Sent: 7/27/2001 4:36 PM
The following recipient(s) could not be reached:
'email@example.com' on 7/27/2001 4:36 PM
Unable to deliver the message due to a communications failure
The MTS-ID of the original message is: c=US;a= ;p=Nixor Corp;l=NIXORMAIN-010727203609Z-35
Why a combobox multiselecction?
The combo box only show the selection, and is for this that you only can select a item.
Why you can't use the listbox?
I received the same email error messsage as the other poster, so I am going to apply here as well ...
While this is not the best solution, and by no means the only one, I believe Microsoft has an ActiveX (OCX) Multi-Select ComboBox control available. While this is obviously not going to be a native code solution to your issue, based on the sense of urgency in your message, I'm guessing this "fix" will do.
Check your local machine first for installed ActiveX components, if you don't see one there, you should be able to locate it on the Microsoft website.
At the very least, this will fix your issue until you can implement a native C++ solution in your code.
I have changed out the main framework icon IDR_MAINFRAME with a 32bit color icon that I'd like to use. When I run my application in debug mode, I received about 5 "User Break Point" error messages from the depths of the MFC yelling about "invalid heap pointers" and whatnot; yet my program runs.
Release mode, of course, it all works wonderfully.
Is there a AFX setting, project setting, or something else I can set, define or include that will suppress these "user break points"? Additionally, if you can provide me a little "in-sight" as to why this occurs along with your answer to my original question, it would be greatly appreciated (I'm sure others would like to know as well).
I'd like to say this was indeed the problem, but I am unsure. To trouble shoot, I created an entirely NEW SDI project using the MFC Wizard. I imported my 32bit color icon, deleted the original MFC generated IDR_MAINFRAME icon from my resource file and named my new imported icon ID to IDR_MAINFRAME.
Clean. Rebuild all.
If I just "run" (!) the program it works, but when running in debug (F5) I get user breakpoints. The stack show I'm in NTDLL when I get a "heapblock modified" error message.
I've not written a single line of code at this point, I've only replaced the default 16 color icon with a true color icon.
Last Visit: 31-Dec-99 18:00 Last Update: 29-May-16 18:01