|
What is the solution for this problem?
|
|
|
|
|
As I've already pointed out, knowledge of the raw image data format maybe a good start.
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
|
|
|
|
|
I am not getting your point.I have a 800 x 600 x 4 RGBA raw image buffer.
I want to display this on current HDC.
My question is should i have to create a bitmap for this buffer and then should i use bltblit () function.
Curently i am able to display a bitmap on current HDC.
Please elaborate your idea in little details.
Thanks,
Soumyadipta De
|
|
|
|
|
Soumyadipta wrote: My question is should i have to create a bitmap for this buffer and then should i use bltblit () function.
Yes.
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
|
|
|
|
|
Is there is any other alternative other than creating a bitmap?
Thanks,
Soumyadipta De
|
|
|
|
|
IMHO nope. But there are a lot of tutorials about.
Have a look at GDI articles here at CP .
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
|
|
|
|
|
Thanks for you help.But i am not understanding one thing that, if it's not possible to do this in any other way then what you are suggesting to find me in the GDI tutorials?
Thanks,
Soumyadipta De
|
|
|
|
|
How to build a bitmap.
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
|
|
|
|
|
Is there any freeware tool to find out only GDI leaks in a project.
Can anyone tell me the occurances of GDI leaks.
modified on Tuesday, May 20, 2008 1:30 PM
|
|
|
|
|
Well you can use of Task Manager it displays GDI resources for each process.
|
|
|
|
|
|
Using Visual C++ 6.0 MFC in SDI application
I'm relatively new to C++ (from C). In an application using Visual C++ MFC, I setup a menu item. When that menu item is selected, my code calls the following routine that was setup by Visual C++
CMainFrame::ShowTheCircle()
{
// has my code here...
}
I want to perform this identical operation from another place in my code, which is in a separate .cpp file. I don't understand how to call the ShowTheCircle function from this other place.
void MyCode(void)
{
// call the ShowTheCircle function just as if the menu item was
// selected
// thanks for your help!
}
|
|
|
|
|
One way would be to make ShowTheCircle() a static method. Another would be to make it not part of the CMainFrame class.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
void MyCode(void)
{
CMainFrame *pWndMainFrame = dynamic_cast<CMainFrame *>(AfxGetMainWnd());
pWndMainFrame->ShowTheCircle();
}
provided CMainFrame is the class for the main frame window of the application.
|
|
|
|
|
ShowTheCircle is a method of CMainFrame class, therefore to call it you must have a reference (or a pointer) to a CMainFrame object, for instance
CMainFrame * pMainFrame = (CMainFrame *) AfxGetMainWindow();
CMainFrame * pMainFrame = (CMainFrame *) AfxGetMainWnd();
pMainFrame->ShowTheCircle();
Note that ShowTheCircle must also be declared public .
BTW what about a good C++ tutorial?
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
modified on Tuesday, May 20, 2008 2:58 PM
|
|
|
|
|
Thanks to all for the help. The function in your reply should have been AfxGetMainWnd() and not AfxGetMainWindow() but I found things. Everything worked great!
|
|
|
|
|
Kwanalouie wrote: Thanks to all for the help.
You're welcome.
Kwanalouie wrote: The function in your reply should have been AfxGetMainWnd() and not AfxGetMainWindow()
Of course. Fixed: thank you for pointing out.
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
|
|
|
|
|
hai,
what is the difference between bool and BOOL?
reply me..
Born to win...!
|
|
|
|
|
bool vs BOOL[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
bool is a C++ keyword, BOOL a Microsoft alias for int :
typedef int BOOL;
Any variable declared bool can assume only the following two values: true or false , moreover C++ conditional expressions evaluates to a bool result (true or false ). On the other hand, a BOOL variable is a fully qualified int and hence can assume any numeric value an int can (MSDN suggest: it should be either TRUE or FALSE ).
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
|
|
|
|
|
CPallini wrote: typedef int BOOL
not really
maybe
|
|
|
|
|
toxcct wrote: not really
You've gotta be kidding me. CPallini is correct.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Maybe both my local help and my windef.h file are wrong?
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
|
|
|
|
|
May be toxcct is on drugs today for a change.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: May be toxcct is on drugs today for a change
come on, have you ever worked under linux ?
Microsoft IS NOT the standard, even if 85% of the PCs worldwide are windows based...
|
|
|
|