|
Ramu.e wrote: What is CRuntimeClass,RUNTIME_CLASS?How can we use these?Where do we use these?
CRuntimeClass is a structure
RUNTIME_CLASS is a MACRO which gets the run-time class structure from the name of a C++ class.
RUNTIME_CLASS returns a pointer to a CRuntimeClass structure for the class specified by class_name. Only CObject-derived classes declared with DECLARE_DYNAMIC, DECLARE_DYNCREATE, or DECLARE_SERIAL will return pointers to a CRuntimeClass structure.
As per my knowledge
-one use of the RUNTIME_CLASS is for Creation of the User Interface Threads
-other use of RUNTIME_CLASS is for Creation of the SpliterWindows.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Thank you Lakshman
E-Ramu
|
|
|
|
|
Welcome
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I'm a newbie to VC++. I'm working on Graphics and wants to know how to make use of CDC class' alphablend method. I scrolled thru the MSDN but didnt find it much useful as there was no example describing it.
I heard that by using alphablend method we can achieve high quality graphics as it enables transperancy.
I wud be more happy if i can get an example.
Please somebody help me! ...
raghu
|
|
|
|
|
Help[^] is on the way
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
|
|
|
|
|
Thanks for the reply pal ...........but that didnt help me to know how BLENDFUNCTION structure works. Moreover the project is a DIALOG BASED....
I'm doing my work in SDI.
Can't i get a simple example that uses alphablend function and displays a simple rectangle?
ne how thanks once again ...for the reply....
raghu
|
|
|
|
|
You are lazy
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
|
|
|
|
|
See
<br />
BLENDFUNCTION bend;<br />
bend.BlendOp=AC_SRC_OVER;<br />
bend.BlendFlags=0;<br />
bend.AlphaFormat=AC_SRC_OVER;<br />
bend.SourceConstantAlpha=50;<br />
AlphaBlend(GetDC()->m_hDC,0,0,400,400,m_pDC.m_hDC,0,0,0,0,bend);<br />
maybe it is some helpful to you of course you need to insert bitmap to dc
whitesky
|
|
|
|
|
in my code i am displaying a bmp image
Now i want to display a moving straight line from top to bottom on my image
The problem i am facing is the previous line i am displaying using
for(int i = 0 ; i < 10 ; i++)
{
dc.SelectStockObject(WHITE_PEN);
dc.MoveTo(pStart);
dc.LineTo(pEnd);
pStart.y = pStart . y + ldlist;
pEnd . y = pStart . y ;
}
remains but i want everytime only a single line should be shown
where ldlist is the distance my line shud move
-- modified at 6:12 Saturday 20th May, 2006
|
|
|
|
|
Check SetROP2() and draw twice to show the effect that only a single line is moving you have to redraw the previous line with back color.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi All
I have a property sheet wizard i am using, which has three pages
on the second page, when the user clicks next to go to the final page
depending on which option they have chosen on page 2 (i,e A or B)
a different property page will be displayed,
So if option A is selected on page 2 when next is clicked property page X is displayed
but if option B is selected on page 2 next is clicked property page Y is displayed
hope that makes sense?
I take it i would need to override the OnNext in page2 but im not sure
what to put to display the property page that i want
Can any one help
Simon
|
|
|
|
|
Hi Simon,
U can set the dialog into the ur property page 3 dynamically. when ever user click the Next on Page 2 based on option us et the appropriate dialog on 3 rd property page .
|
|
|
|
|
Thanks for the reply kiran
when you say
Kiran Kumar Singani wrote: U can set the dialog into the ur property page 3 dynamically
could you give me an example??
thanks
si
|
|
|
|
|
The return value from OnNext() determines which page is displayed next:Return 0 to allow the wizard to go to the next page. Return -1 to prevent the wizard from changing pages. To display a particular page, return its dialog resource identifier.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thanks, but when you say
Michael Dunn wrote: To display a particular page, return its dialog resource identifier.
im not sure what you mean, can you give me an example??
|
|
|
|
|
|
Hi,
How to get Current Color Scheme of the System.I am working on Widnows Xp.How to get the current Color Scheme that is selected .
Thanks in before
James
|
|
|
|
|
RockyJames wrote: How to get Current Color Scheme of the System.I am working on Widnows Xp.How to get the current Color Scheme that is selected .
Take a look at GetSysColor .
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
RockyJames wrote: How to get Current Color Scheme of the System.I am working on Widnows Xp.How to get the current Color Scheme that is selected .
You can get the different colors of the system from the following path of the registry
HKEY_CURRENT_USER\Control Panel\Colors
and for the the current color schemes
HKEY_CURRENT_USER\Control Panel\Current
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
when we right click on the desktop.. properties -> In Appearances tab i want the current selected color scheme in ColorScheme Combo Box..and its respective RGB value..IS there any method to do it?
Thank`s in berfore
James
|
|
|
|
|
Hello,
SCENARIO:
- I have some "C" code that runs heavy math, that takes time to get the results.
- Compiling under a Debug configuration, all goes as required.. but the run sessing is to slow (few hours to get the results.)
- Compiling under a Release configuration, fails to get the required results.
(Release configuration with its default Speed code optimization (/O2 flag)) - When I turn off speed optimizations under Release configurations, the results are O.K, but again, it runs slower than expected.
QUESTIONS
- How can I detect what does causes this differences on the code?
- How can I debug this code and catch the affecting lines?
I guess that this has to do in the way this "C" code is written, that optimizing it for speed causes the differences. All this code runs under the same thread, and uses data that is static.
Any hint?
Thanks in Advance.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
rbid wrote: All this code runs under the same thread
Create the seperate synchronised threads for the large calculations
and which is not much dependent on each other
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxman wrote: rbid wrote:
All this code runs under the same thread
Create the seperate synchronised threads for the large calculations
and which is not much dependent on each other
This is exactly how it is implemented. The code that has the problem runs on a separate synchronized thread.
Even if I encapsulate the code on a single "console application", the problem persists.
Thanks for your thoughts, this place is a great place for getting good ideas and solutions.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
If a code runs in debug mode and not in release mode then most probably there is a bug in the code, which is exposed in release mode due to optimizations.
If you are using VS 2005 (this might work with VS 2003 also but I am not sure since I never used it) then its simple, just put break point in the code and let then program run under debugger. When program crashes visual studio will give you an option of breaking into the code. This way you will know where exactly is the problem.
If you are using some older versions then try debugging the usual way. Look carefully at pointers, if you are using them. Try putting testing fprintf's/ or AfxMessageBox's (if you are using MFC) in release mode at various places and see how far code is able to execute. Another way might be to take crash address and find which souce line it corresponds to using a map file[^]. When using a map file you might get crash at a line which is not in your code or at a place where you are sure there's nothing wrong. In that case you will have to figure out which functions are calling the function which crashed.
Hope this helps.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: ForumVisual C++ / MFC
Subject:Re: Release Code Optimization Problems..
Sender:Saurabh.Garg
Date:4:32 20 May '06
If a code runs in debug mode and not in release mode then most probably there is a bug in the code, which is exposed in release mode due to optimizations.
If you are using VS 2005 (this might work with VS 2003 also but I am not sure since I never used it) then its simple, just put break point in the code and let then program run under debugger. When program crashes visual studio will give you an option of breaking into the code. This way you will know where exactly is the problem.
Hope this helps.
-Saurabh
You are right, but the code does not crash, just gives a different result that is not acceptable. Puting a breakpoint or dumping via TRACE or printf is like searching for needle in a montain of hay (or how you say it).. I'm running VS 2003.
A great article about Surviving the Release version[^] can be found in this site as well..
I'm also thinking about what is mentioned here[^].
Have a nice day.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|