|
I have created a palettized (256 color entries) directdraw off-screen surface. And a none palettized directdraw primary surface.
I would like to blit the palettized surface to the none palettized surface while maintaining the color information present in the palettized surface.
The cooperation level is set to DDSCL_NORMAL. I have attached a clipper to the primary surface and I have attached a palette to the off-screen surface. This construction does not work! And the directdraw documentation gives me the awnser why not:
"It is important to note that DirectDraw blits never perform color conversion; any palettes attached to the source or destination surface of a blit are ignored"
Is their any solution to this problem without having to do the color conversion yourself? It would be a lot less complicated!!
Thanks
|
|
|
|
|
hi,
I want to have enable the XP style Look & feel in my application even
if it is run on any Win2k Platform ...
How can i invoke that style...
Can u help me Out...
thnkx in advance
Vinod
|
|
|
|
|
You'll need a .manifest file. See here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
|
Hello,
When I tried it, it doesn't work.
Best Regards,
Aniket Salunkhe
|
|
|
|
|
Well it worked for me the msdev thing provided that your operating sytem was Win-XP.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
vinivc wrote: How can i invoke that style...
nope, you have to skin your application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
i want to detect if the Windows Media Player is active and then get some Information from it (like title, elapsed time, etc). If it is possible i would like to use the COM Interface. My Problem is, that i don't know how to check if an instance is running and then connect via COM to it. If i am using CreateInstance it'll always start the application (but this is not what i want to have). Is there any possibility to get the information (Mediaplayer active, time, and so on) by using COM, or is there another mechanism for solving this problem.
Greetings
Rene
|
|
|
|
|
Hooking could be a better option.But while using hooks you should know what you are getting into.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 9:32 Wednesday 7th June, 2006
|
|
|
|
|
Hello there again,
at least i found a little nice function called GetActiveObject. With this function i hoped to get Information if a media player is already running (and probably an pointer to it). But unfortunately this doesn't work. I always get an error (I only know the german error-string : Vorgang nicht vorhanden, in English it might be : process is not existing), although a media-player is active. If i am trying to detect if Word or Excel this Function works (i get an pointer to IUnkown, and an Error-Code with S_OK, only when Word/Excel is active).
Has anyone an idea why GetActiveObject doesn't work with media-player ?!
Might it be that the MediaPlayer.exe only instanciate an media-player-core, to which i am not able to connect to ?!
Thx
PS. here is my code-snippet that doesn't work :
HRESULT hr;
CLSID stCLSID_1;
LPUNKNOWN pUnk;
LPDISPATCH pDisp;
// if (SUCCEEDED (::CLSIDFromProgID(L"Excel.Application", &stCLSID_1)))
if (SUCCEEDED (::CLSIDFromProgID(L"MediaPlayer.MediaPlayer.1", &stCLSID_1)))
{
hr = ::GetActiveObject (stCLSID_1, NULL, &pUnk);
if (hr == S_OK)
{
pUnk->Release ();
return true;
}
}
return false;
|
|
|
|
|
Hello everyone!
Look at my function:
<br />
char * getPartName(char * fileName, int part)<br />
{<br />
printf("%i\n", sizeof(fileName));<br />
<br />
<br />
char *partName, *numExt, *partStr, *unexName;<br />
int remSpace;<br />
<br />
<br />
partName = malloc(sizeof(char) * (sizeof(getUnextendedName(fileName)) + 4));<br />
<br />
<br />
strcpy(partName, getUnextendedName(fileName));<br />
<br />
<br />
if (part == -1)<br />
strcat(partName, ".mtx");<br />
<br />
<br />
else<br />
{<br />
<br />
partStr = malloc(sizeof(char) * 4);<br />
<br />
<br />
sprintf(partStr, ".%2i", part);<br />
<br />
<br />
strcat(partName, partStr);<br />
}<br />
<br />
return partName;<br />
}
See the debug printf at the top? Well, why does it print out "4"? It's supposed to be 14... Even when I change that printf to display the actual filename it prints out "screenshot.png", so why the heck would it be 4? Anyone know? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
fileName is a char *
And sizeof(char *) == 4.
If you want to know the length, use strlen(fileName)
|
|
|
|
|
filename is a pointer to a char array, and a pointer is always 4 bytes long. Use strlen instead.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
The reason is because your using the sizeof operator to request the size of the array an not the pointer
eg:
<code>#include <iostream.h>
void main()
{
char *pszSite = "Code project";
cout << "The size of string is: " << (sizeof)pszSite << endl;
cout << "The size of character is: " << (sizeof)*pszSite << endl;
cout << "The size of pointer is: " << (sizeof)&pszSite << endl;
}</code>
In other words with using pointers to chars
- No prefix operator treats it as a string.
- Deferencing (asterisk) operator means get the contents to where it is
pointing to. - Address of (ampersand) operator means get the actual address of the
pointer
I hope that makes sense
Alton
|
|
|
|
|
|
I am trying to build a grid with 3 or 4 columns with editctrl. Any idea of how to expand it to a full fledged grid control
|
|
|
|
|
And why do you want to do that with an editcltr ? Why don't you simply use a grid control for that purpose ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
may be u can user editctrls with flexgrid.i.e work in the reverse order ,make a flexgrid and add controls to it .. search for editgrids...
|
|
|
|
|
|
arunvalli wrote: am trying to build a grid with 3 or 4 columns with editctrl. Any idea of how to expand it to a full fledged grid control
that require hell lot of coding, and why are you reinventing the Wheel, when there are thousands of freely available FlexGrid and related things
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello everyone:
Please help me how to send a custom message to a window service?
Thanks.
-Freehawk
|
|
|
|
|
I think you should first check if it is practically possible to create a hidden window from a service. Since the service normally is started before the user enters the system, I suppose it will be impossible to create the helper window on early stage. You should try to create the window after the user logs in.
If you manage to create a helper hidden window from your service, then you can use the WM_COPYDATA message to send messages from your application to service.
Otherwise, if you do not found a solution, I am afraid you have to use a thing called Inter-process Communication (IPC). There is a series of methods: sockets, shared memory, pipes and others, that you have to investigate.
|
|
|
|
|
sunyw_2006 wrote: Please help me how to send a custom message to a window service?
Nishant Sivakumar has written a nice article on Windows Service. Apart from that take a look at ControlService and SERVICE_USER_DEFINED_CONTROL .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hi friends,
I have an application built using VC++ 6.0 .
In these we incorporate serial communication using
rs-232 serial port and also thru USB-Serial adapater
Now ny requirement is to put a small delay only when
the application runs thru USB-Serial not when normal serial
communication is used to run the application.
These delay is have to do since the data transfer
thru USB-Serial is faster as compared to normal serial
Now can u please tell me how to find whether the application
is running thru USB-Serial or Normal Serial port.
|
|
|
|