Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do you burn CDs?

3 views
Skip to first unread message

Gordon

unread,
Dec 26, 2002, 11:07:08 PM12/26/02
to
Does anyone know anything about writing CD-RW?

What DLLs can be used and information on common DVD-RW/CD-RW device drivers?

Any information pertaining to developing software to write to DVD-R/RW and
CD-R/RW is greatly appreciated.


Christian ASTOR

unread,
Dec 29, 2002, 8:21:58 AM12/29/02
to

Gordon a écrit:

With ASPI (SendASPI32Command()), or XP interfaces such IDiscMaster
(ASM sample http://www.hochfeiler.it/alvise/cd-r.htm, but easier in C or
C++...)

Billy Zhang[MSFT]

unread,
Dec 29, 2002, 8:46:27 PM12/29/02
to
Hi,

You can take a look at the Image Mastering API in Windows XP.

Best Regards,

Billy Zhang
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com

Ando Sonenblick

unread,
Jan 7, 2003, 7:10:21 PM1/7/03
to an...@spritec.com
Gang,

I need to clip the drawing of my child windows but no matter what I try,
nothing works. I'm going crazy and I need your help!

Here is the situation:

I have a window:

+------------------------------------+
! !
! !
! !
! !
! !
! !
! !
! !
! !
! !
! !
! !
+------------------------------------+

I then add a child "edit" window to it:

+------------------------------------+
! !
! !
! +-------------+ !
! ! This is a ! !
! ! sample edit ! !
! ! child window! !
! ! ! !
! +-------------+ !
! !
! !
! !
! !
+------------------------------------+

I now have an arbitrary region (which I paint
and is indicated here by #'s). I want to prevent
any child windows from drawing to area
occupied by the region.

+------------------------------------+
! !
! !
! !
! !
! !
! ####### !
! ############# !
! ################# !
! ################# !
! ############# !
! ####### !
! !
+------------------------------------+

When put together, what I am __trying__
to get is this:

+------------------------------------+
! !
! !
! +-------------+ !
! ! This is a ! !
! ! sample edit ! !
! ! child w####### !
! ! ############# !
! +---################# !
! ################# !
! ############# !
! ####### !
! !
+------------------------------------+

But what I'm getting is:

+------------------------------------+
! !
! !
! +-------------+ !
! ! This is a ! !
! ! sample edit ! !
! ! child window! # !
! ! ! ### !
! +-------------+ ##### !
! ################# !
! ############# !
! ####### !
! !
+------------------------------------+

That's because after I paint my region
the child window draws fully to its
rectangular extent, clobbering the
intersected portion of the region.

And if I paint the region after the child
window draws, unacceptable flicker occurs.

So I must clip the drawing of the child window itself.

What I've tried - all to no avail - is:

1. Setting the ClipRegion of the child window.
2. Setting the MetaRegion of the child window.
3. Setting the ClipRegion of the parent window.
4. All Combinations/permutations of the clip and
meta regions of all windows!

Nothing works! I cannot seem to clip the display of
my child "edit" or "scrollbar" windows!

Ack! Help me! What do I do here!

Any help or suggestions is wildly appreciated!

Thanks,
Ando

Norman Bullen

unread,
Jan 7, 2003, 10:36:53 PM1/7/03
to

When your child window needs to paint itself, it will send its parent a
WM_CTLCOLORxxx message. This messages passes a HDC as wParam.

You should be able to use GetClipRgn() to get any current clipping
region, then use other region functions to "clip" your image are "out"
of the clipping region, and then SelectClipRgn() to make that the new
current clipping region.

Remember that you must return a HBRUSH to be used in painting the
backgroup.

Norm

Ando Sonenblick

unread,
Jan 8, 2003, 3:44:49 PM1/8/03
to
Norman,

Thanks for the tip but it didn't work.

In fact, on EVERY SINGLE MESSAGE to my parent window I set the clip of my
child window and it STILL drew wherever and however it wanted to...

I also messed around quite a bit with SetWindowRgn but:

1) it has no apparent effect child windows.
2) when placed on my parent window, drawing does get clipped as I want but
also there are other problems: the system uses the window rgn to determine
which window is clicked on...

So I get portions of my window that I click on but the system thinks I
clicked on the desktop or some other window.

And try as I might, I cannot hook in low enough to do a
SetWindowRgn(customClipRgn), call the child,
SetWindowRgn(originalWindowRgn);

Ando

in article 3E1B9CD5...@BlackCatAssociates.com, Norman Bullen at
no...@BlackCatAssociates.com wrote on 1/7/03 7:36 PM:

> When your child window needs to paint itself, it will send its parent a
> WM_CTLCOLORxxx message. This messages passes a HDC as wParam.
>
> You should be able to use GetClipRgn() to get any current clipping
> region, then use other region functions to "clip" your image are "out"
> of the clipping region, and then SelectClipRgn() to make that the new
> current clipping region.
>
> Remember that you must return a HBRUSH to be used in painting the
> backgroup.

> Ando Sonenblick wrote:

Richard Wilson

unread,
Jan 9, 2003, 2:47:24 AM1/9/03
to
Ando Sonenblick wrote:
>
> When put together, what I am __trying__
> to get is this:
>
> +------------------------------------+
> ! !
> ! !
> ! +-------------+ !
> ! ! This is a ! !
> ! ! sample edit ! !
> ! ! child w####### !
> ! ! ############# !
> ! +---################# !
> ! ################# !
> ! ############# !
> ! ####### !
> ! !
> +------------------------------------+
>

The only valid way to do this is to have another partially transparent
control on top of the edit control. This is how I managed to get it
working:

1. Add a TPanel to the Parent control and set it's Align property to
alClient, its Caption to '', and remove the bevels. This will be on top
of the editor at design time at the moment, so do a "Send To Back" to
get it behind the editor.

2. Add a TPaintBox to the TPanel, set its Align property to alClient, so
now you have a paintbox which covers the whole panel.

3. Add code similar to the following in the FormCreate method:

procedure TForm1.FormCreate(Sender: TObject);
var
Rgn: HRGN;
begin
Panel1.BringToFront;
Rgn := CreateEllipticRgn(0,0,201,201);
SetWindowRgn(Panel1.Handle, Rgn, true);
end;


Of course, you may want to put the region creation/setting code in a
routine somewhere which works out what shapes to include.

4. Add the OnPaint method to the PaintBox, for example:

procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
with PaintBox1.Canvas do
begin
Brush.Color := clRed;
Ellipse(0,0,200,200);
end;
end;


Whenever you change the shapes, you will need to create a new (possibly
complex if you have more than 1 shape) region to assign to the Handle of
the Panel.

Hope this helps!

Richard

Richard Wilson

unread,
Jan 9, 2003, 3:44:20 AM1/9/03
to
Sorry, once again I wrongly thought I was still browsing a Delphi
newsgroup. Hopefully you can use the principles found in the code to
achieve the task you required.

Regards,
Richard

Ando Sonenblick

unread,
Jan 9, 2003, 1:42:22 PM1/9/03
to
in article 3E1D2908...@bitwise-systems.com, Richard Wilson at
ri...@bitwise-systems.com wrote on 1/8/03 11:47 PM:


Rich,

I can try this but I've noticed also that if I have two edit controls and
they overlap, they will still draw over each other even when their
WS_CLIPSIBLINGS flags are set - so how will they respect an overlapping
"other" window if they don't respect each other?

ando

0 new messages