cerberi
27-07-2008, 13:15
trebam pomoć oko izrade buttonsa, checkboxeva i tih stvari u c++ express 2008. stvar je u tome što ne želim da koristi mfc. trebao bih kod koji napravi form-u odredjene veličine, i neki button unutar nje.
recimo ovako: ja zovnem funkciju createButton(int width, int height, char buttonName, ...) npr. i sad ta funckija kreira tu formu i button unutar nje
jeli zna netko kako se to može napraviti?
tip projekta kojeg imam je win32 .dll. evo kod pa molim vas pomozite::
///////////////////////////////////////////////////////////////////////
// sampledll.cpp : Basic example DLL for A6
// (c) conitec / jcl 2004
///////////////////////////////////////////////////////////////////////
// Use this source as template for your own DLLs.
// Copy sampledll.dll to the acknex_plugins folder,
// and include "sampledll.wdl" into your script.
///////////////////////////////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>
#include <string>
#include <iostream>
// engine specific header file
#define DLL_USE // always define before including adll.h
#include "adll.h"
using namespace std;
///////////////////////////////////////////////////////////////////////
// the following function MUST be defined in your DLL
// DLL main entry point - normally this needs not to be changed
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
engine_bind();
return TRUE;
}
DLLFUNC void message(LPCSTR text, LPCSTR name, UINT uType)
{
MessageBox(NULL,
text,
name,
uType
);
}
void createButton()
{
// OVDJE BI BIO KOD ZA KREIRANJE FORME I BUTTONA
}
recimo ovako: ja zovnem funkciju createButton(int width, int height, char buttonName, ...) npr. i sad ta funckija kreira tu formu i button unutar nje
jeli zna netko kako se to može napraviti?
tip projekta kojeg imam je win32 .dll. evo kod pa molim vas pomozite::
///////////////////////////////////////////////////////////////////////
// sampledll.cpp : Basic example DLL for A6
// (c) conitec / jcl 2004
///////////////////////////////////////////////////////////////////////
// Use this source as template for your own DLLs.
// Copy sampledll.dll to the acknex_plugins folder,
// and include "sampledll.wdl" into your script.
///////////////////////////////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <math.h.>
#include <string>
#include <iostream>
// engine specific header file
#define DLL_USE // always define before including adll.h
#include "adll.h"
using namespace std;
///////////////////////////////////////////////////////////////////////
// the following function MUST be defined in your DLL
// DLL main entry point - normally this needs not to be changed
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
engine_bind();
return TRUE;
}
DLLFUNC void message(LPCSTR text, LPCSTR name, UINT uType)
{
MessageBox(NULL,
text,
name,
uType
);
}
void createButton()
{
// OVDJE BI BIO KOD ZA KREIRANJE FORME I BUTTONA
}