473,416 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Question regarding window caption font and Windows XP theme

We have a problem with the Windows XP theme:
We have a IDE which allows other developers to develop visual programs for their customers.
Our IDE allow them to set font for window captions easyly (through a dialog). It works fine fo
W98, 2000, NT, and XP is the theme is Classic. But on XP if the theme is "Windows XP", the
we have a problem: if the developer set the caption font to be say, "Script" (and all non-default
font), then the caption will be displayed twice: first with the default System font&default size
then with the set font (Script) and the new size, and the second one (the script font) doesn't
override the first drawing completely; it doesn't matter if the Script size is smaller, or larger tha
the system default; the second caption is drawn slightly to the right

We traceed the C++ SDK we used to develop this IDE, and found that when we get Windows
message WM_NCPAINT, the processing looks like this

+WM_NCPAINT process begi
(within VM_NCPAINT, we will get the following msgs
+WM_GETTEXTLengt
-WM_GETTEXTLengt
+WM_GETTEX
-WM_GETTEX
-WM_NCPAINT process en

For all the classic Windows systems (and XP with theme set to Classic), if we set the caption strin
to NULL in WM_GETTEXT msg process code, then the window will be displayed without a caption
If we return a caption string, then the caption will be displayed using the font we set, Script in thi
example

On the other hand, for XP with XP theme, even if we set NULL the caption in WM_GETTEXT proces
code, the window will be displayed with a caption in default system font/size! Of couse, if we retur
a caption string, it will be drawn using the Script font, thus override the default one, and mess up

So, the question is: is the XP behaivour a bug? (should act the same like all the other Windows systems
Or, how can we disable the drawing of the caption in default font? (NOTE: we have tried the following
set caption to NULL; set font to Script; put the caption back ==> still the same error. Also tried settin
the Foreground color to that of the background, then change font == > same error. Looks like as
long as we have an option, XP will always display it using the default font first .

Thanks for any suggestions.
Nov 17 '05 #1
0 3023

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
9
by: Randall Sell | last post by:
Can anyone confirm if I am being an idiot, or is this a bug in the CSS implementation of Netscape 7.x/Mozilla 1.4 ... give the following single HTML: <html> <head> <style type="text/css">...
4
by: JeffP | last post by:
I want to add a short-cut to a windows app similar to launching from a windows run line a New window, to prevent changing an existing browser window from moving off a current logged in session...
29
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the...
2
by: AJang | last post by:
The .NET windows form's default font size of caption and menuitem is a little too small for me. How to change these font size? Thanks Ajang
1
by: JD Kronicz | last post by:
Hi .. I have an issue I have been beating my head against the wall on for some time. I am trying to use late binding for MS graph so that my end users don't have to worry about having the right...
9
by: Just Me | last post by:
I need an image that agrees with the one shown at the right end of the title bar. That is, the image for the button that closes the window. I believe it changes with changes in the theme so I...
2
by: Trammel | last post by:
Hi. I have been trying to make a simple application that will sit in the background and alert me of any changes in window focus (IE: Pop-up windows) on my system. I have used...
1
by: kfc1976 | last post by:
Hi All, First of all, following are the facts 1) I've been trying to solve the following issue for the past 8 hours (Not Kidding) 2) If I can't find the answer, It will drive me completely crazy...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.