473,566 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_GETTEXTLeng t
-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 3035

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

Similar topics

38
5024
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 out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script...
9
3770
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"> <!-- caption {
4
5963
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 to another web application. And, I'd like it to be a chromeless window, sans toobars and sized similar to a popup. TIA
29
4973
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 window properly but does not pass the parameter. (this is part of a coldfusion template) <a href="##"
2
2730
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
7921
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 version of the MS Graph type library. Up until now I have been walking them through the process of setting the references to include their version...
9
1497
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 can't simply dup one. Any one know how I can, at run time, obtain the image currently being used?
2
6446
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 DirectTextToSpeech from Microsoft and tried the following code... The problem I am having is that it detects its own caption fine... but no captions of other...
1
2229
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 Platform: XP Pro, .net 2.0 FrameWork, Visual Studio 2005 Problem Regarding:
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.