|
|
Hi,
I can give "transaction effect" with BitBlt() on Screen in case of Bitmap image.
but I'd like to know how to give "transaction effect" in case of jpg,gif and so on.
=== short example code ===
CDC MemDC;
BITMAP bm;
m_Bitmap.LoadBitmap(IDB_BITMAT1);
m_Bitmap.GetBitmap(&bm);
MemDC.CreateCompatibleDC(pDC);
CBitmap* pOld = (CBitmap*)MemDC.SelectObject(&m_Bitmap);
int w=bm.bmWidth;
int h=bm.bmHeight;
for(int j=0;j<w;j+=2)
{
pDC->BitBlt(0,0,j,h,&MemDC,w-j,0,SRCCOPY);
}
pDC->BitBlt(0,0,w,h,&MemDC,0,0,SRCCOPY);
MemDC.SelectObject( pOld );
Any comment will help me!
Thanks, have a day.
|
|
|
|
|
|
Bacon Ultimate Cheeseburger wrote: 1300 calories of pure beef goodness can't be wrong!
However you've to run for about twelve miles in order to consume them.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi everybody, Happy Friendship Day to you all.
I want to know what is the main difference between OnDraw() and OnPaint(). Plz tel me in which cases they will be used?
Thanks & Regards
Sairam
|
|
|
|
|
OnPaint is the message handler for WM_PAINT .
Here you do any drawing on your window.
OnDraw is a virtual function for all view classes.
OnDraw is called by the OnPaint handler for each view to do its on-screen drawing.
OnDraw will also be called by the MFC framwork for printing in respose to WM_PRINT .
This is why OnDraw has a CDC parameter which specifies the DC on which to do the drawing.
This could be the DC of either the screen or the printer depending on where the drawing needs to be done.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
please suggest ur ideas??
|
|
|
|
|
If you could make it do syntax coloring, that would be very cool.
|
|
|
|
|
I can see where creating even a small text editor could be helpful. It can be very instrumental in getting experience dealing with primitive text layout (fixed vs. variable width fonts), carets, word wrap (or not to wrap), auto-indention including spaces vs tabs, syntax highlighting and a wide range of other text related stuff.
You could do something nifty like displaying comments containing FIXME, TODO and other such tags in a different color. Something small that utilizes functionality you would already need to implement but makes it stand out a little more.
I guess the big question is how much time do you have to implement it and how functional does it have to be?
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
i have around 8 months to complete my project!!
|
|
|
|
|
The big feature I see missing from a lot of IDE's is syntax highlighting of USER-DEFINED TYPES.
Say I have a class called Foo, and I instantiate an object of type Foo...
int theInt;
Foo theFoo;
Of course that greatly complicates things as you would need to find every single user-defined type (including types defined in windows headers, etc). This then leads me to think - why the hell DOESN'T Visual Studio have this feature? It would be incredibly simple to implement, given that Intellisense already does the hard part of identifying user-defined types...
|
|
|
|
|
Starting with Visual Studio 5 you can edit the usertype.dat file (found in the same directory as msdev.exe) to add custom keywords. The "User Keyword" setting in the "Fonts and Colors" configuration can be used to change the color of these keywords (all custom keywords are the same color). Technically you should be able to create a plugin which scans either the class view data or browser file and automatically updates this file. Later versions of Visual Studio provide additional support for custom languages and syntax highlighting.
http://msdn.microsoft.com/en-us/library/bb166778(VS.80).aspx[^]
[Correction: for later versions of VS it's devenv.exe instead of msdev.exe]
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
I'm aware of this, but the typical project is going to have a large number of classes and other user-defined types... So it's somewhat inconvenient to manually edit a file every time you add a new one.
Not to mention the fact that these settings are global and will be applied regardless of which project you're working on, so you may have types appearing with syntax highlighting even if they dont exist within the current project.
Someone needs to do something about that and make it dynamically updated in real-time, and if you're going to be writing a code editor for your final project, then why not implement such a feature?
|
|
|
|
|
When Create controls for a Modless Dialog
Durning which message is it best to do So
OnInitdialog or OnCreate
I meant which virtual functions ??
|
|
|
|
|
Dialog and associated child control initialization should be handled in OnInitDialog().
1300 calories of pure beef goodness can't be wrong!
|
|
|
|
|
OnCreate is called just when the application requests that the Create function be called. So it is not guarenteed that the window is fully created. OnInitDialog is called after the window (in this case the dialog) is completely created.
When you are dynamically creating a control, you will specify its parent window handle and so it has to be created completely. So always do it in OnInitDialog as said in the previous answer.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
|
So what is your question?
Hint: No one here is going to write code for you.
|
|
|
|
|
|
One thing you're doing wrong is failing to say what exactly is not working about the program, and what you have done to try to fix it yourself.
|
|
|
|
|
|
What have you tried so far to fix it?
Take, "letterGrade" for instance. What do you think "redefinition; different type modifier" means?
|
|
|
|
|
|
Fair enough. Put in some effort on your own first, and then if you have specific questions, ask them.
|
|
|
|