|
Where is in palette of 256 colored bitmap -tranparent color ?
Like in 16 colored ?
thanks you.
|
|
|
|
|
No such colour. Bitmaps don't have intrinsic transparency, and don't contain mask information to allow it to be implemented simply. Most mechanisms to support this rely on a pixel at a fixed position being the reference 'transparent' colour.
There are articles on CP and MSDN about how to render bitmaps using transparency.
Steve S
|
|
|
|
|
Yes I can find pixel to set it with a color
that can be treated as transparent ?
I set That color..
that is code,
how to universaly translate it to
not show some color -getting background some way?
<br />
if (m_MemDC)<br />
{<br />
dc.BitBlt(0,0,m_Width, m_Height, m_MemDC, ((m_ImageIndex) * m_Width),0,SRCCOPY);<br />
}<br />
|
|
|
|
|
Look at the entry for TransparentBlt() in MSDN.
It can do what you want, but is only available at W2k and newer.
You can simulate its effect using a mask and a few more bitblts. Find articles about how here at CP and also at codeguru.
*duck* *dashing away zigzaging to escape the rotting fruits aimed at him*
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Useful Reference.
I will read and test as fast as only possible.
|
|
|
|
|
Also have a look at DirectX Color Key and the various Blit funtions that support it (Source and Destination Transparency).
|
|
|
|
|
:-DDear all,
I am developing an application using MFC VC++ Version 6.0 on Windows 2000 platform. The purpose of this application is to delete all the created files/folders (created/copied-pasted files).
I am using DeleteFile API to delete the files. The program is working perfectly fine but it is creating problem in case of system files
If I give a path of a system file in DeleteFile API , the function fails.
(THE SYSTEM FILE IS NOT IN USE)
//////////////////////////////
eg.
If we have two files in a folder named c:\folder, rohit.txt and MSDOS.SYS , then the following program deletes the rohit.txt file but doesnot deletes MSDOS.sys
#include <windows.h>
#include <iostream.h>
void main()
{
int x = DeleteFile("C:\\folder\\rohit.txt");
cout<<"\nValue of x is"<
|
|
|
|
|
Dear All,
ACTUALLY The main problem with DeleteAPI file is that if the file has HIDDEN ATTRIBUTE, THEN DELETE FILE DOESNOT WORK.
Even if we specify a text file having hidden attributes , the deletefile api doesnot work.
So can anybody tell me how to delete a file which is having hidden attribute. ???
Rohit
|
|
|
|
|
Yes, use GetFileAttributes to check if the file is readonly. If it is, use SetFileAttributes to remove the readonly flag. Then delete it.
Magnus
|
|
|
|
|
If I recall correctly, ::DeleteFile does not work if the targets have any of the attributes in "system", "read only" and "hide", you need to make sure to remove all attributes from the target by calling ::SetFileAttributes(_T("c:\\folder\\MSDOS.sys"), FILE_ATTRIBUTE_NORMAL); period to perforimg the deletion.
|
|
|
|
|
I am trying to create an application that is capable of working with multiple documents, each having its own view. In the InitInstance() function I have done the following:
BOOL CTestApp::InitInstance()
{
... Other code
LoadStdProfileSettings(15); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(IDR_FIRSTTYPE,
RUNTIME_CLASS(CTypeOneDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CTypeOneView));
if (!pDocTemplate)
return FALSE;
AddDocTemplate(pDocTemplate);
CMultiDocTemplate* pDocTemplateT;
pDocTemplateT = new CMultiDocTemplate(IDR_SECTYPE,
RUNTIME_CLASS(CTypeTwoDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CTypeTwoView));
if (!pDocTemplateT)
return FALSE;
AddDocTemplate(pDocTemplateT);
... Other code
I have all appropriate view and document classes in place for these doc templates and the project compiles without any problems. Every time I try to open a document saved with this app, the app just loads a blank document of the type that I tried to open. Does anyone have any suggestions? Any leads to the problem would be appreciated.
BNEACETP
|
|
|
|
|
Hello,
I had that kind of problem too, seemed to be connected with
the call to ProcessShellCommand(cmdInfo)
I bracketed the lin in an if-statement like this
<br />
if( !cmdInfo.m_strFileName.IsEmpty() )<br />
if( !ProcessShellCommand(cmdInfo) )<br />
{ return false;<br />
}<br />
Now the application just starts and waits for the user to open a file.
Regards
G. Steudtel
|
|
|
|
|
There's some info in MSDN which talks about checking the cmdInfo.m_nShellCommand and not processing it if it's CCommandLineInfo::FileNew. I've done the same with one of my apps, rather painlessly. That way it doesn't break DDE, which I believe it could otherwise do.
Steve S
|
|
|
|
|
I want to add some words below the Icon dynamically,should I redraw the Icon? Now I can only add words on the range of the size of Icon by redrawing the Icon,and it is not available for me to add words if they are too long.I think it should have some good methods to make the words text out below a Icon just similarly alike the desktop icon of windows.The words and the Icon could be dragged together.
who could give me a method? You'd better send me a source code,thank you very much!
a beginner in programming with vc++
|
|
|
|
|
I posted a message last night, but I only got one reply, so I'm posting it a bit differently. I will be needing to create an application in which I manipulate 2 or more streams of digital audio into one stream. I've never really worked with digital audio before, and somebody last night responded that I should use DirectX to handle this. As it would work out, I haven't used DirectX yet either, and I need a place where I can start.
The two biggest questions I have at this point are:
1) I need reference materials, if anybody knows of quality books that I will be able to learn the audio features of DirectX, including writing my own filters, I'd appreciate the guidance. (I tried to find books on my own, but all I could find was books teaching 3D Gaming )
2) What do I need to begin toying with DirectX C++ on my computer? I already have the Visual Studios .NET, if that helps at all. Do I need to download or buy anything to write DirectX applications, and if so, where should I look?
Thanks a lot for any help you can give me on this, it is definitely appreciated!
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
DougwW48 wrote:
What do I need to begin toying with DirectX C++ on my computer?
The DirectX SDK 9.0b (? I think thats the latest)
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp[^]
DougwW48 wrote:
I need reference materials
The SDK has lots of samples in it, you'll probably need a filter with two input pins which will probably be a little stuffing round.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
There are not really many books available!!!
This is the only one that might be of help to you
Programming Microsoft DirectShow for Digital Video and Television
by Mark D. Pesce
Product Details
Paperback: 450 pages ; Dimensions (in inches): 1.39 x 9.00 x 7.38
Publisher: Microsoft Press; Book and CD-ROM edition (February 12, 2003)
ISBN: 0735618216
Average Customer Review: Based on 2 reviews. Write a review.
Amazon.com Sales Rank: 17,958
http://www.amazon.com/exec/obidos/tg/detail/-/0735618216/qid=1060863786/sr=1-1/ref=sr_1_1/103-6524762-8773411?v=glance&s=books
Having downloaded the DirectX 9.x SDK there are several samples to guide you on your way, ahh the joys of being a early adopter.
One thought if you are determined to use VS.NET rather than VS6 at least use C++ NOT MC++ C# VB.NET etc etc. The .NET languages will just be using wrappers to access the DirectX COM interfaces !
BTW all of DirectX is accessed via COM api's so I hope that you have some COM experience or it really is going to be a steep learning curve!
NOTE all this is just language, framework and technologies. We are not talking about covering DSP, digital filtering algorithms etc.
There are generic books available about these subjects
|
|
|
|
|
scroll in listview ???
my listview has 16 columns and it dont show all of data in it.
Is there a way to scroll to right
(such as to display last column) without use HScroll
thanks
|
|
|
|
|
You want to scroll without using the horizontal scroll bar. Is that right? If so, you'll have to make each of the columns narrow so they all fit within the view area.
|
|
|
|
|
Hi Dear
Thanks to all of them answer to my Question.
I Want to List All Constant Variables ( Like MB_OKCANCEL,SW_SHOW,... ) in a popup menu DevStudio(VC++6) When I Press Ctrl+Spce in Editor.
Question : Is This request true or can any body do it?
ps : Please Forgive Me Because Of My Bad English.
|
|
|
|
|
Those symbols are preprocessor #defines, not variables, so IntelliSense does not show them. Visual Assist will do that, however I do not use that product myself, so I can't say how well it works.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Does anybody can help me?
regs
xnew
xinhua xia
|
|
|
|
|
maybe SAFEARRAY would help?
|
|
|
|
|
Hello,
I Have one dialog application. I am creating some objects dynamically in OnInitDialog() method which are used life time of the application. I want to know best method to delete these objects on closing the application.
Thanks,
Chito
|
|
|
|
|
If they are created in OnInitDialog() and stored within the dialog, then the obvious place to delete them would be within the dialog destructor. Since in a dialog app, the application will terminate not long after the dialog is destroyed, it is probably the best place to do it.
Dave
http://www.cloudsofheaven.org
|
|
|
|