|
Instead of including TestGLView.cpp , add
extern float xtrans, ytrans; to ChildFrm.cpp , so the compiler knows, that they're implemented in another file of this project.
Regards
Thomas
Finally with Sonork id: 100.10453 Thömmi
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
How do I check to see if the key being pressed is the up, down, left or right arrow key? i.e. to check if "I" is pressed, I do this:
void CChildFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
CMDIChildWnd::OnKeyDown(nChar, nRepCnt, nFlags);
char keypressed = char(nChar);
if(keypressed == 'I')
//Do stuff
}
but what do I write in the if statement to check for an arrow key?
|
|
|
|
|
You can use VK_LEFT, VK_UP, VK_RIGHT and VK_DOWN
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
You can find all of the other lookup codes in MSDN by looking up Virtual Key Codes.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
You may need to handle the arrow keys in the PreTranslateMessage function which you can override.
if (pMsg->message == WM_KEYDOWN)
{
switch (pMsg->wParam)
{
case VK_UP :
case VK_DOWN :
case ...
}
}
you should return TRUE if you dont want te message to be processed further, or pass the message through to the base class to allow it to be processed by controls as normal.
Roger Allen
Sonork 100.10016
yet to be identified being from the planet Paltinmoriumbanfrettybooter
|
|
|
|
|
Hi,
I have one project which is using DAO with an access97 database, now we want to change the database to Access 2K. But, of course, we have some problems:
steps.
Database migration to Access 2K. (No problems)
Test the Application with new database (Format not recognize), I was investigating it but I only found that my project is using DAO35 with MFC42 (version 6.0) and it seems that it needs DAO36 and MFC version >= 6.01.
I not sure, and I hope that somebody could be in the same trouble that I am now.
Thanks!!
---------------------
Pere Llibre
Software Engeneering
|
|
|
|
|
Have you installed MDAC 2.7?
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Yes I have MDAC 2.7 installed, but nothing happens.
I have VC6 with sp5 -> mfc version 6.0 and I found that MFC load DA035 with this msvc.dll (access2k not supported), If you have mfc version >= 6.01 it will use DAO36 (access2k supported).
Do you know something about it? or anything else? Thanks for your prompt repply.
---------------------
Pere Llibre
Software Engeneering
|
|
|
|
|
Your problem is very common. Is no problem with librarys, neither MDAC, is a problem in the class of dao, this classes are usin the incorrect version.
For that you need to find, an article that wrote paul dilascia in MSJ, in the the first or second mounth of 2000 year. In that Article Paul explain the solution for your problem...
I will try to find that article.
Give me a couple of hours...
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I found the article
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You can find a solution Here
The MSJ issue is January 2000
Best Reagards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thank you very much!!
Best Regards,
---------------------
Pere Llibre
Software Engeneering
|
|
|
|
|
Don't mention it..
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You can find a solution Here
The MSJ issue is January 2000
Best Reagards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I have a logon dialog with a username and password fields implemented as edit boxes. I need to trap the window handles for the two edit boxes at dialog initialization. How do I do this?
Thanks in advance,
Bob
|
|
|
|
|
GetDlgItem (IDC_USERNAME)->GetSafeHwnd()
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks!
|
|
|
|
|
I need to rename a registry key, but am not sure how to do this in VC++. Any suggestions?
|
|
|
|
|
Andrew Stampor wrote:
I need to rename a registry key, but am not sure how to do this in VC++. Any suggestions?
There is no direct way to rename a key. Create the new key. Enumerate all the subkeys and their values from the old key and add them under the new key. Now delete the old key.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Thanks.
Do you know if this code exists somewhere on CodeProject? I've done a couple of searches, but haven't found anything about it. Do you have this code somewhere? If it doesn't exist here, I'll be sure to post the class I create when I am done.
|
|
|
|
|
How can I create some custom controls using only the win32 API???
Is there any tutorial about this subject??
ps: I kinda want to do something that looks like RealOne.
|
|
|
|
|
Can anyone point me to a good learing book with lots of samples for programming in windows? I have programmed in C/C++ for some time, self taught, but in the Dos environment and need to get to the Windows environment.
|
|
|
|
|
Can't go wrong with Jeff Prosise's Programming Windows with MFC. Charles Petzold's books are also very good.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I read these two books and I thought they are very helpful for me to understand the algorithms used for Windows programming:
Windows Game Programming for Dummies by Andre LaMothe
SAMS Teach Yourself Visual C++ 6 in 24 Hours by Mickey Williams
|
|
|
|
|
If you are looking to program Windows without MFC then I recommend...
"Win32 Programming"
This could be a good thing because when you do study MFC, you'll know why things are the way they are, which is extremely benificial.
Furthermore, one of the authors is a regular here, so you could also continue to read his stuff by visiting CP.
Barry R. Martin wrote:
I have programmed in C/C++
Good! The book assumes you already know it, so it won't waste your time by telling you how to dereference a pointer, etc.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
<nobr>
Homepage : Sonork = 100.16311 01000010011011110110001000100000011101110110000101110011 00100000011010000110010101110010011001010010111000000000
|
|
|
|