|
I have tested the case for an empty string too. Though the result is same with the nonempty case, I have believed what you said is right. Thank you again
|
|
|
|
|
Hello
I want to use SetBitmapbits function but I can,t I need a sample code or a Guidance
thanks
Agh
|
|
|
|
|
|
how can i launch a programm before session openning?
am
|
|
|
|
|
I assume you mean before a user logs in. Write the program as a service, and install it to run automatically.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi all, I'm new to Visual C++. I have created my Forms for an application. How do i link the FOrms...so that on a click event, an existing form exits and a different Form loads. Please help. Tks
-- modified at 8:02 Sunday 12th March, 2006
|
|
|
|
|
|
No the Forms were mostly from scratch. i know how to get a button event handler to work. But i dont know how to link that handler to "load" the next Form and destroy itself...
|
|
|
|
|
Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ?
For example:
c:\fixeddiretory
|
|
|
|
|
I guess your program could just ignore the path.
|
|
|
|
|
If you just want to let the user pick a file from a single directory, it might be better to just have your own dialog with a list that you populate yourself.
Software Zen: delete this;
|
|
|
|
|
Hey guys! i wna use glut functions like glutMouseFunc or glutKeyboardFunc outside of the int main(int argc, char **argv) . How can i do this??
Please help!!
AmanN
|
|
|
|
|
See two threads below.
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hi,
I have a problem with the output of CBitmap images to Adobe Distiller. I can see my bitmap in the view and the preview. Printing is also fine. But the output into pdf does not work. Text and other graphics like lines or boxes works fine, only bitmaps are not visible.
Is there anybody with a solution in the world?
Greetings from Hannover, Germany
Markus
Dr-Kuulun
|
|
|
|
|
I forgot my code:
CDC dc;
dc.CreateCompatibleDC(pDC);
CBitmap b;
b.LoadBitmap(IDB_BITMAP1);
dc.SelectObject(&b);
pDC->StretchBlt(100,100,200,200,&dc,0,0,48,48,SRCCOPY);
pDC->MoveTo(0,0);
pDC->LineTo(100,100);
The line is visible but not the bitmap.
Dr-Kuulun
|
|
|
|
|
Hi Dr-Kuulun
I run your code and this work.
I enter CDC *pDC=GetDC(); that I dont find in your code
CDC dc;
CDC *pDC=GetDC();
dc.CreateCompatibleDC(pDC);
CBitmap b;
b.LoadBitmap(IDB_BITMAP1);
dc.SelectObject(&b);
pDC->StretchBlt(100,100,200,200,&dc,0,0,48,48,SRCCOPY);
pDC->MoveTo(0,0);
pDC->LineTo(100,100);
|
|
|
|
|
Hey guys!!
How can I use the following GLUT functions without having to include them in main(int argc, char **argv) ??
glutMouseFunc(Mouse);<br />
glutMotionFunc(MouseActiveMotion);<br />
glutPassiveMotionFunc(MousePassiveMotion);<br />
glutEntryFunc(MouseEntry);<br />
glutKeyboardFunc(NormalKeys);<br />
glutSpecialFunc(KeyInput);
I'm trying to implement a camera using GLUT but the thing is I have to use this inside an OpenGL window that ive integrated in MFC. I have a separate class for my camera functions like void CCAMERA::Mouse(int button, int state, int x, int y)
But the compiler wont let me do this:
glutMouseFunc(Mouse); or this glutMouseFunc(CCAMERA::Mouse); or even when I instantiate my class as Camera and do this: glutMouseFunc(Camera.Mouse); , it wont let me.
Please help!
Thanks in advance guys
Aman N
|
|
|
|
|
|
Implement MouseMove in your view class
You might also need to implement WM_LBUTTONDOWN/UP etc.
Then you can call, your camera's methods from there.
There should be an example on the Internet for displaying MD3 files. Search in the gamedev articles. It shows how to set up a MFC project and create four different views(quite a useful article to look at in the beginning)
I found the link.
http://www.gamedev.net/reference/articles/article1358.asp
Bekir.
|
|
|
|
|
|
I have not looked at the sights you provided, but that is not an error. A warning might not be a bad idea for that, but come on (it's legal code).
INTP
Every thing is relative...
|
|
|
|
|
Is is actually disallowed in C as it can lead to undefined behaviour, see the two links I gave.
GCC takes a command line option to detect this as a warning.
thanks!
|
|
|
|
|
I assume you intended saying "It is actually disallowed...", but the rest of your statement does not support that nor does the standard.
The term "undefined behaviour" does not disallow a programmer from doing it. It just says its behaviour is undefined in the standard and is therefore compiler dependent. Meaning that you can not determine the result when using a different compiler, provided it worked on your current compiler.
A fully compliant compiler could compile that statement without giving any warning at all. But is should at the least give a warning and at the most consider it an error (becuase it is undefined behaviour).
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: A fully compliant compiler could compile that statement without giving any warning at all. But is should at the least give a warning and at the most consider it an error (becuase it is undefined behaviour).
So it may be the case that the C compilers shipped with VS6, VS2003, VS2005 all aren't fully compliant with the standard. What is puzzling is, they dont qualify your "at the least" part, forget about "at the most" part.
thanks!
-- modified at 0:55 Sunday 19th March, 2006
|
|
|
|
|
I would need to look it up, because I never understood why it would be classified as undefined behaviour.
My answer was very weak and I should not have attempted it [without research], becuase it actually applies to the "old argument" below, following my explination of what I ment.
I said "at the least" because if it is undefined behaviour then it would be compiler dependent (non-portable) and a warning should be generated to inform the programmer of this.
I said "at the most" because if it is undefined behaviour then it would be compiler dependent and an error would force the programmer not to write non-poratable code.
I believed it was consider undefined behaviour in the passed, which means the compiler vender could decide what behaviour to apply, and still be fully compliant. This may no longer be the case, as the behaviour may now be deifined.
Here is the old argument:
int i = 0;<br />
i = i++;
Should i now be equal to 0 or 1?
My answer and the answer Microsoft chose is 1, which I think is the only logical answer. But there where those who disagreed and said the answer should be 0, because they believed that was the intent of the progammer.
So if you throw out logic and just consider the intent, then the language would not be able to define the behaviour. I think the real problem was that different venders had already implimented different solutions, before the standared was complete.
When I originaly gave my answer of 1 to that question (years ago), I was informed that my answer was wrong, becuase it was undefined and therefore could be either 0 or 1.
VS6 may be fully compliant for C (?), but it is not fully compliant with the C++ standard.
VS2003, according to Microsoft, is a full ASCII/ISO C++ Standards compliant compiler.
INTP
Every thing is relative...
|
|
|
|