Board index » delphi » Borland Pascal 7.0 and CTL3D.DLL - Help,please

Borland Pascal 7.0 and CTL3D.DLL - Help,please

To anyone outhere.

        Could anyone help me. I need to write an app using old Borland Pascal 7.0
(with objects, of course). It must be compact program, but it must look
fine too. I tried to use the BWCC.DLL and all was OK. But BWCC is 164
kilobytes in size and too big. Then, I got an example on how to use
CTL3D.DLL with Pascal and the problems arises...

        The main window of my program is dialog window stored in recource file.
There is a class field in this dialog template. For BWCC.DLL I should set
this field to "bordlg". CTL3D works only if this field is empty. Still OK,
but I need to set the icon for the application. I used the "LoadIcon" call
without success, then I used the "SetClassWord" call to set the class icon.
But my program's window has no class and all dialog windows in other
programs inherits my program's icon. What to do ? Could you help me ? If
you know something about using CTL3D.DLL under Borland Pascal I will
appreciate any help. The only way I see is to stop CTL3D subclassing for
main window and draw this fine grey background "manually".

Thanks in advance



Re:Borland Pascal 7.0 and CTL3D.DLL - Help,please

CTL3D should not interfere with the management of you main window's icon.

Try to override GetWindowClass for your main window:

procedure TMyWin.GetWindowClass(var AWndClass : TWndClass);

  inherited GetWindowClass(AWndClass);
  AWndClass.hInstance := Application^.hResLib;
  AWndClass.hIcon := LoadIcon(Application^.hResLib, PChar(idIC_MYICON));
  hccIcon := AWndClass.hIcon;


Patrick Philippot

-pp (MainSoft sarl)
Compuserve: mainsoft /
tel/fax: +33 (0)1 69 40 94 85

Other Threads