|
Hi, Do You know how can the click mouse event be managed ?
In particular I'd like to know if it's possible receive, when I keep pressed the left mouse button, a sequential serie of mouse click events.
I'm interested into this fact because I'd like to implement scrolling in a custom control letting the possibility to scroll keeping pressed the left button with no necessity to click continuosly the mouse button.
Thanks.
Stefano.
|
|
|
|
|
Hello folks,
i'm searching for a class or any sample code to organize a graph (map or network).
I try to explain better, i just want to display a graph in a fine way, clear and well spaced.
Thanks in advance
Program your life ^^
modified on Wednesday, January 7, 2009 3:39 PM
|
|
|
|
|
Lookup "simulated annealing" - it's a good algorithm for laying out all kinds of data, from map labels to graphs.
Cheers,
Drew.
|
|
|
|
|
|
There 2 32bpp bitmaps with some images:
bitmap1
bitmap2
and graphics object g1 created from bitmap1
I set individualy alpha values in bitmap2 using LockBits:
Gdiplus::BitmapData bitmapData;
Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
PixelFormat32bppRGB, &bitmapData);
if (s == Gdiplus::Ok) {
unsigned int* pPixels = (unsigned int *)bitmapData.Scan0;
for (unsigned int i = 0; i < bitmapData.Height; i++) {
for (unsigned int j = 0; j < bitmapData.Width; j++) {
if (mask(i, j) > 0)
pPixels[j] &= 0xFFFFFFFF;
else
pPixels[j] = 0x00FFFFFF;
}
pPixels += bitmapData.Stride / 4;
}
pBitmap->UnlockBits(&bitmapData);
}
And then draw it on bitmap1 using g1. But the alpha blending does not happen?
chesnokov
|
|
|
|
|
Chesnokov Yuriy wrote: Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
PixelFormat32bppRGB, &bitmapData);
Shouldn't that be Format32bppArgb ?
The pBitmap bitmap must be Format32bppArgb as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you're the MVP.
Muchos gracias!
I do not believe how can I omited that ARG in this call? They were all ARGB created and cloned, but that single LockBits somehow avoided ARGB. Ohhh
Чесноков
|
|
|
|
|
Hi! I'm using Visual C++ 2005 Express Edition and I am trying to create an application that uses DirectSound. I found on DirectSound Documentation how to initiate it, but I still have some problems. When I initiate last member of DSBUFFERDESC (the struct that describes the characteristics of a new buffer), i get this error:
1>main.obj : error LNK2019: unresolved external symbol _GUID_NULL
referenced in function "void __cdecl InitDirectSound(struct HWND__ *)" (?InitDirectSound@@YAXPAUHWND__@@@Z)
Here is the code, where "GUID_NULL" (which is defined in dsound.h) appears:
DSBUFFERDESC pcDSPrimaryBufferDesc,
pcDSPrimaryBufferDesc.guid3DAlgorithm=GUID_NULL;
On my project Propetries>>Configuration Propetries>>Linker>>Input>>ADDITIONAL DEPENDENCIES I added dsound.lib, but on DirectX Documentation it says that some DirectSound functions use Dsound3d.dll as import library. Where should I add it? what did I missed?
Thank you in advance!
|
|
|
|
|
Member 3796009 wrote: On my project Propetries>>Configuration Propetries>>Linker>>Input>>ADDITIONAL DEPENDENCIES I added dsound.lib
Try adding Dxguid.lib as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I want to write a filter Driver for usb camera, but i don't how to do. anyone can help me? my email : forever_28@yahoo.cn
|
|
|
|
|
I want to build a space ship that flies me to Ganymed, but I don't know how to do. Anyone can help me? my email: forever_dumb@yahoo.cn
|
|
|
|
|
Hi!
I have some question about vista DWM and related feature.
My project wanna a feature that all output of screen be stored in an offscreen buffer, then a program modify the buffer, for example, twist the screen image or make output brighter or darker, at last the modified result be sent to the real user screen.
It is just something like flip3d in vista.
Do you think it is possible to achieve by using some windows API?
Please give me some suggestion
Thank you!!
|
|
|
|
|
I am using directx9 and Visual c++ for my project. I am trying to display a mesh loading from *.x file. The mesh object has texturing object. When I am trying to render the meash there is a background containing one texture from the mesh file. The problem is when I use color blending. If I desable color blending there is no pproblem.
|
|
|
|
|
hi, im trying to extract the alpha image from png image. Instead of using iterations pixel by pixel, is there anyother fast or good way to do this ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I want to zoom in on a bitmap like Paint where the further you zoom in, the larger the individual pixels appear without any interpolation. This is how I thought about doing it. First, I would read the bitmap into an array. Then, I would custom draw each pixel with the appropriate color from the array as squares. The size of the squares would depend on the zoom level. This is probably the worst way of doing it, but I couldn't think of anything else. Maybe, somebody can suggest a better way?
|
|
|
|
|
|
I have tried using DrawImage, but it appears to scale with some sort of interpolation applied. I need to zoom in and see the individual pixels. In other words, the further that you zoom in, the larger a single pixel will be drawn.
|
|
|
|
|
Oh wait, I just saw that I could use NearestNeighbor for the inpterpolation mode. I believe this will solve my problem.
|
|
|
|
|
|
Hi
I am having 10 bmp files and i want to make 1 gif file out of that using GDI+. Each bmp file should be displayed for particular time period. I searched a lot but unable to find the answer. I want to do it in C++.
|
|
|
|
|
Hi all,
I have some problems with directshow filters. I have a device (webcam) that provide some directshow filters for Capture (Source Filter) and Decoder Filter. So with those filters, I can capture and display the video in my local computer.
But I want to get the data from output pin of the Capture filter and using my own RTP stack(symmetric RTP, non-directshow written as a dll) to send it to a remote computer. And in the remote computer, I want to use my RTP stack to receive the video packets and using Decoder Filter to decode the data? So can I do something like that (mixed directshow filters with non-directshow)?
Thank you very much,
DBQ.
|
|
|
|
|
To attach to the output pin of a filter, you'll need to write a filter[^]
or a DMO[^].
I personally use a custom frame grabber filter . The samples
from the grabber filter can be used any way I want, including packaging
and sending on the network.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm rewriting a legacy application in C#/WinForms. The previous application (circa Win16) has a feature where it will plot 500,000+ points of data in under two seconds on my development machine.
I've written a plot control in GDI+ that will plot the same data in about 8 seconds on my development machine. This is with the inner loop as optimized as I can possibly get it.
This increase in plot time is unacceptable. The legacy application was written using GDI which is hardware accelerated and GDI+ is generally not.
The two options to fix this as far as I can tell is to write the plotter in GDI or in DirectX. If I write it in GDI, is there documentation anywhere on using it in a C# control (I'd like to use C# types if possible)? Is DirectX overkill and is it fast enough in a managed environment? Is there a third option I'm not thinking of?
I'd appreciate any feedback you guys have on how best to approach this problem.
Thanks,
Aaron
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Aaron Stubbendieck wrote: Is DirectX overkill and is it fast enough in a managed environment? Is there a third option I'm not thinking of?
Considering they use directx in video games I'm sure it is fast enough. I don't think being managed is the main problem actually because I wrote my own graphics work around in vb.net and it is probably >50 times faster than that (I'm not exagerating assuming you meant 500,000 pixels by "500,000 points") and it could probably be optimized further.
If you want a c# work around I found this article http://www.codeproject.com/KB/GDI-plus/csharpgraphicfilters11.aspx[^].
If you would like a copy of my vb.net work around I'd be glad to give it to you (it would be pretty strait forward to convert to c#). I've been meaning to write an article about it for about a year but never got around to writing it.
Mike
|
|
|
|
|
By 500k points I mean 500k x,y pairs, so probably more than 500k pixels.
I keep meaning to learn DX and I'd appreciate taking a look at what you've got to get me started.
Thank you
modified 12-Jul-20 21:01pm.
|
|
|
|