Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
6dc6f731
Commit
6dc6f731
authored
Apr 11, 2000
by
Mike Wiering
Browse files
Improved 256 color support
parent
de161c0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/ObjectIO/ObjectIO/OS Windows/Windows_C_12/cCrossCall_12.c
View file @
6dc6f731
...
...
@@ -823,6 +823,31 @@ EnumFontSizeProc (ENUMLOGFONT FAR * lpelf, /* pointer to logical-font data */
return
1
;
}
static
void
AdjustMenuBarName
(
void
)
{
/* PA: previous version did not set the frame window title.
Appending the topDocWindow title should be done by the MDI interface.
char apptitle[70];
char wintitle[32];
if (ghTopDocWindow != NULL)
{
GetWindowText (ghTopDocWindow, wintitle, 31);
wsprintf (apptitle, "%s - [%s]", gAppName, wintitle);
SetWindowText (ghActiveFrameWindow, apptitle);
}
else
{
SetWindowText (ghMainWindow, gAppName);
}
*/
if
(
ghActiveFrameWindow
!=
NULL
)
{
SetWindowText
(
ghActiveFrameWindow
,
gAppName
);
}
}
/* Win(M/S)DIClientToOuterSizeDims returns the width and height needed to add/subtract
from the client/outer size to obtain the outer/client size.
...
...
@@ -3419,6 +3444,7 @@ SDIFrameProcedure (HWND hWin,UINT uMess,WPARAM wPara,LPARAM lPara)
ProcessShortcutTable
shortcuts
;
ghTopDocWindow
=
NULL
;
AdjustMenuBarName
();
shortcuts
=
(
ProcessShortcutTable
)
GetWindowLong
(
hWin
,
0
);
// get the local shortcut table
DestroyProcessShortcutTable
(
shortcuts
);
// and destroy it.
...
...
@@ -3601,6 +3627,7 @@ SDIFrameProcedure (HWND hWin,UINT uMess,WPARAM wPara,LPARAM lPara)
ghActiveClientWindow
=
NULL
;
gAcceleratorTableIsUpToDate
=
FALSE
;
// The active global accelerator table is not up to date
}
AdjustMenuBarName
();
return
DefWindowProc
(
hWin
,
uMess
,
wPara
,
lPara
);
}
break
;
...
...
@@ -3650,7 +3677,7 @@ SDIFrameProcedure (HWND hWin,UINT uMess,WPARAM wPara,LPARAM lPara)
HWND_BOTTOM
,
/* this value is ignored (SWP_NOZORDER) */
0
,
0
,
/* these values are ignored (SWP_NOMOVE) */
(
int
)
LOWORD
(
lPara
),(
int
)
HIWORD
(
lPara
)
-
toolbarHeight
,
/* new width and height */
SWP_NOACTIVATE
|
SWP_NOMOVE
|
SWP_NOZORDER
SWP_NOACTIVATE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOREDRAW
);
}
}
...
...
@@ -3770,6 +3797,7 @@ MDIWindowProcedure (HWND hWin,UINT uMess,WPARAM wPara,LPARAM lPara)
DestroyLocalWindowData
(
wdata
);
// and destroy it.
ghTopDocWindow
=
NULL
;
AdjustMenuBarName
();
return
0
;
}
case
WM_ENTERMENULOOP
:
...
...
@@ -3929,6 +3957,7 @@ MDIWindowProcedure (HWND hWin,UINT uMess,WPARAM wPara,LPARAM lPara)
ghActiveFrameWindow
=
NULL
;
ghActiveClientWindow
=
NULL
;
}
AdjustMenuBarName
();
return
DefMDIChildProc
(
hWin
,
uMess
,
wPara
,
lPara
);
}
break
;
...
...
@@ -4966,16 +4995,14 @@ HandleCleanRequest (CrossCallInfo * pcci)
}
break
;
/* Create a SDI document window. */
case
CcRqCREATESDIDOCWINDOW
:
/*
textptr
, frameptr, packed pos, w,h, flags; client ptr result. */
case
CcRqCREATESDIDOCWINDOW
:
/*
not used
, frameptr, packed pos, w,h, flags; client ptr result. */
{
HWND
hwndFrame
,
hwndClient
,
hwndToolbar
;
POINT
clientDims
,
frameDims
,
winpos
;
LPCTSTR
pwintitle
;
DWORD
styleFlags
;
RECT
tbRect
;
int
tbHeight
;
pwintitle
=
(
LPCTSTR
)
pcci
->
p1
;
hwndFrame
=
(
HWND
)
pcci
->
p2
;
winpos
.
x
=
pcci
->
p3
>>
16
;
winpos
.
y
=
(
pcci
->
p3
<<
16
)
>>
16
;
...
...
@@ -5000,14 +5027,13 @@ HandleCleanRequest (CrossCallInfo * pcci)
/* Adjust the pos and size of the frame window. */
SetWindowPos
(
hwndFrame
,
NULL
,
winpos
.
x
,
winpos
.
y
,
frameDims
.
x
,
frameDims
.
y
,
SWP_NOZORDER
);
UpdateWindow
(
hwndFrame
);
SetWindowText
(
hwndFrame
,
pwintitle
);
/* The client style flags are WS_CHILD and styleFlags. */
styleFlags
|=
WS_CHILD
;
/* Create the new client window of the frame window. */
hwndClient
=
CreateWindow
(
SDIWindowClassName
,
/* Class name */
pwintitle
,
/* title */
NULL
,
/*
No
title */
styleFlags
,
/* SDI client style flags */
0
,
tbHeight
,
/* x, y */
clientDims
.
x
,
clientDims
.
y
,
/* width, height */
...
...
@@ -5121,7 +5147,9 @@ HandleCleanRequest (CrossCallInfo * pcci)
break
;
case
CcRqSETWINDOWTITLE
:
/* hwnd, textptr no result. */
{
SetWindowText
((
HWND
)
pcci
->
p1
,
(
LPCTSTR
)
pcci
->
p2
);
rprintf
(
"SWT: handle = %d, text =
\"
%s
\"\n
"
,
(
HWND
)
pcci
->
p1
,
(
char
*
)
pcci
->
p2
);
SetWindowText
((
HWND
)
pcci
->
p1
,
(
char
*
)
pcci
->
p2
);
AdjustMenuBarName
();
MakeReturn0Cci
(
pcci
);
}
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment