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
  Scrollbar Thumbsize         


Author: Piranha
Date: Jul 16, 2008 14:07

I´ve been messing around with SCROLLINFO and its options, yet I can´t
find a way to get the size of the thumb in a scrollbar right.

If I have a window with a scrollbar, that displays 12 out of 14
entries, Windows sets the thumb size to 1/3 the size of the scrollbar.
To my mind the thumb size in this case should be 6/7 of the scrollbar
size.

I´ve found tons of solutions how to adjust this in VC or VB, but isn´t
there a way to do this in plain C++ through an easy API call?
7 Comments
  Amount of time lost due to context switching?         


Author: zturner0826
Date: Jul 16, 2008 11:11

This is a bit of a strange question, and I'm actually having a bit of
trouble even phrasing it correctly.

I have a poorly designed server application that creates a separate
thread for every client request and processes a task in that thread.
Each thread has its own socket that it can communicate with its
corresponding client. Because of this, all socket I/O on an
individual socket is synchronous, and the ability to communicate with
multiple clients at the same time is handled by the thread scheduler.
Obviousy this is not terribly scaleable, as if I have say, 100 clients
then I have 100 threads. This results in a massive amount of context
switches, slowing down the performance of my application.

My goal is to find out -how much- it slows down the application. So
in this sense I want to know how much time the OS spends switching out
of or into one of the threads in my process. Even the ability to
find out how many context switches occured either to or from threads
in my process would be a good start, although I would also like to be
able to pin down how much time is associated with each actual context
switch.
10 Comments