Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Window not receiving all its messages Pin
Cathy3-Aug-03 13:48
Cathy3-Aug-03 13:48 
GeneralRe: Window not receiving all its messages Pin
Joe Woodbury3-Aug-03 9:14
professionalJoe Woodbury3-Aug-03 9:14 
GeneralRe: Window not receiving all its messages Pin
Marcus Spitzmiller3-Aug-03 10:37
Marcus Spitzmiller3-Aug-03 10:37 
GeneralRe: Window not receiving all its messages Pin
Joe Woodbury3-Aug-03 18:11
professionalJoe Woodbury3-Aug-03 18:11 
GeneralRe: Window not receiving all its messages Pin
Marcus Spitzmiller4-Aug-03 3:20
Marcus Spitzmiller4-Aug-03 3:20 
GeneralFlat CComboBox and CIPAddressCtr Pin
Eugene Pustovoyt3-Aug-03 5:41
Eugene Pustovoyt3-Aug-03 5:41 
GeneralRe: Flat CComboBox and CIPAddressCtr Pin
PJ Arends3-Aug-03 8:45
professionalPJ Arends3-Aug-03 8:45 
GeneralRe: Flat CComboBox and CIPAddressCtr Pin
Eugene Pustovoyt3-Aug-03 9:07
Eugene Pustovoyt3-Aug-03 9:07 
GeneralRe: Flat CComboBox and CIPAddressCtr Pin
PJ Arends3-Aug-03 9:24
professionalPJ Arends3-Aug-03 9:24 
GeneralRe: Flat CComboBox and CIPAddressCtr Pin
Eugene Pustovoyt3-Aug-03 17:52
Eugene Pustovoyt3-Aug-03 17:52 
GeneralRe: Flat CComboBox and CIPAddressCtr Pin
PJ Arends3-Aug-03 18:36
professionalPJ Arends3-Aug-03 18:36 
QuestionDetected memory leaks..Did I solve it ? Pin
Hesham Amin3-Aug-03 5:03
Hesham Amin3-Aug-03 5:03 
AnswerRe: Detected memory leaks..Did I solve it ? Pin
John R. Shaw3-Aug-03 9:55
John R. Shaw3-Aug-03 9:55 
GeneralWndProc Within a class Pin
M.Mostafa3-Aug-03 1:16
M.Mostafa3-Aug-03 1:16 
GeneralRe: WndProc Within a class Pin
S O S3-Aug-03 3:15
S O S3-Aug-03 3:15 
GeneralRe: WndProc Within a class Pin
John R. Shaw3-Aug-03 10:05
John R. Shaw3-Aug-03 10:05 
Generalgetting files and directory. Pin
Anonymous3-Aug-03 0:40
Anonymous3-Aug-03 0:40 
GeneralRe: getting files and directory. Pin
HPSI3-Aug-03 0:54
HPSI3-Aug-03 0:54 
GeneralRe: getting files and directory. Pin
Bob Stanneveld3-Aug-03 7:49
Bob Stanneveld3-Aug-03 7:49 
Questionhow to get the other window's scrollbar handle ? Pin
yoyo2-Aug-03 23:22
yoyo2-Aug-03 23:22 
AnswerRe: how to get the other window's scrollbar handle ? Pin
HPSI3-Aug-03 1:25
HPSI3-Aug-03 1:25 
There are three issues here:

Issue #1: How to get the scrollbar HWND

Using a tool like HPS HwndSpy, you can examine the hierarchy of windows that Word uses. In the case of Word 2000 (Office XP), if you open Word with an empty document, you will see this hierarchy:

"Document1 - Microsoft Word"  class OpusApp
   ""  class _WwF
      "Document1" class _WwB
         ""  class ScrollBar
         ""  class ScrollBar

(The window titles are in quotes, followed by the window class name).

As you can see, there are two scrollbars, one vertical and one horizontal. It seems like the horizontal scrollbar is always second. So, to find the HWND of the horizontal scrollbar programmatically, simply traverse the window hierarchy for Word, until you come to class _WwB, and then grab the second ScrollBar.

Issue #2: It may not work like you expect

Some programs react violently when you try to send them messages. It may work, or it may not work, or it may cause Word to crash. So before you invest a lot of effort into this, you should first verify that it will work as you expect.

Issue #3: Different versions may be - well, different

You should verify that this technique will work on all the versions of Word that you are interested in. Different versions may have different window hierarchies, and may also react differently when you try to control the scrollbar.


HPS HwndSpy
- GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
GeneralRe: how to get the other window's scrollbar handle ? Pin
yoyo3-Aug-03 16:56
yoyo3-Aug-03 16:56 
Generalhey guys..new bie here Pin
virtualspy2-Aug-03 22:46
virtualspy2-Aug-03 22:46 
GeneralRe: hey guys..new bie here Pin
Rein Hillmann2-Aug-03 23:02
Rein Hillmann2-Aug-03 23:02 
GeneralRe: hey guys..new bie here Pin
virtualspy3-Aug-03 1:48
virtualspy3-Aug-03 1:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.