![]()  | 
  | 
  | 
| Subject:
Visual Studio 2005, Visual C++, Getting started,
 Category: Computers > Programming Asked by: impakistan-ga List Price: $2.00  | 
Posted:
11 Jun 2006 06:30 PDT
 Expires: 11 Jul 2006 06:30 PDT Question ID: 737187  | 
  | 
| There is no answer at this time. | 
  | 
| Subject:
Re: Visual Studio 2005, Visual C++, Getting started,
 From: capndurk-ga on 15 Jun 2006 20:41 PDT  | 
clr, atl, mfc, and others are just c++ libraries used to make programming easier. however, it's really all a matter of opinion. personally, i use windows api and i don't touch any of the libraries, including the popular mfc. if you're getting started with visual c++, i recommend sticking with the api, but it's just what you want to do. read this article for the information i found on it: http://winprog.org/tutorial/apivsmfc.html this guy knows his stuff when it comes to windows programming. they also have a channel on irc if you need further help; i would know, the programmers there have helped me countless times. good luck :)  | 
| Subject:
Re: Visual Studio 2005, Visual C++, Getting started,
 From: impakistan-ga on 17 Jun 2006 17:13 PDT  | 
thanks capndurk-ga.. its really great to see ur reply...
anyways, here is what i learnt:
in Visual Basic, we have to lines of code: using WSH SHELL OBJECT.
(microsoft.com/scripting)
=========
obj=CreateObject("WScript.Shell")
obj.PopUp("Hello World")
=========
here is equvilant in C++ (MAN COUNT THE LINES)
==========
// acHRESUtivex.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string>
using namespace ATL;
HRESULT hresult;
DISPID dispid;
DISPPARAMS par;
OLECHAR FAR* szMember = L"PopUp";
VARIANT param;
int _tmain(int argc, _TCHAR* argv[])
{
  CoInitialize(NULL);
  CLSID Clsid;
  IUnknown *iF;
  IDispatch *pDispatch;
  CLSIDFromProgID(L"WScript.Shell", &Clsid);
  HRESULT h=CoCreateInstance(Clsid, NULL, CLSCTX_INPROC_SERVER,
IID_IDispatch, (void **)&pDispatch);
  
  hresult = pDispatch->GetIDsOfNames(IID_NULL,&szMember,1,
LOCALE_SYSTEM_DEFAULT,&dispid);
  BSTR msg = (L"Hello World!");
  param.vt=VT_BSTR;
  param.bstrVal=msg;
  par.rgvarg=¶m;
  par.rgdispidNamedArgs=&dispid;
  par.cArgs=1;
 
  pDispatch->Invoke(dispid,IID_NULL,LOCALE_SYSTEM_DEFAULT,DISPATCH_METHOD,&par,NULL,NULL,NULL);
return 0;
}
======================= | 
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.  | 
| Search Google Answers for | 
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |