|
flyingxu wrote: But now I want to use the pointer of pSave, can I verify if pSave is valid or not before I use it?
try/catch?
Use ASSERT in Debug mode B'coz it works in Debug mode only.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
You may use a smart pointer that implements reference counting, e.g. boost::shared_ptr<csomeobject>, instead of raw pointer.
|
|
|
|
|
hi there can anyone out there help me with "egavga.bgi" error
Adi
|
|
|
|
|
egavga.bgi is an Device driver file...
I think this is missing .
You have to download it and place it in valid location
Cheers
"Peace of mind through Technology"
|
|
|
|
|
anmol m wrote: hi there can anyone out there help me with "egavga.bgi" error
This error mostly seen in Turbo C++ Editers while doing graphics related work.
Set the BGI library path properly to work.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Exactly what error is being reported?
At runtime, your DOS program using the BGI needs this graphics driver file, unless you have embedded it into the executable.
More details are needed to correctly interpret the error.
this is this.
|
|
|
|
|
thanks mate, i was compi. a matrix calculator and on running error comes saying that graphics not initiliased use initgraph.
pl. if you have a prog which i can give for my board exami.pl mail it code to me
once again tanks
anmol m
f*** fear drink beer
|
|
|
|
|
I do not have the Turbo C compiler here at the moment.
You will find lots of examples even with the Turbo C IDE. Go into the examples directory, and there is a lot of help.
Here is an example. You can search in google for initgraph:
http://www.cs.colorado.edu/~main/cs1300/doc/bgi/initgraph.html[^]
Just make sure that you copy the file egavga.bgi to the folder where you are working. Also there is a setting in the IDE which chooses if graphics are to be allowed or not (I do not remember it right now). Look somewhere in the options.
this is this.
|
|
|
|
|
I really need help. I dont know the first thing about C++ and C++ is such a huge language. Im so lost. Where should I start. I went to the beginners section of C++ tutorials and I looked at the bits and bytes tutorial and it was really confusing.
|
|
|
|
|
Most of the beginner stuff here assumes that you have a reasonable grasp of programming basics already. Once you understand the concepts moving from one language to another is more or less syntax. IMO
I suggest that you go to the local library, local book store, and online and do a little reading on the basic fundamentals of C++. You will also need an editor/compiler IDE (Integrated Development Environment) software program in order to write, compile, and your run programs.
I live in a college town and was able to get second-hand programming books from local stores cheap. I even bought my first copy of MS Visual Studio (Learning Edition) there too.
Here are some online resources to get you started:
http://cplus.about.com/od/beginnerctutorial/[^]
http://devcentral.iftech.com/articles/C++/default.php[^]
http://msdn.microsoft.com/visualc/[^]
http://www.freeprogrammingresources.com/cppbooks.html[^]
And of course at this site.
Mark
|
|
|
|
|
|
zach7 wrote: I really need help. I dont know the first thing about C++ and C++ is such a huge language. Im so lost. Where should I start. I went to the beginners section of C++ tutorials and I looked at the bits and bytes tutorial and it was really confusing.
http://www.cplusplus.com/doc/tutorial/[^]
Here is the good atritcals on C++
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
how do i show the menu in a listbox i have the menu resource i want to use a right click to show the menu i have the right click function but i dont know how to call the menu.
im using MFC/Visual C++ 6.0
and i have this bit of code
enum FindOptionsEnum
{
FIND_SIZE = (1L << 0),
FIND_DATEMODIFIED = (1L << 1),
FIND_DATECREATED = (1L << 2),
FIND_DATEACCESSED = (1L << 3),
FIND_ATTRIBUTES = (1L << 4),
FIND_TEXT = (1L << 5),
};
but when i try to #include "vfw.h"
the compiler gives a error on that code anyone know why?
error C2059: syntax error : 'constant'
error C2143: syntax error : missing ';' before '}'
error C2143: syntax error : missing ';' before '}'
all 3 errors goto that code
-- modified at 21:55 Tuesday 13th June, 2006
|
|
|
|
|
map the right click message of the control
and use a CMenu object to create popup menu
MSDN has the sample code
here it is
VERIFY(m_NewMenu.CreateMenu());
VERIFY(m_FileMenu.CreatePopupMenu());
m_FileMenu.AppendMenu(MF_STRING, ID_APP_EXIT, (LPCTSTR)"E&xit");
m_NewMenu.AppendMenu(MF_POPUP, (UINT) m_FileMenu.m_hMenu, "&File");
SetMenu(NULL);
CMenu* old_menu = CMenu::FromHandle(m_hMenuDefault);
old_menu->DestroyMenu();
SetMenu(&m_NewMenu);
m_hMenuDefault = m_NewMenu.m_hMenu;
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
if you need to right click for menu do you see WM_CONTEXTMENU
whitesky
|
|
|
|
|
did you saw vfw.h you use from FIND_SIZE and ... that are in these file
whitesky
|
|
|
|
|
if you want to show menu only in listbox use from a if
if(pWnd->m_hWnd==m_List.m_hWnd) then menu functions
whitesky
|
|
|
|
|
Hi,
I wanna make a simple application that finds a certain text string periodically on the Internet Explorer's current loaded webpage. If it finds text that I predefined, it will pop-up message box and that's all.
This webpage is updated quite often by server without user's input.
Could you suggest any briliant idea to make this simple & fast?
|
|
|
|
|
PLease see the IHtmlDocument2 interface in the MSDN you can find all the methods which are exposed by this interface.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Joseph Lee wrote: Could you suggest any briliant idea to make this simple & fast?
You may required to write plugin for IE which keep track of webpages.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hello everyone,
Im displaying a captured image onto the the screen. I use the following code to display the image.
<br />
void draw()<br />
{<br />
if(m_imageData == NULL)<br />
return;<br />
glPixelStorei(GL_UNPACK_ALIGNMENT,1);<br />
glRasterPos2i(m_xOffset,m_yOffset);<br />
glDrawPixels(m_width,m_height,GL_RGBA,GL_UNSIGNED_BYTE,m_imageData);<br />
glFlush();<br />
}<br />
the fuction draws the image ok but the glDrawPixels function creates a memory leak. Does anyone know a work around glDrawPixels or a way to track the memory leak (don't know if it's possible on my end since it's a openGL function).
Thank's everyone
|
|
|
|
|
I am trying to change colors using variables in the initialization of a RGB command. The following are the commands used in MFC/Visual C++ 6.0:
int a = 200;
int b = 180;
int c = 125;
CMainFrame::CMainFrame()
{
//Set color frame
colorbar.CreateSolidBrush(RGB (a, b, c));
}
void CMainFrame::OnPaint()
{
CPaintDC dc(this);
CRect rc(100,150,150,200);
a = 140;
dc.FillSolidRect(&rc,RGB(a,b,c));
}
No matter what I set a to, it always displays with the original value for color. Is there a way to change the RGB colors after initialization? Please let me know at sid_kraft@msn.com. Thanks in advance, Sid Kraft
Sid
|
|
|
|
|
Seems this will work properly. check for local definitions of variable 'a'
You always filling a rectangle with a value 140,180,125
the how you could track the difference?
When filling a solid rectangle, you don't need to create teh solid brush.
the brush you have created is not selected by any dc. so if you are not using that, remove the same.
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
a rectangle with green color(almost) of course OnPaint in
CSDIView::OnPaint()
whitesky
|
|
|
|
|
I wrote a Wizard page using PropertySheet, and a manifest file under XP.But when I run it under Windows vista, the header of wizard doesn't display. then, I remove the manifest file, the header display correctly. So I want to why?and if I don't remove the manifest file, how can I modify it?
Thank you very much.
|
|
|
|