comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
July 2008
motuwethfrsasuw
 123456 27
78910111213 28
14151617181920 29
21222324252627 30
28293031    31
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Colored Edit control         


Author: Bob Masta
Date: Jul 4, 2008 11:56

Hello, all:

I'd like to be able to change the color of an edit control during
program operation, as a status indicator. From what I've read,
anything involving control color requires subclassing, so that's what
I'm trying to do.

The control (with a lot of other controls) is on my main window, which
is itself a dialog created with CreateDialogParam. As soon as I
create the main window, I get the handle of the control to be
subclassed via GetDlgItem and call SetWindowLong to subclass it to my
custom window handler. I know this is getting messages, but it never
gets WM_CTLCOLOREDIT, which is the one I think I need to handle to
change the control background color.

Can it be that this message is sent only once, when the control is
first created, and by the time my subclass is up and running it's too
late? If so, what can I do to force the issue? Or is there a better
way to do this whole thing? How about changing text color instead...
would that be easier (and if so, what message do I respond to)?

Many thanks!

Bob Masta
Show full article (1.26Kb)
3 Comments
  How to know when user use task switching         


Author: navi2000
Date: Jul 4, 2008 09:29

Hi group!

I'm writting an application and I need to know when user changes tasks
(ALT-TAB, for instance). The application is a full screen DirectDraw
app.
I need to know when the user activates the application and when the
user changes to other application.
First I've tried to capture WM_SETFOCUS and WM_KILLFOCUS messages, but
windows is sending these messages a lot of times, not only when really
is changing the focus.

Do you know any way to do it easily?
Thanks
1 Comment
  Time measurement problem during task switching         


Author: Simone Navari
Date: Jul 4, 2008 00:33

Hi everybody,

I written a DLL to interface with a custom PCI device; manufacturer
provides me via another DLL some functions to write and read bytes to
device and some other to know if board is ready to accept or send
data. What I need is to implement a timeout mechanism when my DLL has
to wait for some data, I've used timeGetTime function to measure
elapsed time from waiting start but if some other heavy processes are
running seems that my waiting routine is interrupted and when
scheduler gives me the control again a time greater than timeout is
elapsed so I return with an error. Is there a better way to do it or
the only solution is too increase a lot the timeout I use ?

Thanks in advance.
Simone Navari
1 Comment