|
OK, an image has a setPixel method too. But, if you want to set a lot of pixels, you should read my image processing articles, which means you need to do it in C# and call it from a library.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, I would like to write a program, which would give me a possibility of viewing one computer's screen by some other computers connected via LAN. I've tried to print the main computer's screen (server) using timer, make a jpg file, and send it to other computers (clients) via LAN, which opened given jpg. Unfortunately this method isn't good, because it charges server computer too much. Does anyone know how can I solve this problem?
How can I read and broadcast view of the computer's screen easly?? Maybe I could read display's buffers somehow? Please help me.
|
|
|
|
|
Do you just need snapshots of the screen? If so, then grabbing the screen pixels takes very
little CPU horsepower so reading display buffers will give you little advantage.
The real trick is compressing and sending the pixel data in real time.
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
You're looking for a VNC library. If a part of the screen doesn't change, why transmit it? You're just wasting bandwidth doing that. Google for "vnc vb.net[^]" and you'll find some examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello,
can someone tell me how to to render a movie onto two monitors, i've a bit of code that reners the file on a picturebox. When i tell my computer to use two videocards and do the same thing on each screen, only the main screen shows the video / movie. the other shows a black hole. how can i solve that problem.
FilgraphManager graphManager = new FilgraphManager();
graphManager.RenderFile(file);
// Attach the view to a picture box on the form.
try
{
videoWindow = (IVideoWindow)graphManager;
videoWindow.Owner = (int)pictureBox1.Handle;
videoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
videoWindow.SetWindowPosition(
pictureBox1.ClientRectangle.Left,
pictureBox1.ClientRectangle.Top,
pictureBox1.ClientRectangle.Width,
pictureBox1.ClientRectangle.Height);
}
catch
{
// An error can occur if the file does not have a video
// source (for example, an MP3 file.)
// You can ignore this error and still allow playback to
// continue (without any visualization).
}
mediapos = (IMediaPosition)graphManager;
imex = (IMediaEventEx)graphManager;
imex.SetNotifyWindow((int)this.Handle, WM_GRAPHNOTIFY, 0);
// Start the playback (asynchronously).
mc = (IMediaControl)graphManager;
mc.Run();
willem-jan
|
|
|
|
|
Check out the IVMRMonitorConfig interface.
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Please can you help me some more, i'm new to directx and i think i'm gettinig it a litle bit. On a wxp machine i'm not using the extended monitor option. Both monitors show the same app and picturebox of course. It seems strange to me that any picture, shown in the picturebox shows up in both the screens, but when rendering a video by direct x it won't show on the second screen. You answered me (thanx) to do something with the "IVMRMonitorConfig interface" bth where in the code should i do what to get there?
|
|
|
|
|
XP uses the Video Mixing Renderer 7 (VMR-7) filter for video rendering by default. You could
eumerate the filters in the graph and find the VMR-7 filter and obtain the IVMRMonitorConfig
interface from it.
I'm not sure how you'd do it on two monitors, both displaying the same. You have two separate
video adapters you said, right? Maybe in that case you'd need two renderers, both set to the
same window, but configured to display on different monitors.
If that doesn't work, then another (possibly simpler) solution is to implement your own video
renderer filter using GDI instead of DirectX for drawing. That will draw to both just as
picture's (bitmaps) do.
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
|
I have the following task to perform but cant find a good solution.
The have to be able to play a number of small mpeg2 files in sequence without any sign of jumping from one to next. I need to be able play forward/backwards as well as fast forward and rewind modes. I have experimented using the Direct Show editing services, but this does not support VR8 or 9 so the performance is poor. I have also tried some SDK's from LeadTools and Elecard but these have limitations with no workaround.
Any advice as to the best way forward is much appreciated.
Coxy.
|
|
|
|
|
[previously posted on the VC board, no satisfactory answer there so I thought I would repost it on this new forum that may be better suited]
Hey all,
I am busy updating my CFileEditCtrl class[^] to support XP themes. As part of that update I want the browse button to be drawn the same as a combo box dropdown button, except without the arrow. Using DrawThemeBackground automatically draws the arrow.
HTHEME hTheme = OpenThemeData(*this, L"COMBOBOX");
LRESULT ret = DrawThemeBackground(hTheme, dc, CP_DROPDOWNBUTTON, CBXS_NORMAL, CRect(10, 10, 27, 27), NULL);
Is there any option that will draw the themed button background without the arrow?
I tried using the scroll bar's thumb as the background as it works fine in silver colour, but not in blue or green.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I'd guess your problem is you're using the wrong theme data. Why draw a plain button using a combo box theme?
This article might be helpful: Color Picker for WTL with XP themes[^] - the code there draws a button with a dropdown arrow, I imagine you could use the same code, just leave out the arrow drawing.
|
|
|
|
|
Thanks for the hint, but that is not what I am after.
Michael Dunn wrote: Why draw a plain button using a combo box theme?
I do not want a plain button. In the default blue theme a plain button has a whitish background with a dark blue border and it shows hot by drawing a yellow box around the client area. A combo box button is different shades of blue depending on it's state. My control is supposed to have the look and feel of a combo box, but the button is supposed to bring up a dialog, not just drop down a list box. As such I want to be able to draw my own icon on the button instead of the arrow. ie I want to draw a disk for saving files, a folder for opening files, a book for opening the windows address book, a printer for selecting a printer, an eye dropper for picking colours, etc.
Maybe I am just picky, but there must be a way to draw a button using the same colours as a combobox button. I have no problem doing all the drawing in my own code, I just need to know which APIs I have to call to get the colours needed, how to draw the borders so it matches the current theme and all the fun stuff like that.
With a scroll bar thumb the thumb background and the grip are drawn seperately so it is possible to draw the thumb without a grip. I had thought I could use the thumb theme instead of the combo box button for what I want but unfortunately the borders are drawn differently so it just did not look right. If the combo box button had the same drawing principle as the scroll bar thumb and had seperate code for the background and the arrow I would be set, but it does not so I am screwed in my quest.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I see now... Unfortunately, the combo box theme only defines one part, CP_DROPDOWNBUTTON . If the button border, background, and arrow were separate parts, you could just draw the parts you wanted and leave out the arrow. But it doesn't look like the combo box was set up to do that.
|
|
|
|
|
Yeah, I figured that much out too, hence my question of is there a work around that will allow me to do what I want. Surely there must be a way, even if it ends up being a little convoluted. All I need is a pointer to the correct APIs. So far my searches in MSDN has led nowhere.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Well, since I asked for the forum, I will go first.
I used to use 3DS Max to create my models, but after upgrading to windows vista, it no longer works.
What 3D modelling studios work well with vista?
|
|
|
|
|
I haven't moved to vista, but I expect that Max will create a patch if you are using the latest version, or have a new version. They will not let a new OS drop completely through, they would end their business.
I haven't migrated over to Vista yet. I have done a lot of testing with it, but model making is not one of those tests yet. Sorry.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Put it like this. Vista has been out for a long time now, hell I've been using it about 6 months. I'm sure that is long enough for any company to come out with a patch, even a beta patch. But MAX has so far done nothing.
|
|
|
|
|
WalderMort wrote: But MAX has so far done nothing.
then your best bet is to download the eval/SE/education copies for some of the others and try them. I have used everything under the sun at least briefly (sometimes only at conferences, but some for complete evals). I haven't tried any of them under Vista yet.
If they are saving for a new release mark a full digit higher, expect a release in July for Siggraph.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
WalderMort wrote: But MAX has so far done nothing.
Max I believe is OpenGL, and during initial pre-beta all indications were OpenGL was going to be dropped completely by Microsoft. You may have a scenerio where Max started a 100% ground up rewrite to support Vista before MS changed their minds a few months into the first beta.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Jeffry J. Brickley wrote: Max I believe is OpenGL
Actually it supports OpenGL, DirectX, Software, Other (?).
It suggests, by default, to use DirectX.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I stand corrected. shows I haven't used any of these lately.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
WalderMort wrote: But MAX has so far done nothing.
The average modeler/graphic artist doesn't have an MSDN subscription either and Vista migration is slow by most. It still hasn't been a full month since the official Vista release, so don't be so hasty. Don't forget the market aspect of any business. No market, no money/time spent.
Besides any serious company isn't going to make the jump to Vista just because it's new. They wouldn't move to Vista until all their tools are ready for it (which cost far much more money and time to learn to use) can also make that move to Vista. I'd wager most of them would rather it work right than right now anyway. Besides, most rendering farms need all the spare CPU power they can get, and Vista just gobbles away even more of it than XP.
In other words, there's no real benefit to it other than it's the latest and coolest toy. Give it time, I'm sure they'll do something about it soon enough. And if you need to use Max, then don't use Vista - problem solved.
|
|
|
|
|
|
Nice work, but what's with the shadow's on the arms and legs ( or lack of )?
|
|
|
|
|