Click here to Skip to main content
16,005,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: utilcls.h and comobj.hpp files Pin
toxcct17-Aug-06 4:48
toxcct17-Aug-06 4:48 
GeneralRe: utilcls.h and comobj.hpp files Pin
Cedric Moonen17-Aug-06 4:48
Cedric Moonen17-Aug-06 4:48 
GeneralRe: utilcls.h and comobj.hpp files Pin
great_tommy17-Aug-06 4:57
great_tommy17-Aug-06 4:57 
QuestionGet the default printer Pin
Wim Engberts17-Aug-06 3:54
Wim Engberts17-Aug-06 3:54 
AnswerRe: Get the default printer Pin
Wim Engberts17-Aug-06 4:41
Wim Engberts17-Aug-06 4:41 
AnswerRe: Get the default printer Pin
Hamid_RT18-Aug-06 6:24
Hamid_RT18-Aug-06 6:24 
QuestionHow to Get The Height of the Tool Bar Pin
cybersadhu17-Aug-06 3:53
cybersadhu17-Aug-06 3:53 
AnswerRe: How to Get The Height of the Tool Bar Pin
Wim Engberts17-Aug-06 3:58
Wim Engberts17-Aug-06 3:58 
There are two ways:

1:
RECT ToolRect;
RECT WndRect;

CToolBar::GetWindowRect (&ToolRect);
GetWindowRect (&WndRect);
ToolRect.left -= WndRect.left;
ToolRect.right -= WndRect.left;
ToolRect.top -= WndRect.top
ToolRect.bottom -= WndRect.top;

This will give you the positions relative to the upper-left corner of the main window. Usually however, you will need the co-ordinates relative to the upperleft corner of the window's client area. This is done by

2:
RECT ToolRect;
RECT WndRect;

CToolBar::GetWindowRect (&ToolRect);
GetClientRect (&WndRect);
ClientToScreen (&WndRect);
ToolRect.left -= WndRect.left;
ToolRect.right -= WndRect.left;
ToolRect.top -= WndRect.top
ToolRect.bottom -= WndRect.top;

Success,
WIlliam
QuestionHow do I get an automated instance of MS Word to print preview it's document? Pin
TClarke17-Aug-06 3:52
TClarke17-Aug-06 3:52 
AnswerRe: How do I get an automated instance of MS Word to print preview it's document? Pin
Wim Engberts17-Aug-06 4:44
Wim Engberts17-Aug-06 4:44 
GeneralRe: How do I get an automated instance of MS Word to print preview it's document? Pin
TClarke17-Aug-06 4:47
TClarke17-Aug-06 4:47 
GeneralRe: How do I get an automated instance of MS Word to print preview it's document? Pin
TClarke17-Aug-06 5:53
TClarke17-Aug-06 5:53 
Questionhow to receive data from microcontroller wirelessly Pin
Muhammad Azeem Azam17-Aug-06 3:36
Muhammad Azeem Azam17-Aug-06 3:36 
AnswerRe: how to receive data from microcontroller wirelessly Pin
Rage17-Aug-06 4:05
professionalRage17-Aug-06 4:05 
QuestionColors to the controls Pin
kiranin17-Aug-06 3:36
kiranin17-Aug-06 3:36 
AnswerRe: Colors to the controls Pin
Hamid_RT17-Aug-06 3:47
Hamid_RT17-Aug-06 3:47 
AnswerRe: Colors to the controls Pin
Wim Engberts17-Aug-06 3:49
Wim Engberts17-Aug-06 3:49 
AnswerRe: Colors to the controls Pin
Mahesh Kulkarni17-Aug-06 3:56
Mahesh Kulkarni17-Aug-06 3:56 
QuestionReplacing Floating frame class ( m_pFloatingFrameClass ) Pin
Maximilien17-Aug-06 3:28
Maximilien17-Aug-06 3:28 
QuestionMemory Management Pin
tepz17-Aug-06 3:20
tepz17-Aug-06 3:20 
AnswerRe: Memory Management Pin
cmk17-Aug-06 3:40
cmk17-Aug-06 3:40 
AnswerRe: Memory Management Pin
benjymous17-Aug-06 5:16
benjymous17-Aug-06 5:16 
QuestionCombo Box problem Pin
u6ik17-Aug-06 2:54
u6ik17-Aug-06 2:54 
AnswerRe: Combo Box problem Pin
toxcct17-Aug-06 3:06
toxcct17-Aug-06 3:06 
GeneralRe: Combo Box problem Pin
Rage17-Aug-06 3:21
professionalRage17-Aug-06 3:21 

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.