|
Yes you are right! Exit code of 0 is done when the OK or Cancel button is pushed. And Exit code 2 is when close button or alt-F4 is done. Thank you very much for your help!
|
|
|
|
|
I am compiling these samples from the command line. 1st and foremost, the vcvars32.bat doesn't show up where the documentation says it should, or at all for that matter. The include, bin, and lib env vars have been set, yet and still, when I run nmake, cl.exe cant find any of my include paths. Oh yea, Im using the cl.exe from the drivers developers kit since the platform sdk doesnt have a 32bit version included. Please help me.
|
|
|
|
|
shatterstar6457 wrote: the vcvars32.bat doesn't show up where the documentation says it should
Where are you expecting to find vcvars32.bat?
It's created when installing a visual C++ compiler and it sounds like you don't have
one installed.
MArk
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
..\vc\bin, isnt it installed with the installer?
|
|
|
|
|
What installer are you referring to??
shatterstar6457 wrote: Oh yea, Im using the cl.exe from the drivers developers kit since the platform sdk doesnt have a 32bit version included.
That seemed to imply you haven't installed a development environment...
Are you tring to use a compiler that came with the PSDK? I had no idea there was one included.
MArk
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
shatterstar6457 wrote: from the drivers developers kit
After reading your post 6 times I finally read that correctly
Anyway, I have no idea if the DDK installer sets up a useable vcvars32.bat
but I know the visual studio installer does.
Maybe download and install 2005 Express. You'll get a free up-to-date compiler
and the vcvars32.bat should be valid and where you expect it to be.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
Can i create two Cbrush objects in same dialog class?, i tried to do like this
<br />
void CMyChessView::OnDraw(CDC* pDC)<br />
{<br />
CBrush *white = new CBrush;<br />
CBrush *black = new CBrush;<br />
<br />
CMyChessDoc* pDoc = GetDocument();<br />
ASSERT_VALID(pDoc);<br />
white->CreateSolidBrush(RGB(255,255,255));<br />
black->CreateSolidBrush(RGB(0,0,0));<br />
<br />
for (int i=1;i<=8;i++)<br />
for (int j=1;j<=8;j++)<br />
{<br />
pDC->Rectangle((i-1)*56,(j-1)*56,i*56,j*56);<br />
}<br />
<br />
<br />
<br />
<br />
}<br />
but onresize the window some exception errors accured? does anyone know why the errors?
-- modified at 17:02 Monday 5th November, 2007
|
|
|
|
|
Gofur Halmurat wrote: Can i create two Cbrush objects in same dialog class?
Yes. The problem is somewhere else.
What line of code causes the exception? What is the specific exception?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello, i just changed the post, could u look at the code again please?
now, the error is "Debug Assertion Failed"?
|
|
|
|
|
Gofur Halmurat wrote: now, the error is "Debug Assertion Failed"?
There's lots of places that assertions can occur -
you really need to be more specific.
The only thing I can see is you're not freeing the brushes when you're done with them.
Are you depleting all your GDI resources??
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
Yes, i am deleting all GDi resources in desctroctor
I found where the problem is, the creation of those CBrushs cannt be in OnDraw Method, because OnResize method, it will create again the bruths
thanks
|
|
|
|
|
FWIW, you can simplify your code and reduce the chance of leaks
something like this:
void CMyChessView::OnDraw(CDC* pDC)
{
CBrush white(RGB(255,255,255));
CBrush black(RGB(0,0,0));
CMyChessDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
for (int i=1;i<=8;i++)
for (int j=1;j<=8;j++)
{
pDC->Rectangle((i-1)*56,(j-1)*56,i*56,j*56);
}
} mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks Mark for trying to help me;)
|
|
|
|
|
Hello anyone and everone
I'm looking for a great website to learn C++
i"m a newbe at it and can barely make any sence of C++ code
I would like to programm games so any info in that diretion would be great
thanks for any advice.
|
|
|
|
|
|
|
hello!
How can i create a shortcut to a file on-the-run ?
If I could specify the folder where to create it, it would be great!
Thanks!
Shpid3r
|
|
|
|
|
|
uu... i`m really impressed! That article (on codeproject.com) answered all my questions!
Many thanks!
Shpid3r
|
|
|
|
|
Hello
I need to write a DLL for some functions that I have which depend on a separate lib file.
when i write a short test program that uses the functions as is and link against the lib file, everything works great. But when i take the same functions and put them in a DLL, it doesn't work (i get some unresolved references to any function that I use from the lib file).
Am i supposed to do anything special to get it to recognize the functions from the lib?
thanks for your time.
|
|
|
|
|
effectively, there are some things to get done for a DLL to work properly.
you should start by reading this[^] article...
|
|
|
|
|
yeah i already know that bit
when i have regular functions that don't depend on the library (the one that I didn't write) the dll builds just fine
it's when i use the library's functions in my dll that i get the linking errors.
|
|
|
|
|
You haven't specified what type of DLL you're using or how you are linking
and/or binding to the DLL at runtime so it's difficult to give a specific answer.
I do know you will find links to a solution here[^]
If I had to guess, I'd say you need to link your application project
to the link library produces by a build of the DLL project, but again,
this is a wild guess since you gave no specifics.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: since you gave no specifics.
He's fishing
|
|
|
|
|
yeah that link helped - thanks
|
|
|
|