|
Fair enough but ( ) this isn't the problem, calling Invalidate does not result in an WM_PAINT message when the control has no focus.
I *think* it has to do something wiht the activation state of the control, but I'm not fluent enough with the full control COM interfaces (which IMO is a mess), nor the MFC wrappers.
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
I think the answer may lie in calling COleControl::InvalidateControl() . See this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ah thanks! this looks more like it - will try tomorrow!
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
Hi all,
I want to disable functionality of mouse wheel in my application. I don't want the front end's scrollbars to scroll if user uses the mouse wheel.
Does any one how to do that. I would sincerely appreciate your help.
Thanks,
Kalyan
|
|
|
|
|
I'm curious why you would want to do that. The user has come to expect certain actions when the mouse wheel is used. For those actions to be different or non-existent in your application would seem a bit counterintuitive.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
The easiest way I can think of that is to "eat" the WM_MOUSEWHEEL messages, but as another poster has already said, it is a bad idea to change a user's expectations of their UI-interactive hardware.
That is one of the reasons why applications with Broken GUI pi$$ off so many people; they change the way things are supposed to work, or they do not work the way they are supposed to.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks for your replies guys.
One of my customer wants to disable the scrolling effect from mouse wheel in his application. This is for specific application. Can you please help me on how to disable the scrollwheel functionality. I don't have very good idea on windows user32.dll and messages. What are WM_MOUSEWHEEL Messages and how can I eat them. Is there any tutorial or example code to do this. I would sincerely appreciate your help guys.
Thanks,
Kalyan
|
|
|
|
|
it is very easy to do actually
use microsofts MSDN library for more information but all you need is
if(PeekMessage(0,&msg,0,0,1))
{
if(msg.message==WM_MOUSEWHEEL)
{
//code -- automatically destroys the "mousewheel" input
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg); //process the message
}
}
---- Tim Zorn
----------------no problem
|
|
|
|
|
Haven't had any suggestions on my previous posting
"Need a pointer in the right direction How do I change working drives, make directories, etc across a network (i.e. on a remote machine) ?? Can't seem to find any info on MSDN (but maybe I'm not looking for the right thing !! )"
Surely there must be a network version of _chdrive, _mkdir, etc, or the equivalent ?
Doug
Doug
|
|
|
|
|
Try using "\?\\machine\sharename" as your arg to the Win32 API CreateDirectory() . See this[^] link. Hope this helps.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
I am developing one application, i want to list all system used files, it may be exe, dll, etc. I downloaded one code from syteminternals.comm, they wrote separate sys file (alfa file monitor also). I need the following details
1. Without sys file how do hook the file sytems.
2. how do write the vxd for file sytems, if any sample code is avilble in net pls mention the website.
Regards,
|
|
|
|
|
This is very complex work, and the best way to do this is via the drivers (sys and vxd).
|
|
|
|
|
I am using Visual Studio 6.0.
I would like to use ShellExecute{} to launch the
registered email client and include a specific file
as an attachment to that email.
I don't want to include the 'To' email address
in the ShellExecute() call.
From Nishant's excellent article i have a starting point:
ShellExecute(this->m_hWnd,"open",
"mailto:nishinapp@yahoo.com","","", SW_SHOW );
How do I NOT include the email address but DO include
a file for attachment?
Thanks a lot,
Robert
|
|
|
|
|
I do not think that you can, you may have to use MAPI (look up "Simple MAPI" in MSDN).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks James.
I'm slugging through MSDN - one of my least favorite ways of finding info
|
|
|
|
|
Hi All,
I'm trying to provide a C function with a Class method as a function pointer,
roughly declared- void (__cdecl *) (void *) . the problem is, of course,
the __thiscall calling convention which is given to a class method by
default. This generates a conversion error by compiler.
Is there a way to somehow "convert" or type-cast the function calling?
I've tried to type-cast and reinterpret_cast it. Even tried declaring the
function as __cdecl from within the class but no luck.
Thanks very much for your help!
|
|
|
|
|
Not a recommended practice.
1. Pass a pointer to the class instance to your C function and then invoke the class member from there.
OR
2. Declare a static member function of the class, call it from the C function (You still need to pass pointer to class instance to static member function) and then invoke other member functions through the class pointer.
|
|
|
|
|
|
Hi All Gurus!!
I'm trying to use FileSystemObject to sort the file and folder before I access files information.
But I don't know how to createinstance of FileSystemObject.
I tried to import the
#import "c:\windows\system32\scrrun.dll" named_guids no_namespace raw_interfaces_only
or
#import "c:\windows\system32\scrrun.dll" no_namespace rename("FreeSpace", "FSpace") rename("Unknown", "Unk")
neither one is working. I got errors..
How do use FileSystemObject in VC++?
Thanks
|
|
|
|
|
pnpfriend wrote:
How do use FileSystemObject in VC++?
Are you sure you want to do this? Even if it is possible, it seems like a lot of work to simply sort a file and folder list.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
So.. what do you suggest?
I just simply want to sort files by name, type.. etc.
I was using FindFirstFile, FindNextFile..
But it seems like reading like following
c:\test
c:\test\a.txt
c:\test\b
c:\test\b\mm.txt
c:\test\c.txt
c:\test\d.zip
c:\test\d.zip\mm.txt
c:\test\m.txt
I want to sort the files first then get files info.
c:\test
c:\test\a.txt
c:\test\c.txt
c:\test\d.zip
c:\test\d.zip\mm.txt
c:\test\m.txt
c:\test\b
c:\test\b\mm.txt
thanks
|
|
|
|
|
pnpfriend wrote:
c:\test\b
c:\test\b\mm.txt
Shouldn't these two come between a.txt and c.txt?
pnpfriend wrote:
So.. what do you suggest?
You were on the right path with the FindFirstFile() /FindNextFile() pair. For each file/folder encountered, add it to a CArray object if you are using MFC, or a list object if you are using STL. Then sort. Another option is to add the file/folder items to a hidden listbox control that has the LBS_SORT style.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi David,
Thanks for ur reply.
No..
c:\test\b shouldnt' come between a.txt and c.txt because b is a folder not a file. I want all the file above folders.. just like you will see in ms explorer. I thought of using array.. but it is taking so long to sort it using array. I also did used ctreectrl.. again.. takes long time when minipulating huge files list..
Therefore, I was wondering to use FileSystemObject.
With FileSystemOjbect, I can sort folder first, then files later before minipulating any files information. I think.
But dont' know how to use it in c++. Do you have any idea?
|
|
|
|
|
pnpfriend wrote:
I want all the file above folders.. just like you will see in ms explorer.
That works. I initially thought you wanted each file/folder sorted in relation to ALL others.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
So do you know how to use FileSystemObject in c++?
or any other similar class that take care of it?
|
|
|
|