Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to restart a service every 3 hrs or reboot Windows every 3 hours Pin
sysmatrix21-Jun-04 11:42
sysmatrix21-Jun-04 11:42 
GeneralRe: How to restart a service every 3 hrs or reboot Windows every 3 hours Pin
palbano21-Jun-04 14:08
palbano21-Jun-04 14:08 
AnswerRe: How to restart a service every 3 hrs or reboot Windows every 3 hours Pin
ThatsAlok21-Jun-04 21:18
ThatsAlok21-Jun-04 21:18 
AnswerRe: How to restart a service every 3 hrs or reboot Windows every 3 hours Pin
gamitech22-Jun-04 13:25
gamitech22-Jun-04 13:25 
GeneralWin32 Serial Communications Pin
rollei35guy21-Jun-04 9:56
rollei35guy21-Jun-04 9:56 
GeneralRe: Win32 Serial Communications Pin
Trollslayer21-Jun-04 12:36
mentorTrollslayer21-Jun-04 12:36 
GeneralRe: Win32 Serial Communications Pin
rollei35guy21-Jun-04 14:56
rollei35guy21-Jun-04 14:56 
GeneralRemoving title bar from CMiniDockFrameWnd Pin
Ed Deighton21-Jun-04 8:24
Ed Deighton21-Jun-04 8:24 
Hi, I have coded a custom CMiniDockFrameWnd derived class that removes the WS_CAPTION bit from its style to remove the title bar from the toolbar in the app.

Only trouble is that that CDockContext class calls a static function in CMiniFrameWnd to calculate the drag rect of the bar. The function is defined as;

<br />
//afxwin.h<br />
static void PASCAL CalcBorders(LPRECT lpClientRect,<br />
	DWORD dwStyle = WS_THICKFRAME | WS_CAPTION, DWORD dwExStyle = 0);<br />
<br />
// winmini.cpp<br />
void PASCAL CMiniFrameWnd::CalcBorders(<br />
	LPRECT lpClientRect, DWORD dwStyle, DWORD dwExStyle)<br />
{<br />
	UNUSED_ALWAYS(dwExStyle);<br />
<br />
	AdjustWindowRectEx(lpClientRect, dwStyle, FALSE, WS_EX_PALETTEWINDOW);<br />
}<br />


Believe it or not, the CDockContext class uses the default parameters of the function so the drag rect of a tool bar is always calculated with a title bar and thickframe. This causes series bugs in my app not just a mis-aligned toolbar drag rect but the entire toolbar dragging screws up.

I was wondering if anyone knew a way to modify how CalcBorders behaives or how to modify the CDockContext::startDrag function without vast amounts of rewriting of MFC.

Ed Deighton - eddeighton@freeuk.com
GeneralRe: Removing title bar from CMiniDockFrameWnd Pin
palbano21-Jun-04 9:05
palbano21-Jun-04 9:05 
GeneralBuilding a neural network Pin
pavanbabut21-Jun-04 8:22
pavanbabut21-Jun-04 8:22 
GeneralRe: Building a neural network Pin
palbano21-Jun-04 8:56
palbano21-Jun-04 8:56 
GeneralRe: Building a neural network Pin
pavanbabut21-Jun-04 9:27
pavanbabut21-Jun-04 9:27 
GeneralRe: Building a neural network Pin
palbano21-Jun-04 11:00
palbano21-Jun-04 11:00 
GeneralHelp me out Pin
pavanbabut21-Jun-04 8:05
pavanbabut21-Jun-04 8:05 
GeneralRe: Help me out Pin
valikac21-Jun-04 9:16
valikac21-Jun-04 9:16 
GeneralRe: Help me out Pin
pavanbabut21-Jun-04 10:37
pavanbabut21-Jun-04 10:37 
GeneralFinding My Window State Pin
G.O.21-Jun-04 7:50
G.O.21-Jun-04 7:50 
GeneralRe: Finding My Window State Pin
vcplusplus21-Jun-04 8:24
vcplusplus21-Jun-04 8:24 
GeneralRe: Finding My Window State Pin
G.O.21-Jun-04 10:32
G.O.21-Jun-04 10:32 
GeneralRe: Finding My Window State Pin
Ravi Bhavnani21-Jun-04 12:21
professionalRavi Bhavnani21-Jun-04 12:21 
GeneralRe: Finding My Window State Pin
vcplusplus21-Jun-04 14:34
vcplusplus21-Jun-04 14:34 
GeneralRe: Finding My Window State Pin
Michael Dunn21-Jun-04 16:56
sitebuilderMichael Dunn21-Jun-04 16:56 
GeneralMC++ library in C# -- A Challenging Problem Pin
Dr. Shim21-Jun-04 7:24
Dr. Shim21-Jun-04 7:24 
GeneralInheriting a new View Class for MDI Pin
NTense21-Jun-04 6:24
NTense21-Jun-04 6:24 
GeneralRe: Inheriting a new View Class for MDI Pin
Ryan Binns21-Jun-04 18:34
Ryan Binns21-Jun-04 18:34 

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.