How to create a "really" transparence MFC control?

    I wrote a D3D app based on the MFC dialog,the app's draw frequency is 30FPS.It has a main dialog,i create the D3D device on it,also i create some sub dialogs and controls on this main dialog.When i run this app, some errors appear.When i click or move the sub dialogs and controls it reflash on the background(I think the MFC's draw frequency unequal to the D3D app's draw frequency cause this problem), this bring on the bad effect.Is there any methods let this sub dialogs and controls didn't reflash or redraw themself to be "really" transparence:only receive or send the WM messages(such as mouse and keyboard messages)
    Anyone know how to solved this?Please help me,thanks...
0
anonymous (74722)
5/25/2004 9:06:04 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
434 Views

Similar Articles

[PageSpeed] 44

Hi,

If you can receive the mouse messages for the parent window then you don't 
need a window. Since you won't have a window it is then 100% transparent. IE 
if you have rectangular region (or complex if you wish) then you can simply 
use CRgn::PtInRegion using 'parent' coordinates to determine if a mouse 
message is in your "transparent window".

- Tim



"CrazyDog" <anonymous@discussions.microsoft.com> wrote in message 
news:443B1CE7-2D22-4C89-80D2-974A14DE3242@microsoft.com...
>    I wrote a D3D app based on the MFC dialog,the app's draw frequency is 
> 30FPS.It has a main dialog,i create the D3D device on it,also i create 
> some sub dialogs and controls on this main dialog.When i run this app, 
> some errors appear.When i click or move the sub dialogs and controls it 
> reflash on the background(I think the MFC's draw frequency unequal to the 
> D3D app's draw frequency cause this problem), this bring on the bad 
> effect.Is there any methods let this sub dialogs and controls didn't 
> reflash or redraw themself to be "really" transparence:only receive or 
> send the WM messages(such as mouse and keyboard messages).
>    Anyone know how to solved this?Please help me,thanks... 


0
Tim
5/25/2004 9:37:33 AM
Consider overriding WM_ERASEBKGND in the controls and simply returning, instead of calling
the superclass. If that doesn't do the job, the other suggestion about just handling mouse
events yourself (and you might be able to do things like
	SendMessage(WM_COMMAND, MAKELONG(BN_CLICKED, id));
to yourself. I'm not really sure if the LPARAM window handle is actually used by MFC, but
if you can do this, you can retain your existing structure of handlers)
					joe

On Tue, 25 May 2004 02:06:04 -0700, "CrazyDog" <anonymous@discussions.microsoft.com>
wrote:

>    I wrote a D3D app based on the MFC dialog,the app's draw frequency is 30FPS.It has a main dialog,i create the D3D device on it,also i create some sub dialogs and controls on this main dialog.When i run this app, some errors appear.When i click or move the sub dialogs and controls it reflash on the background(I think the MFC's draw frequency unequal to the D3D app's draw frequency cause this problem), this bring on the bad effect.Is there any methods let this sub dialogs and controls didn't reflash or redraw themself to be "really" transparence:only receive or send the WM messages(such as mouse and keyboard messages).
>    Anyone know how to solved this?Please help me,thanks...

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
5/25/2004 4:15:35 PM
Reply:

Similar Artilces:

Printing emails really small
Hi My Outlook 2k3 prints single page emails fine, but If i try to fit one which is over 1 page - it shrinks to fit - making it unreadable. Shrink to fit is not enabled and I'm printing on a networked printer. The owner of the workstation that the printer is hooked up to has no problem. It was fine yesterday! Can anyone point me to the appropriate setting for stopping this behaviour? K ...

2007 pop-up form opens really small
I have a split database in Access 2003 format. Back-end database with tables is on network drive and three users have identical copies of the front-end forms database loaded on their individual machines. Two of these users have Access 2007 and only one of them is experiencing this really weird problem. I have a main form from which the user can open several pop-up forms to edit combo box source records by clicking on various buttons. For one of the 2007 users however, the pop-up forms open in these really tiny slivers of windows (1/4 inch by 1/4 inch)...you can barely see them. The strang...

Email invoicing is really cumbersome
Currently the email invoicing that comes with GP is so cumbersome, it takes us 30 minutes to email the invoices on 6 orders. This is really lame. The process should be automated. Converting each invoice into a PDF and then emailing it takes WAY too long for an ecommerce business. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsr...

I Really need help with formula
I have CK4 Min. hours & CL4 Max hours & CM4 is going to = Differece between CK4 & CL4, CG5:CG65 =names & CJ5:CJ65 =hours remember hours & names belong together, Now what i want is to have Names transfered over to CK5:CK65 if greater than 28 from Min to Max & leave cells blank if less Also in CG5:CG65 for names i have this formula =INDIRECT("B" & VLOOKUP(ROW()-4,CP$5:CR$65,3,FALSE)) & I have a #NA only until names are entered in other cells So in CK5:CK65 IF LESS THAN 28 lEAVE IT BLANK see your MIN/MAX post -- Biff Microsoft Excel ...

Not really new but baffled. Where do my posts disappear to??
Hi there, I use this site quite a lot, but its more luck than judgement that I ever see any of the replies I am sent. I get sent an e-mail with a link to the replies that doesn't work, I search for the question exactly as I wrote it and it isn't in the list, I try searching by author but it doesn't know my username exists!!!!!!!!! i must spend a good 15 minutes each time trying to find it, but so far I have spent half an hour looking and can't find a single post I've ever put in!!! PLEASE HELP!!! without all the clever people on here my job would be sooo painsta...

GP10 Upgrade gone really wrong.
After about a month of testing on a test server where everything worked just fine, we upgraded our production companys from GP9 sp2 to GP10 feature pack 1 last weekend. At first everything looked good. Our order entry department doesn't post invoices every day so the first time invoices were posted was late Wednesday afternoon. We use Field Service Contract Administration to generate contracts on the product we sell. When posting invoices from the SOP batch, it crashes at the point of generating the contract audit. Posting hangs and GP shuts down. The only way to recover the ba...

Saving CRM Appointment REALLY SLOW
When we try to create appointments using the Outlook form and then use the "Track in CRM" button and select a "regarding account" . . . it take a LONG time to save and close that window. And it's not a hardware problem as this is a newer machine. Is there a better way to do this or a way to increase performance? -- Brandon Presentations Direct - "Document Finishing Solutions" http://www.presentationsdirect.com We observed this occasionally too, but not all the time. I understand that it does involve synching with Outlook Calender at the same time...

Office 2007 Pro Plus
Earlier this year my company upgraded all of us to Office 2007. I read about some of the changes and was somewhat excited! Like the ability to have spreadsheets of more than 65K rows and 256 columns. In my job duties I often look at data in Access that is hundreds of thousands of lines long. More than 256 columns seldom comes into play , it's really the rows that initially made me happy. Now I could export these large tables to excel spreadsheets and manipulate the data in excel. Well now the ability of Excel to handle more than 65K rows seems more like a curse than anything else!! Recent...

Really Need Some Help Here
RMS V 1.3.1006 We have a closed location. We do not have their database (this was our first closed location - 1 yr ago). This location has inventory that resides on it. Their computer has been retasked, and wiped clean for the new location. We have reports that pull that location's inventory. That is bad. I have worked around the RMS reports to add filter qualities, like Store Region <> Closed, etc. However, now we are also using a separate reporting tool that does not function like this. Does anyone (please help me!) know a query that can be run from the HQ side to compl...

OK, I really want to move my Outlook info from 2003 to Outlook 2007
Is there a good way WITHOUT connecting the two computers? (I CAN connect them over a network if it is REALLY necessary.) I want to transfer ALL folders (Inbox, folders I created, calendar) that have info. I don't have any rules created. Is there a site that shows what files need to be moved? For the breakdown: http://www.slipstick.com/config/backup.asp In any event, pop3/imap users would copy over the *.pst files. The *.pab is only used under Outlook 97/98 but not so much under newer versions like Outlook 2000-2007. "Drasher" <rich.lega@gmail.com> wrote in message ...

I really need help with a formview problem
I have a formview that I place a toolbar onto. In my OnInitialUpdate(), after I create the toolbar, I say GetParentFrame()->RecalcLayout(); ResizeParentToFit(FALSE); ResizeParentToFit(TRUE); The formview is still not sized properly. It looks like the problem is the toolbar on the top of the formview. It is not being taken into account in sizing the formview. The difference at the bottom of the form that is not displayed is the size of the toolbar. Any suggestions? Should work if your toolbar was created (and docked) back in your CMainFrame::OnCreate() method. ----- William Gower ...

Has CRM really benefited you?
Im a novice at CRM software..... just now learning Id be interested in knowing what kind of industry you are in and what CRM software you use.....and more importantly exactly how it has benefited you or your company Opinions? Advice? hi, we are using MS-crm in a fashion, and we had low expectations. I think you could say management have a clearer idea of what sales people in the field are upto in terms of level of activity eg. visits and linked to that the oportunities they are generating for internal based support staff... purely from that it is helping push proactive selling. "...

OK, a really tricky one now for Excel gurus!
A perfect response before, this time a little trickier! I have two data sources: Data A) a column of approx. 3000 cells featuring the 'Post Code' only from a database of addresses. Data B) The Australian postcode database as found and downloaded from the below link: http://www1.auspost.com.au/postcodes/index.asp?sub=2 What I want to happen is each postcode from source 'A' to match up with the corresponding post code from source 'B' (this is in column A). Once it matches, the 'Delivery Office' (column E) is to appear in column B of Data Source Sheet A......

I feel like an idiot (but I'm not, really!)
This will probably be a most stupid question. I've been using Money/Quicken for years but I've just started using the reports and planning. On income and spending reports, for example I am getting my expenses inflated when I use a charge card. Here's an example. I get my car repaired for $100 and pay for it with my credit card. I then enter that transaction as a car repair that cost $100. I then pay via checking account, $100 to the credit card company. So now it looks like I've paid $200 and my auto expense for the time period was $200. What in the heck am I overlo...

Outlook not really closing?
When I close Outlook (usually via the "x" button on the top right of the window) I think that it is still running. I check webmail from work and when I left my PC running, with Outlook closed, there were no new messages when I checked via webmail. However, when I got home and opened Outlook the messages were there. The Task Manager doesn't show it as running when I checked it. What I've had to do is to restart the PC before leaving for work. (it's used by my wife). I'm running Outlook 2003 on Win XP SP2. Any ideas? Thanks. See http://www.slipstick.com/problems...

how to create custom lookup (is c360 really the only way?)
I have checked out the SDK in hopes of learning how I could create a custom lookup that would sit on the menu bar of the contacts view just like the Contact Look up does now... I do understand that the primary field is the one that is used for the lookup but I'd like to add another. It's just a pain to have every one have to go to an advanced search... I've read everything in this news group about this and it doesn't look like people have had much success with it... has anyone? The c360 solution is pretty sharp looking. But $100 a seat just to add a custom search featur...

Determine if a report is REALLY printing
Good evening all! I have a problem that I cannot seem to find a way around. (Isn't that always the case here!) I want to be able to set a bit in my db if a record has run in a report and has actually printed. I have created the code that is marking the record as I desire, but it does if even if the page is only previewed! I was thinking (wrongly it seems now) that the on print event would only fire if the report was actually sent to the printer... But it seems that it fires when the report is written to the screen. Does anyone have any suggestions as to how I should acomplish this?...

Is the HITB reset tool and report REALLY the answer?
Since upgrading to 9.0 we can no longer balance our stock status report to GL in our average cost/manufacturing envirornment. Will this new HITB tool/report allow this? Is it available for 9.0? Can it be run against just 1 company to test? Thank you.. MES, Because of changes in the Average Perpetual valuation methods in GP9, the Stock Status will no longer tie out to your GL. This verbiage is directly from the 'How to determine, maintain, and report accurate costing in Inventory' article MS published in June, 2007 - The Stock Status report is intended to provide a current snaps...

Really simple or really impossible?
Hey Guys, Since this is the second time I thought: "Wouldn't it be handy if.." am now asking the pro's. :) For stress analysis of a tube frame, Excel is handy because after th initial sin/cos/tan type formulas, you can see the forces and peak change with different dimensions of the frame. However, if this fram is a 'mechanic' that changes position, for example the tippin mechanism of a truck, there is an added variable: the angle of th tipping. If I want to make this graphic in Excel, and want to accurately see ho the forces react from 0degs to 90degs tipping, I ...

I could really need your help on importing contacts into Outlook (Please?)
Hi all, I need to import literally 3000 contacts into Outlook. Unfortunately, the list (in plain text) looks like the list on the bottom of my message (small example). I'm faced So, clearly, the data is not in a databaserecordformat (with fields from the left to the right). Thus, I can not assign headers to it (in Outlook), and thus I can not map the fields during the import into Outlook. I know I can use "transpose" in Excel to change rows into columns, but this still requires a lot of manual work: I have to select each block, Edit/Copy, Edit/Paste Special/Transpose. With 3000 ...

No option for MFC project...? (really basic!)
How do I create an MFC application in Visual C++ Express??? When I try to create a new project I only get the option of CLR, Win32 and General - there is no MFC listed... Is there some add-on I require? MFC isnt included in the express editions. -- - Mark Randall http://www.temporal-solutions.co.uk http://www.awportals.com "anon418600J5" <anon418600J5@mail.anonymizer.com> wrote in message news:Xin5h.7764$lq.3935@newsread1.mlpsca01.us.to.verio.net... > How do I create an MFC application in Visual C++ Express??? > > When I try to create a new project I only get...

text on document is really small even though it is set at 12 why?
When I am in a word 03 document the text displayed is really small, even though the font size is set at 12. Either that or the page is really big Have you tried changing the zoom rate? -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "suzannah" <suzannah@discussions.microsoft.com> wrote in message news:894012CB-69D6-48BC-92DC-54DBAF71CB7C@microsoft.com... > When I am in a word 03 document the text displayed is really small, even > though the font size is set at 12. Either that or the page is...

Reboot time really loooong!!!
I am currently running Exchange 2003 on Win 2003 Svr. with about 15 user accounts. One "problem" that I notice everytime I have to reboot the server is that it takes extremely long to reboot. I noticed this effect after installing and running Exchange. Is this by design?? If it is, what is the purpose of it? And is there any possible way to shorten the time for this reboot? Any help would be helpful. Thank you. And second question I had was that on a different domain, we are running Kerio Mailserver. Does anyone have any idea as to how I can migrate all the mailboxes t...

Excel file with macros involved really bring in danger?
Recently we designed a online questionair for enterpreneurs basing o Excel with macros functions. We workded hard on it and it is almost finished. However, when we invite enterpreneurs to have a try, it came out problem. When they open it online, they are asked to enable macros. As we al experienced, the computers warn them that macros may bring in viruses, then they started to fear and refuse to open it. If they do not use it, our whole work will mean nothing. I want to persuade these enterpreneurs that enabling macros will not b as dangerous as they think. But actually I am not very ...

O.T.
Tripped over this while thumbing through PC Magazine this evening. This was listed among their “100 Best Undiscovered Web Sites”. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Computer book author and Excel guru John Walkenbach scours the Web for interesting news and sites. His blog, updated daily, presents these stories and sites, with commentary. Be warned: You may spend too much time following the fascinating links. http://j-walkblog.co...