|
Matrix film. Scene on the elevator's roof. Neo look at the top of the elevator having an "idea" of what was coming and says: "there is no spoon".
Difficult to understand if you didn't see the film
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
CPallini wrote: I'm getting older
The secret of not getting older is simple. Just stay young.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Yes, I should buy a bigger freezer though.
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
|
|
|
|
|
Or maybe you are abusing too much :P
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Shhhhhhhhhhhhh!
Actually I remember very well about the blue and red pills.
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: the blue and red pills
Why does it not surprise me? :P hehehe... In Spain were white and yellow
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Just fixed the low-vote on this post. But, super-hero intervention needed here[^]
|
|
|
|
|
Rajesh R Subramanian wrote: But, super-hero intervention needed here[^]
Done.
BTW That 1 was really bad, the troll showing a complete lack of humour.
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
[My articles]
|
|
|
|
|
Well, that's what we could expect from troll (both of them at times). BTW, I was thinking that I must nominate you for the MVP award for the next review cycle. But, surely I do not know if I could do that, given you stay at Italy. I'll write to you a personal email after I discuss this at the MVP private newsgroup.
Also, have you checked my MVP profile? (See sig) Any suggestions on that?
|
|
|
|
|
Rajesh R Subramanian wrote: Well, that's what we could expect from troll (both of them at times).
Indeed.
Rajesh R Subramanian wrote: BTW, I was thinking that I must nominate you for the MVP award for the next review cycle. But, surely I do not know if I could do that, given you stay at Italy. I'll write to you a personal email after I discuss this at the MVP private newsgroup.
Thanks pal, anyway I suppose that (Microsoft) MVP is for people answering on Microsoft communities, while currently I do it only here at CodeProject .
Rajesh R Subramanian wrote: Also, have you checked my MVP profile? (See sig) Any suggestions on that?
Well, I think it is is good (but I'm not an expert).
BTW: WHYYYYYYYYYYY don't you mention MFC ?
BTW2: Congratulations again for the MVP title.
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
[My articles]
|
|
|
|
|
CPallini wrote: Thanks pal, anyway I suppose that (Microsoft) MVP is for people answering on Microsoft communities, while currently I do it only here at CodeProject.
No, that's wrong. I never participated in any Microsoft Community (Neither did Mark Salsbery!). If Microsoft feels that your contributions on *any reasonably good* community is significant, then they may award you, provided the fact that your contributions are on a MS technology.
CPallini wrote: BTW: WHYYYYYYYYYYY don't you mention MFC? [Laugh]
Surely, I'll mention it.
CPallini wrote: BTW2: Congratulations again for the MVP title.
Thanks a lot man.
|
|
|
|
|
Most Feared Thread Hijackers.
|
|
|
|
|
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
[My articles]
|
|
|
|
|
|
Balanced.
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
[My articles]
|
|
|
|
|
That's simple. Whenever you sit down to debug a bunch of 3d pointers pointing to all corners of a 3d volume, you ge t to say "There's no spoon" before you start.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
{
protected: // ???????
CdeDoc();
DECLARE_DYNCREATE(CdeDoc)
// ??
public:
// ??
public:
CRect R[3][8];
CRect r;
CRect r1;
float J;
int K[3][9];
int M;
BOOL CdeDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
r=CRect(300,350,350,390);
r1=CRect(100,400,600,500);
M=1;
K[3][9]=(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);void CdeView::OnEnd()
{
KillTimer(1);// TODOvoid CdeView::OnDraw(CDC* pDC)
{CdeDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CRect rect;
GetClientRect(&rect);
int W=rect.right/8;
for(int a2=0;a2<9;a2++)
{CBrush C1;
C1.CreateSolidBrush(RGB(255,0,0));
CBrush *old;
old=pDC->SelectObject(&C1);
pDC->Rectangle(W*a2,0,W*(a2+1),50);
pDC->SelectObject(old);
}
for(int a=0;a<9;a++)
{ CBrush C2;
C2.CreateSolidBrush(RGB(0,255,0));
CBrush *n;
n=pDC->SelectObject(&C2);
pDC->Rectangle(W*a,50,W*(a+1),100);
pDC->SelectObject(n);
}
for(int a1=0;a1<9;a1++)
{CBrush C3;
C3.CreateSolidBrush(RGB(0,0,255));
CBrush *m;
m=pDC->SelectObject(&C3);
pDC->Rectangle(W*a1,100,W*(a1+1),150);
pDC->Rectangle(pDoc->r1);
pDC->SelectObject(m);
}
pDC->Ellipse(pDoc->r);
pDC->TextOut(pDoc->M,200,"00");
/*CBrush C4;
C4.CreateSolidBrush(RGB(1,234,100));
CBrush *m1;
m1=pDC->SelectObject(&C4);
//pDC->Rectangle(100*a1,80,100*(a1+1),120);
pDC->Rectangle(pDoc->R);
pDC->Ellipse(pDoc->r);
//pDC->SelectObject(m1);*///int H=50;
// TODO: ??????????????
}
// CdeView ??
BOOL CdeView::OnPreparePrinting(CPrintInfo* pInfo)
{
// ????
return DoPreparePrinting(pInfo);
}
void CdeView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: ???????????
}
void CdeView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: ?????????
}
// CdeView ??
#ifdef _DEBUG
void CdeView::AssertValid() const
{
CView::AssertValid();
}
void CdeView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CdeDoc* CdeView::GetDocument() const // ?????????
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CdeDoc)));
return (CdeDoc*)m_pDocument;
}
#endif //_DEBUG
: Add your command handler code here
}
void CdeView::OnStart()
{
SetTimer(1,100,NULL);// TODO: Add your command handler code here
}
void CdeView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{CdeDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
InvalidateRect(pDoc->r1,TRUE);
switch(nChar)
{
case VK_LEFT:
pDoc->r1.left-=5;
pDoc->r1.right-=5;
break;
case VK_RIGHT:
pDoc->r1.left+=5;
pDoc->r1.right+=5;
break;
}
InvalidateRect(pDoc->r1,FALSE);
CView::OnKeyDown(nChar, nRepCnt, nFlags);
}
void CdeView::OnTimer(UINT nIDEvent)
{CdeDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CRect rect;
GetClientRect(&rect);
int W=rect.right/8;
if(pDoc->r.top>=150)
{pDoc->M=1;}
for(int i=0;i<3;i++)
{ for(int j=0;j<9;j++)
if(50*i<pDoc->r.top&&pDoc->r.top<50*(1+i)&&pDoc->r.left>W*j&&pDoc->r.left<W*(1+j)&&pDoc->K[i][j]!=0)
;{ pDoc->M=2;
InvalidateRect(pDoc->R[3][9],TRUE);
pDoc->K[i][j]=0;
}
}
if(pDoc->r.left==W*8)
{pDoc->M=3;}
if(pDoc->r.top==400)
{pDoc->M=4;}
for(int i=0;i<3;i++)
{ for(int j=0;j<9;j++)
if(50*i<pDoc->r.top&&pDoc->r.top<50*(1+i)&&pDoc->r.left>=W*j&&pDoc->r.left<W*(1+j)&&pDoc->K[i][j]!=0)
;{ pDoc->M=5;
InvalidateRect(pDoc->R[3][9],TRUE);
pDoc->K[i][j]=0;
}
}
if(pDoc->r.left==0)
{pDoc->M=6;}
if(pDoc->r.top==400)
{pDoc->M=7;}
switch(pDoc->M)
{ case 1:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left+=1;
pDoc->r.top-=1.7;
pDoc->r.right+=1;
pDoc->r.bottom-=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 2:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left+=1;
pDoc->r.top+=1.7;
pDoc->r.right+=1;
pDoc->r.bottom+=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 3:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left-=1;
pDoc->r.top+=1.7;
pDoc->r.right-=1;
pDoc->r.bottom+=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 4:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left-=1;
pDoc->r.top-=1.7;
pDoc->r.right-=1;
pDoc->r.bottom-=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 5:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left-=1;
pDoc->r.top+=1.7;
pDoc->r.right-=1;
pDoc->r.bottom+=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 6:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left+=1;
pDoc->r.top+=1.7;
pDoc->r.right+=1;
pDoc->r.bottom+=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
case 7:
InvalidateRect(pDoc->r,TRUE);
pDoc->r.left+=1;
pDoc->r.top-=1.7;
pDoc->r.right+=1;
pDoc->r.bottom-=1.7;
InvalidateRect(pDoc->r,FALSE);
break;
}
CView::OnTimer(nIDEvent);
}
this is what I write to control the movement of the globule in the SDI of Visutal Studio .NET 2003,but it can't work.there is also no wrong,I really don't know why.
If you have time to spare ,i will expect your reply.
Thanks for you any way!
I am expecting your wonderfull answer!
|
|
|
|
|
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
#include<winsock.h>
#include<iostream.h>
using namespace std;
double player_1;
struct BRICK {
short power;
}
int main() {
BRICK player_2;
cout << "WEOCLME to GLOBAL BEATS BRICK! WEHRE THE VICTORY is YOUR POWER!" << endl;
cout << "Playr 1 is GLOBAL : " << sizeof(player_1)
<< " vs PLAYER 2 is BRICK " << sizeof(player_2) << endl;
Sleep(100);
cout << ".." << endl;
Sleep(400);
cout << "..." << endl;
Sleep(600);
cout << "!!!!" << endl;
Sleep(1000);
char buff[360];
(sizeof(player_1) > sizeof(player_2)) ? sprintf(buff,"GLOBAL BEATS BRICK!\n")
: sprintf(buff,"BRICK BEATS GLOBAL!!!!\n");
cout << buff;
cout << endl;
_getch();
return SOCKET_ERROR;
}
</iostream.h></winsock.h>
|
|
|
|
|
woops.. the includes are:
#include "winsock.h"
#include "iostream.h"
|
|
|
|
|
Hi, i'm currious,
I'm writing a winnt service application.
So I start of with a basic win32 console application.
There is not a CWinApp in the main file just the _tmain function.
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
Then I remembered that i need some MFC classes or at least the support for it.
I recreate the project, but now i check out the option to include standard MCF headers.
Now i get:
<code>CWinApp theApp;
using namespace std;
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
_tprintf(_T("Fatal Error: MFC initialization failed\n"));
nRetCode = 1;
}
else
{
}
return nRetCode;
}</code>
Why is this? The CWinApp object theApp is never used. What does it do?
Any insights would be appreciated.
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
BadKarma wrote: The CWinApp object theApp is never used
Not strictly true. It's a global variable, which means its constructor will be called before _tmain is executed. CWinApp::CWinApp does a whole load of MFC initialisations for you, that will then be used by other MFC functions that you call (or are called for you by the framework).
|
|
|
|
|
BadKarma wrote: if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
BadKarma wrote: Why is this? The CWinApp object theApp is never used. What does it do?
Look up CWinApp constructor and then step into AfxWinInit , you will see that it needs a CWinApp object, see the call AfxGetApp() . AfxGetApp is able to get an application pointer due the following line in the CWinApp constructor.
pModuleState->m_pCurrentWinApp = this;
Some MFC specific initialization is also done in these functions and stored in thread local storage. This happens in AfxTls.cpp line number 100, comes via AfxClassInit().
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Thursday, June 12, 2008 8:51 AM
|
|
|
|
|
dear all
sorry to disturb you by this problem, but i really couldn't solve it.
when i install vc++ 2008, first install .net framework 3.5,in the way to install it, aborted, it showed me it encountered problem, couldn't install. what is problem? anyone can remind me.thanks a lot.
gentleguy
|
|
|
|
|