Thread: help setting up vc project

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    91

    help setting up vc project

    Code:
    int __stdcall WinMain(DWORD hInst,DWORD hPrev,char *CmdLine,int CmdShow)
    {
    	int WinMainReturnValue = 0;
    	VBCommand = CmdLine;
    	initgarbage();
    	initvbtypes();
    	memset(&TempVarsCHAR,0,sizeof(TempVarsCHAR));
    
    	// ---------------------------
    	// Start of user code
    	// ---------------------------
    
    	MsgBox("Calculation inside arrays: ");
    
    Main_return:;
    
    	// ---------------------------
    	// End of user code
    	// ---------------------------
    
    	if (GarbageArray[GarbagePos]) free((void *)GarbageArray[GarbagePos]);
    	free((void *) App.Path);
    	free((void *) App.EXEName);
    	return(WinMainReturnValue);
    }
    i also have a whole bunch of classes and globals, one fucntion in which defines msgbox. i dont know how to set the whole thing up is the problem.

    i can post the dwp, cpp and h files if somebody could get this working.

    for example in one of the globals i have ,

    Code:
    // --------------------------- MsgBox() function
    char *HelpFileStr;
    void MsgBoxCallback(LPHELPINFO);
    void MsgBoxCallback(LPHELPINFO lpHelpInfo)
    {
    	WinHelp(0,HelpFileStr,1,lpHelpInfo->dwContextId);
    }
    DWORD MsgBox(char *,DWORD = VbMsgBoxStyle_vbOKOnly,char * = App.Title ,char * = "",DWORD = 0);
    DWORD MsgBox(char *Prompt,DWORD Buttons,char *Title,char *HelpFile,DWORD Context)
    {
    	MSGBOXPARAMS MsgBoxDat;
    	memset(&MsgBoxDat,0,sizeof(MsgBoxDat));
    	MsgBoxDat.cbSize=sizeof(MsgBoxDat);
    	MsgBoxDat.hInstance=App.hInstance;
    	MsgBoxDat.lpszText=Mid(Prompt,1,1024);
    	MsgBoxDat.lpszCaption=Title;
    	MsgBoxDat.dwStyle=Buttons;
    	if((Buttons&VbMsgBoxStyle_vbSystemModal)==0) MsgBoxDat.dwStyle=MsgBoxDat.dwStyle|8192;
    	MsgBoxDat.dwContextHelpId=Context;
    	MsgBoxDat.lpfnMsgBoxCallback=(DWORD) &MsgBoxCallback;
    	MsgBoxDat.dwLanguageId=0;
    	HelpFileStr=HelpFile;
    	return(MessageBoxIndirect(&MsgBoxDat));
    }
    i am having a problem with linking everything together.

  2. #2
    ^ Read Backwards^
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    282
    Besides #including them you have to add them to the project.
    Project menu/Add To Project/Files

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    91
    that was probaly a bit vague.

    i have an app that converts vb module code to vcpp.

    this is from the convertor help file, so these are the files that the convertor produces. i cant remember how to setup vcpp at all, in other words adding and linking files.

    Output files:

    From a project to be converted it should produce:

    <ProjectName>.dsw
    - Visual C++ workspace file.

    <ProjectName>.dsp
    - Visual C++ project file.

    <ProjectName>.cpp
    - Main file containing:

    All APIs definition.
    Includes to secondary files.
    Emulated functions.

    <ProjectName>const.h
    - Containing all constants definitions.

    <ProjectName>type.h
    - Containing all user types definitions.

    <ProjectName>var.h
    - Containing all (global) variables definitions.

    <xxx>.cpp
    - Depending on the modules referenced in the project.
    With constants/variables and user types definitions extracted.:
    if i load xxx.cpp into vc and compile it i get a bunch of errors, i need a step by step guide as to what to add and include etc

    heres a zip file with all the code, if somebody could compile project1.cpp would be great. thanks

    project1.cpp aka xxx.cpp

    http://mylogger.sslpowered.com/New%20Folder.zip
    Last edited by joeyzt; 12-18-2005 at 01:13 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Project Help please!
    By black_hole??? in forum C++ Programming
    Replies: 4
    Last Post: 04-28-2009, 12:55 AM
  2. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 01:12 AM
  3. Project Varia recruiting.
    By Raigne in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 10-12-2008, 03:15 PM
  4. MFC in an empty project
    By cunnus88 in forum Windows Programming
    Replies: 0
    Last Post: 10-09-2005, 09:19 AM
  5. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM