|
Check 'T' might be assigned to some other button or some menu item.
BTW: OnKeyUp() will be fired in all the cases.
Regards,
Sandip.
|
|
|
|
|
Pressing Alt-T may be more reliable than just pressing T for invoking the shortcut.
|
|
|
|
|
Dear friends,
Could you please advice me what actually is the VM Size or Private bytes ? Does it exactly includes the code part of the executable ? for eg: If the binary size increase by 1 MB does it means that corresponding increase of 1 MB will be there in Private bytes of that process ? Or Private bytes is only the allocated data area of the process(allocated either by the process itself or through the loaded DLLs)?
Thanks
|
|
|
|
|
I think alot of people are going to find this question EXTREMELY confusing. You should elaborate a little.
Tell us what you are referring to with the term "private bytes". Is this object an uncompiled text file? Is this a loaded executable? What version compiler and language and operating system are you using? What dependencies do you have? Most important, why do you need this information? (This will supply us with a context.)
And, of course, what the heck are "public bytes"? (Is this a scope problem?)
...Details,...specifics...be verbose...
...or, maybe, just google it...
|
|
|
|
|
Hi,
I have problem:
In class I have as member another class. For example:
class MyOwner
{
public:
MyClient m_client;
.
.
};
class MyClient
{
};
I need access form member class ( m_client ) to members of owner class, preferably also to private mebers. Can you adwise me?
Regards
Radek
|
|
|
|
|
Declare a member of MyClient as MyOwner*.
class MyOwner
{
public:
MyClient m_client;
.
.
};
class MyClient
{
public:
MyOwner* m_owner;
MyClient( MyOwner* Owner )
{
m_owner = Owner;
}
};
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Hi,
thank you for your answer.
I try same solution as you send me, but I have another problem:
MyOwner and MyClient classes are in their separate header files ( MyOwner.h and MyClient.h). If I try use this solutin, I got many errors from compiler.
I think that problem may be in incorrect includes of header files.
Can somebody give me some advice?
Regards
Radek
|
|
|
|
|
You must use a forward declaration:
Inside MyOwner.h
class MyClient;
class MyOwner
{
.
.
.
}
Inside MyClient.h
class MyOwner;
class MyClient
{
.
.
.}
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Discalimer:
The cluttered design of the following code is a mere conseguence of you requirements and
you retain full responsibility of
(I need the above to escape from led mike's advices about Scott Meyers' books )
class MyOwner;
class MyClient
{
MyOwner * m_pOwner;
public:
MyClient(MyOwner * pOwner):m_pOwner(pOwner){}
void doStuff();
};
class MyOwner
{
friend class MyClient;
private:
int m_iHiddenSecret;
public:
MyOwner (int iTheSecret)
{
m_iHiddenSecret = iTheSecret;
m_pClient = new MyClient(this);
}
~MyOwner()
{
delete m_pClient;
}
MyClient * m_pClient;
};
void MyClient::doStuff()
{
cout << "Now we all know the secret is: " << m_pOwner->m_iHiddenSecret << endl;
}
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]
modified on Friday, October 24, 2008 3:28 AM
|
|
|
|
|
I was just wondering what were some tutorials out there that do a good job of explaining functions and how they work? If you could please post a link that would be greatly appreciated!
|
|
|
|
|
There's Wikipedia [^], for instance.
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]
|
|
|
|
|
Function Tutorials[^]
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Wow - you provide "about 530,000" links and you get voted down.
Tough room!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Tough room!
Yes, Tough is the new Stupid!
led mike
|
|
|
|
|
Hello Everyone
i am trying to get color of the pixel from the monitor by using the below code but i getting 0xFFFFFFFF value every time wherever i click whether black,red green or white color its giving me same value, so can anybody help me out
the code is like this:
void getpixelcolor(CPoint point){
COLORREF m_colCurrent = pDesktopDC->GetPixel(point);
BYTE rVal = GetRValue(m_colCurrent);
BYTE gVal = GetGValue(m_colCurrent);
BYTE bVal = GetBValue(m_colCurrent);
}
regards
rakesh
|
|
|
|
|
Hello Everyone
i am trying to get color of the pixel from the monitor by using the below code but i getting 0xFFFFFFFF value every time wherever i click whether black,red green or white color its giving me same value, so can anybody help me out
the code is like this:
void getpixelcolor(CPoint point){
COLORREF m_colCurrent = pDesktopDC->GetPixel(point);
BYTE rVal = GetRValue(m_colCurrent);
BYTE gVal = GetGValue(m_colCurrent);
BYTE bVal = GetBValue(m_colCurrent);
}
regards
rakesh
|
|
|
|
|
the following code (just a quick test) is working fine on my system
HDC hDC = ::GetDC(NULL);
int x,y;
x = rand() % 600;
y = rand() % 600;
COLORREF cr = GetPixel(hDC, x, y);
CString szMsg;
szMsg.Format(_T("(%d %d) = { %d, %d, %d}"), x,y, GetRValue(cr), GetGValue(cr), GetBValue(cr));
AfxMessageBox(szMsg);
::ReleaseDC();
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]
|
|
|
|
|
i am using CRichEditCtrl, and sending to the control the EM_AUTOURLDETECT message.
problem is the rich edit decides the text color of the hyper link
how to change it?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi,
Currently im working on MFC Dialog Based application, the design of the dialog is to let user key in the word, then my picture control will render the sign language using the OpenGL. So I would like to link up the capture words that user key in the dialog and pass it to another function in order to display the animation. The problem now is Im unable to pass the variable from dialog.cpp to OpenGL.cpp
the dialog.cpp indicate that the dialog based that i have created while the OpenGL.cpp indicare that the program that I wrote to render the model.
I had declared the global variable as extern int NumOfWords and extern CString Word[20].
the NumOfWords is to capture how many words that user had keyed in and the CString Word[20] is to store the word by word into array.
How am I going to make these two variable at OpenGL.cpp? Hope to hear from you all soon. thank you.
regards,
sn00pi
|
|
|
|
|
sn00pi wrote: How to declare global variable in MFC dialog based application?
Like in any other C++ application (see [^]).
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]
|
|
|
|
|
Hi,
After declare the global Variable, how come the variable cannot be passing down to other .cpp? global variable should be able to passing down the variable right?
After I entered the word, the system able to capture the word. but then the word that store in the array unable to pass to the OpenGL.cpp is there any solution to solve this problem? thank you.
regards,
sn00pi
|
|
|
|
|
I think you should post the relevant pieces of code (stating the header or source file each snippet belongs to) and the detailed error messages you get (if any).
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]
|
|
|
|
|
hi,
here is it the oglMFCDialog.cpp code which is the dialog, when the user enter word, after click on button, the button function as below:
m_sText2 = m_sText;
m_sText = " ";
CString str = m_sText2;
int NumOfWords=0;
CString Word[20];
int c=0;
CString word;
int curPos= 0;
word = str.Tokenize(",.?% #",curPos);
while (word != "")
{
Word[NumOfWords]= word;
NumOfWords = NumOfWords + 1;
word = str.Tokenize(",.?% #",curPos);
}
COpenGLControl::COpenGLControl();
here is OpeGLControl.cpp file for OpenGL rendering,
COpenGLControl::COpenGLControl()
{
int NumOfWords;
CString Word;
static int t=0;
for(int a=0;a<NumOfWords; a++)
{
for(int c=0;c<NumOfFramesLoad;c++)
{
if(c == NumOfFramesLoad - 1)
{
g_3DModel[t] = g_3DModel[0];
}
else
{
string ObjFile[100];
char g ='0'+ c;
ObjFile[t] = Word[a] + g + ".obj";
........
........
The global variable i define in the OpenGLControl.h
extern int NumOfWords;
extern CString Words[20];
Those i need to used this 2 variables .cpp file i have declare them. Hope to hear from you soon. thank you.
regards,
sn00pi
|
|
|
|
|
sn00pi wrote: COpenGLControl::COpenGLControl()
{
int NumOfWords;
This local variable declaration hides the global one in the contex. remove it.
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]
|
|
|
|
|
I am new to C++
Consider the following
int number = 5;
int *numptr = &number;
Herecan say, numptr is a pointer to an integer and it has the address of the location where 5 is stored
char * number = "five is number";
However here is it right to say that the 'number' is a pointer to a char and stores the address of the first character in the string(f). If it is, then why does the statement,
cout<<number;
gives the string itself as the output and not the address where the character 'f' is stored.Also what does '&number' mean when 'number' is a pointer.
|
|
|
|