|
Hello everyone!
I'm making a program that I would like to have a plug-in interface. I thought of using something like Lua, but I would like them to be written in C or C++. I know I can use DLL's, but I want this to be cross-platform.
What's the most common method? I really don't want to use an external library, but I will if I'm too lazy to do it myself.
Thanks in advance!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Lord Kixdemp wrote: I want this to be cross-platform.
Not asking for the moon or anything then . With the current state of technology if you want it to be really cross platform you'll need to ship it as source and that source will need to be dependent on the C++ standard library, (no exotic features) and absolutely nothing else.
Otherwise I would recommend going for a statically linked library built with GCC/g++ under MingW or Cygwin on Windows and from the same source using a similar version of GCC/g++ on your Linux flavour of choice. If you can achieve that with genuinely shared source then a. you're a star b. please let me know the detaisl so I can do it to.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Dear Friends,
Could any one tell me. How to hide the Caption Bar in the dialog box using SetWindowLong() without removing the title bar in the properties of the dialog.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Are you interested in changing the WS_CAPTION style dynamically?
If so you can use
ModifyStyle( WS_CAPTION, 0 ); (using MFC)
OR
SetWindowLong( hWnd, GWL_STYLE, GetWindowLong( hWnd, GWL_STYLE ) & ~WS_CAPTION );
|
|
|
|
|
DWORD dwStyle = wnd.GetStyle();
::SetWindowLong(wnd, GWL_STYLE, (dwStyle & ~ WS_CAPTION));
Regards,
Paresh.
|
|
|
|
|
Hi,
I want to enable drag and drop for tree view. I used DragAcceptFile(TRUE) in the tree view and that worked fine for explorer folder.
My other requirement is the drag and drop should also work for email attachments say for outlook or gmail account. To clarify I want to drag an attachement from an email to a node in the treeview. Unfortunately when I am trying to do this it is not enabling and no message is being fired. can anybody help me please?
|
|
|
|
|
Hello,
I am working for C project. The codebase exist since long time(more than 10 years).
We are using lots of structures with fixed array size. Like
struct tagMystruct
{
char name[256];
char disign[256];
.
.
}
Now new requirement came, I have to change fixed size arrays to dynamic arrays. I defined new array like
struct tagMystruct
{
char *name;
int nameLength;
char *disign;
int disgLength;
.
.
}
Is this correct approach? In my existing code in lot many places we are using strcpy, strcat etc..
Now i have to check the buffer all the place before calling any function. It will take more time and regression? Can i know how can achive or any new ways?
Thanks and Regards,
Chandu
|
|
|
|
|
|
what about using <pre></pre> tags to format your answer ?
|
|
|
|
|
#include "stdlib.h"
#include "stdio.h"
struct tagMystruct {
char *name;
int nameLength;
char *disign;
int disgLength;
struct tagMystruct *next;
};
typedef struct tagMystruct item;
item *curr, *head = NULL;
void AddEntry(char *name, int nameLength, char *disign, int disgLength);
void ShowEntries();
void main()
{
AddEntry("Chandu", 6, "My Char", 7);
AddEntry("Any name", 8, "Any disign", 10);
ShowEntries();
}
void AddEntry(char *name, int nameLength, char *disign, int disgLength)
{
curr = (item*)malloc(sizeof(item));
curr->name = name;
curr->nameLength = nameLength;
curr->disign = disign;
curr->disgLength = disgLength;
curr->next = head;
head = curr;
curr = head;
}
void ShowEntries()
{
while(curr)
{
printf("%s\n", curr->name);
printf("%d\n", curr->nameLength);
printf("%s\n", curr->disign);
printf("%d\n\n", curr->disgLength);
curr = curr->next;
}
}
modified on Monday, December 10, 2007 3:42:36 AM
|
|
|
|
|
CString has Format method, how can i achieve the same if i'm using std::string?
|
|
|
|
|
You have a number of choices. Two spring immediately to mind:
1. Use ostringstream .
2. Use Boost's[^] Format[^] library.
Example using the first:
#include <string>
#include <sstream>
#include <iostream>
int main(int argc, char* argv[])
{
using namespace std;
ostringstream oss;
const int one = 1;
const int two = 2;
oss << one << " + " << two << " is " << one+two;
cout << oss.str() << endl;
return 0;
}
Examples of the second can be found at the link provided. I'd go for the second approach.
Steve
|
|
|
|
|
Thanks man! I'll try both methods!
|
|
|
|
|
One way is convert std::string to CString using marshalling
|
|
|
|
|
|
Hi All,,
I want some information about size of class.
I have tested one example like below...
class A<br />
{<br />
};
I declared one class but there is no any params into this.But when I see its size using sizeof() fuction it shows 1 .So I want to know for what it stores one byte.
Thanks in Advance.
Ashish Bhatt
|
|
|
|
|
|
|
I konw that in windows, with "extended desktop" I can use two monitors to form a big virtual screen.
But, how can I make the two monitors display part of the same screen.
For example:
I have two monitors with the same 1024*768 display mode, if I use windows to set the virtual screen ,it gets 2048*768 display mode.
But now, I want to get the 2024*768 display mode.
The first one displays [top-left](0,0)-[bottom-rigth](1023,767) of virtual screen, and the second one displays [top-left](1000,0)-[bottom-right](2023, 767).
As a result, left of first one and left of the second one displays the same region((1000,0)-(1023,767))
thank you for any suggestion
modified on Sunday, December 09, 2007 8:08:52 PM
|
|
|
|
|
Hi all!
How to create a setup file for another program in Visual C++?
plzz help
|
|
|
|
|
If you have Visual Studio then it should have a wizard that allows you to create Setup applications (quickly as well).
Otherwise, just write one.
Mark.
|
|
|
|
|
If not...
you can check the NSIS or the Innosetup programs.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I need to write a C program that prints a letter made of letters. It's like a mosaic.
Ex:
A
AAA
AA AA
AA AA
AA AA
AAAAAAAAAAA
AA AA
AA AA
I can make a letter like this, with a matrix or just with printf. The hardest part is that it needs to print words made of these letters. It's hard cause with printf you always write \n at the end and you cant print 2 letters next to each other. Only one below another.
So I'm begging you If you can find a sample program or give me a tip or a full program at best
I'll be really gratefull
Thanks in advance
modified on Sunday, December 09, 2007 12:30:19 PM
|
|
|
|
|
there are functions that allow you positioning along the screen like a goto (x,y). So you can continue using your methode of the matrix, but insteads of "printf" use every position in your matrix as a square (let's say...) 10x10 pixels, so you go through the matrix moving the cursor in 10 pixels on every i++ and writing or not writting as you need.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I'm building a VC++6 MFC application and trying to run it I received the message in the Subject line:
stack overflow
What can I do to avoid such messages?
How to check the stack and to set it.
...in VC++6, please...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|