|
-
Jul 21st, 2003, 08:34 AM
#1
Thread Starter
Junior Member
Easy c++ to vB code
Hey what's up all. I started with vB about 2 weeks ago, it's so much fun. I'm learnin quick. I have come here and other places for so much help already, never posted though, I thank all you gurus...heh. But, it seems I have a dillema. I have this short c++ code that I need ported to vB, if thats even possible. All it does is send commands to a game console with the command Console("COMMANDHERE"). I would greatly appreciate help on this. I don't know what I can give in return for your experties, I'm not skilled enough in vB yet to make anything for ya guys. We can talk if I get replies. Heh.. See ya guys later.
P.S. This is the C++ code to send commands to a game console.
****************************************************
inline void Console(char *cgCmd)
{
HWND MohCons = FindWindow(0, "Mohaa Console");
EnumChildWindows(MohCons, EnumChildSendCommandProc,(LPARAM)cgCmd);
}
BOOL CALLBACK EnumChildSendCommandProc(HWND hwnd,LPARAM lParam)
{
char className[1024];
GetClassName(hwnd,className,sizeof(className));
if (strcmp("Edit",className)) return true;
if (ES_READONLY & GetWindowLong(hwnd,GWL_STYLE)) return true;
SendMessage(hwnd,WM_SETTEXT,0,lParam);
SendMessage(hwnd,WM_CHAR,13,0);
return 1;
}
****************************************************
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|