|
I'm new to DirectX programming and I'm doing a breakout clone as a college project. I have to add some network functionality to my game though. I think I've got my server up and running.
I've created my socket, bound it and called WSAAsyncSelect with my own eventID and started listening. I just want to connect my client and send simple messages of 2 integers(that's all I need).
I just need some help connecting to local host to send messages. On the client I've created my socket, bound it and called WSAAsyncSelect with my own eventID and I'm trying to connect and it is failing here. Can someone please help?
Any help is much appreciated
Ciaran
|
|
|
|
|
I'm developing a Win32 SDK MDI application (no MFC). My child forms maximize, but once they become maximized, they no longer operate (I can't minimize, restore, or close them. My child WndProc is empty except a call to DefMDIChildProc. Any ideas why the child won't respond after being maximized?
Thanks in advance for any help,
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
this is beginning to intrigue me too ... how are you maximizing the window?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi Lauren. It turns out that the problem existed in my Frame Window's WndProc. You have to return '0' when you handle the frame's WM_SIZE message. Go figure.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
I want to talk ho samebody who knows gantt
bogdan
|
|
|
|
|
you mean gannt charts and all that?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
yes, but not for vb, I work in vc++, I know, the diference, is not so big, but I need some documentation and exemple, please.
Thanks.
Bogdan
|
|
|
|
|
I have an existing console app in which I need to get some information from the registry which is placed there by a regular Windows based MFC app.
I have tried WriteProfileString(), WriteProfileInt(), GetProfileString(), GetProfileInt(), etc. with no luck. Any suggestions? Thank You.
|
|
|
|
|
G'day Robert,
Do you know the full path of the registry key you want to access?
If so, you can use the RegOpenKeyEx, RegQueryValueEx, RegCloseKey
and other related functions.
Hope this helps.
Steve
|
|
|
|
|
I have an existing console app in which I need to get some information from the registry which is placed there by a regular Windows based MFC app.
I have tried WriteProfileString(), WriteProfileInt(), GetProfileString(), GetProfileInt(), etc. with no luck. Any suggestions? Thank You.
|
|
|
|
|
MSDN
Platform SDK
Base Services
Registry
Registry Reference
Registry Functions
Have a look at RegEnumKey/RegCreateKey and so on. There are plenty of
examples in the platform SDK. There are also examples on code project.
Stephen
|
|
|
|
|
I've had some freaky stuff going on with printing for a while. I'm hoping someone can help me out here.
I've got a bitmap (technically, I'm trying to write the whole screen) that I'm trying to write out to a
network printer. The code I'm working with does the following: Creates a screen-compatible memory
DC, then blits the screen into it. Converts that into a DIB, then calls StretchDibBits to the printer DC.
Works perfectly, under NT. When I try to run the same code under Win98, I have problems. The blit
works fine, but the stretch on the DIB returns an error. The return code indicates I have an
"invalid parameter". If I stretch first and then SetDiBits, the code works, but I lose all my color
information...
I'm completely confused. I've tried everthing I can think of to get this code running. For the moment,
I've just put in a check and a message box that indicates this feature is only available under WinNT, but
I'd like to fix it if at all possible.
Anyone have any ideas?
>>>>>>>>>> Nathan
If a picture is worth a thousand words, reproducing a bug is worth ten thousand.
|
|
|
|
|
I have a class for resize my dialog. But if I make an anchor for my activx (gantt) the variable "wnd" for the Addanchor class is empty. Why?
And wich is the state for a activx? like STATIC.......
bogdan
|
|
|
|
|
I have a class for resize my dialog. But if I make an anchor for my activx (gantt) the variable wnd is empty. Why?
bogdan
|
|
|
|
|
Hi.
I have a problem when I try to retrieve local IP address.
I insert this code into CMyDlg::InitDialog:
gethostname(buffer, 255); //buffer is a char* CMyDlg member variable HOSTENT* hEnt = gethostbyname(buffer); if ( hEnt ) { strcpy(buffer, inet_ntoa( *(LPIN_ADDR)*(hEnt->h_addr_list))); }
... but it, when links, says:
MyDlg.obj : error LNK2001: unresolved external symbol _inet_ntoa@4
MyDlg.obj : error LNK2001: unresolved external symbol _gethostbyname@4
MyDlg.obj : error LNK2001: unresolved external symbol _gethostname@8
Debug/My.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
My.exe - 4 error(s), 0 warning(s)
WHY?????????
IS THERE ANYONE WHO HELP ME???
Thanks in advance.
Of course I added in code:
#include "winsock.h"
Ing. Marco Moscato
SeaSoft S.p.A., Catania, Italia
E-mail: mmoscato@seasoft.it
|
|
|
|
|
In your project settings, try to link to wsock32.lib....
Ciaran
|
|
|
|
|
Hi,
I'm planning to realize a new project with Visual C++. It should uses ADO and other COM components.
Is it clever to still use MFC with lots of conversions and other disadvantages or should I use a new technology like ATL or WTL?
What's your opinion?
Thanks in adance
Christian
|
|
|
|
|
I found MFC a lot easier to use and works every well for all of my projects. The latest ATL may be a little better, but we do not have the luxury of upgrading to the latest version of VC++. We are still using VC++ 5.0. ATL in VC++ 5.0 is a pain in the butt for simple things such as adding an event to your com object. A lot of people here will probably tell you different things, though.
|
|
|
|
|
1. I'm looking for guidelines for creating a COM+ application using VC++ 5.0. I have knowledge of idl, ATL, VC, & COM.
Not sure on how to build this knowledge into a COM+ Application in Windows2000.
Is there any good documentation available.
2. Is MFC Dead, is it still supported?
Gerry.
|
|
|
|
|
I forget how to get the language info in Windows. :-P Thanks for any help.
|
|
|
|
|
Use MSDN.
MSDN LIbrary
Platform SDK
Base Services
Internation Features
National Language Support
National Language Support Functions
Its all described here
Its not MFC, but you don't need MFC to do this.
Stephen Kellett
|
|
|
|
|
I have a cformview w/ a control that I'd like to have respond to the enter key. I understand you can use getdlgcode for dialogs, but would I need it for this situation? How would I go about doing this? I searched around but didn't come up with much in my situation. Any leads would be appreciated.
Thanks in advance.
|
|
|
|
|
I need to solve real-time second order differencial equations. Do you know some library I can get to work it out?
Giorgetti Stefano
|
|
|
|
|
Check out http://www.maplesoft.com/
Maple is a symbolic math engine that will do what you need. I don't know if they sell the library to end-users or not. ( i know that they sell it with MATLAB...)
|
|
|
|
|
Hi
I have a function in my document class that returns a reference to a Ctypedptrlist.
I wan't to access this list(function)in my own class derived from Cobject.
I have tried to use a Getdocument function but it won't work.(how to do this?)
I can't include the document header file in my class.
If i can't access the function in my document class, then I need to make a static CList. I have tried
but I can't seem to get it working.(how to do this?)
as you probably can see (by my problems) I'm quite new to c++ and MFC, and I'm working on my
first program.
Svein Ravndal
|
|
|
|