[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

WM_FONTCHANGE - bug in Outlook Express?

Posted on 2005-04-14
9
Medium Priority
?
389 Views
Last Modified: 2010-04-05
Hi,
This is my whole application.:)

procedure TForm1.Button1Click(Sender: TObject);
begin
  SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0);
end;

What's wrong with it?

Run on XP SP2. Launched Outlook Express.
Each time I press a button1, the buttons on Outlook Express toolbar are getting wider and wider.
Can You test it? is it the same?
What can i do?

Thanks.
0
Comment
Question by:mokule
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 11

Expert Comment

by:pcsentinel
ID: 13790110
What are you actually trying to achieve here? The message you are sending wiill brodcast a system wide message thet the base font size for the desktop has changed. There may be a bug in OE that isn't responding to this properly

regards
0
 
LVL 11

Expert Comment

by:pcsentinel
ID: 13790126
Having tested it on my XP2 OE no it doesn't happen
0
 
LVL 17

Author Comment

by:mokule
ID: 13790269
>>What are you actually trying to achieve here?
It is of course a part of a bigger application.
I've stripped everything to be sure where is the problem.

Anybody else tested it?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Expert Comment

by:BlackTigerX
ID: 13795647
will try at home and let you know, I have your same configuration
0
 
LVL 17

Author Comment

by:mokule
ID: 13795747
Thanks
I'll be waiting for some time yet.
I'm interested also on tests on other configurations.
0
 
LVL 26

Accepted Solution

by:
Russell Libby earned 2000 total points
ID: 13807893
mokule,

Yes, its a bug in Outlook express 6.0 (and yes, I get the same result). If it works fine for some people, then I would guess that they fixed it in some obscure patch/service pack. One alternative though would be to handle the broadcast message yourself, and exclude outlook from the list of windows to message to. An example of this:

function BroadcastExclude(Exclude: String; Msg, wParam, lParam: Integer): Integer;

type
  PExcludeMessage   =  ^TExcludeMessage;
  TExcludeMessage   =  packed record
     Exclude:       Array [0..255] of Char;
     Msg:           Integer;
     wParam:        Integer;
     lParam:        Integer;
  end;

var
  ExcludeRecord:    TExcludeMessage;

  function EnumWindowsProc(Handle: HWND; Param: Integer): BOOL; stdcall;
  var   lpClass:    Array [0..256] of Char;
        lpExclude:  PExcludeMessage;
  begin

     // Cast param as pointer to exclude message
     lpExclude:=PExcludeMessage(Param);

     // Get the window class
     if (GetClassName(Handle, @lpClass, SizeOf(lpClass)) > 0) then
     begin
        // Lower case the string
        StrLower(@lpClass);
        // Check exclude string in the class name
        if (Pos(LowerCase(lpExclude^.Exclude), lpClass) = 0) then
        begin
           // Send the message
           SendMessage(Handle, lpExclude^.Msg, lpExclude^.wParam, lpExclude^.lParam);
        end;
     end;

     // Continue enumeration
     result:=True;

  end;

begin

  // Fill in the exclude message
  ZeroMemory(@ExcludeRecord, SizeOf(TExcludeMessage));
  StrPLCopy(@ExcludeRecord.Exclude, Exclude, 255);
  ExcludeRecord.Msg:=Msg;
  ExcludeRecord.wParam:=wParam;
  ExcludeRecord.lParam:=lParam;

  // Enumerate all windows
  EnumWindows(@EnumWindowsProc, Integer(@ExcludeRecord));

  // Dummy result
  result:=ERROR_SUCCESS;

end;

procedure TForm1.Button1Click(Sender: TObject);
begin

  BroadcastExclude('outlook express', WM_FONTCHANGE, 0, 0);

end;

Hope this helps,
Russell



0
 
LVL 17

Author Comment

by:mokule
ID: 13808752
Thanks Russell
Works great.
Maybe it has something to do with localized version of OE.
Which one do You test ?

mokule
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 13808775

US version of OE, version 6.0.2800.1123

Russell
0
 
LVL 17

Author Comment

by:mokule
ID: 13809092
Thanks again.
mine is 6.0.2900.2180

mokule
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses
Course of the Month17 days, 20 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question