|
Hi,
I am developping an ActiveX for my thesis. I have to represent graphically the IPs addresses source-destinatary of a network on the screen in a cercle. I want to interact with this IPs.
I have to be able to do RIGHT-Button on each IP and get a pop-menu. I don't know how many IP addresses are going to be, so I have to display them on the screen with as DrawText.
How can add the functionality Right-Button Mouse to a DrawText?
Another thing...when you create an ActiveX, the user can modify the size of the window containing the ActiveX, I wouls like to force the user to resize the window proportionally,I mean...creating a square...and not bein able to create a rectangle
Thank you very much
Javi
|
|
|
|
|
1) If the ActiveX is based on a CStatic, as I suppose, do not forget to set the SS_MOTIFY style.
2) Trease the WM_SIZE event and make every time your control look the way you want.
SkyWalker
|
|
|
|
|
Hi,
I create an installer package in which i can give shortcuts to come in the programs menu or desktop.
I am using IDE8.0
however i want to place an icon in the task bar which when clicked run's the application.
How can i implement this.
Also how to give an uninstall option which will remove it from the Add/Remove program folder.
Thanks
U get wht u Give
|
|
|
|
|
i want to write a program in c to establish a connection and transfer files between two remote machines using Ftp. Kindly tell me whats the basic idea and how to do it... also suggest any e-book or a tutorial. Thanks!
|
|
|
|
|
|
Thanks!! can i get some pure c code too? it would be a gr8 help..
|
|
|
|
|
|
no... no win32 based... ansi c one... Thanks! ur helping too much..
|
|
|
|
|
V.G wrote:
ansi c one
I am very sorry to mention this: I never had programmed in C (Dos Based), I Started straight away with C++. Actually I got concept of structural programming form PASCAL! (Hope you hear the name this language).
So I can't really help you in that! If you like I can make win32 based version of that ftp client which has no MFC dependency.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
|
hello everyone
my code works well most of the time in debug mode,however,it failed when i ship it into .exe.i guess it may be the problem of memory leak. the code seems to have problem is as below:
for(int i=0;i<30;i++)
{
CString temp;
temp=myfunction();
if (temp!="")
{
dlg->FieldName[j]=new char[];
strcpy(dlg->FieldName[j],temp);
dlg->nColumnEnd=count;
j++;
count++;
}
}
and sometimes when debugging, it alerts as below:
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 512 to 444 to satisfy request of 64 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 444 to 376 to satisfy request of 64 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 376 to 344 to satisfy request of 28 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 344 to 312 to satisfy request of 28 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 312 to 280 to satisfy request of 28 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 280 to 224 to satisfy request of 52 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 224 to 168 to satisfy request of 52 bytes.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 168 to 112 to satisfy request of 52 bytes.
First-chance exception in C.exe (NTDLL.DLL): 0xC0000005: Access Violation.
First-chance exception in C.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
First-chance exception in C.exe (NTDLL.DLL): 0xC0000005: Access Violation.
Is there any who can tell me what i could do to save my code?ThanX in advance!
|
|
|
|
|
steven_wong wrote:
dlg->FieldName[j]=new char[];
suhredayan There is no spoon.
|
|
|
|
|
|
First of all,thank you for all of your replies!
i am a beginner,and can you tell me what's wrong with my code more specificly?
i am sorry to trouble you again.
|
|
|
|
|
steven_wong wrote:
i am a beginner
Me too!
steven_wong wrote:
can you tell me what's wrong with my code more specificly?
here
dlg->FieldName[j]=new char[]; // you not given how much memory you want
steven_wong wrote:
i am sorry to trouble you again.
No problem when ever you need help you can buzz me again
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Thank you so much for your help,thatsalik,i have figured out my error.
it is really quite nice to meet you !
|
|
|
|
|
steven_wong wrote:
Thank you so much for your help,thatsalik
you can Refer me By Alok!
steven_wong wrote:
i have figured out my error.
That's Great
steven_wong wrote:
it is really quite nice to meet you !
Same Here
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
steven_wong wrote:
if (temp!="")
if (! temp.IsEmpty())
steven_wong wrote:
dlg->FieldName[j]=new char[?????];
How many characters are you allocating room for?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi all,
I found that Visual C++ .NET 2003 has the following bug
on compiling inner class of template class:
---------------------------
template <class FirstOuter, class SecondOuter>
struct Conj
{
struct Inner
{
typedef typename FirstOuter::Inner First;
typedef typename SecondOuter::Inner Second;
};
};
struct A
{
struct Inner
{
static void a(void) {};
};
};
struct B
{
struct Inner
{
static void b(void) {};
};
};
struct C
{
struct Inner
{
static void c(void) {};
};
};
int main(int, char**)
{
Conj<A, B>::Inner::Second::b(); //ok;
Conj<A, Conj<B, C> >::Inner::Second::First::b(); // ok;
Conj<Conj<A, B>, C> >::Inner::First::Second::b();
//bug! Should be compilable but trigger C2039: 'Inner': is not a member of 'operator' `globalnamespace'
Conj<A, Conj<B, C> >::Inner::Second::Second::c();
//bug! Should be compilable but triggered C2039: '__ctor' : is not a member of 'Ctor<FirstOutter, SecondOuter>::Inner'
Conj<Conj<A, B>, C> >::Inner::First::First::a();
//bug! Should be compilable but triggered C2039: 'Inner': is not a member of 'operator' `globalnamespace'
}
-----------------------------------
Any idea or workaround? Thanks.
|
|
|
|
|
i think you should be more specific in your message. anyway if what i understand is correct, u want to print the array k i*j times right?
if so, just do a triple nested for loop. i.e.
for (i...)
{
__for (j...)
__{
____for (k...)
____{
______// printing goes here
____}
__}
}
the underscores are just to space the code nicely.
anyway, the first way works fine, however i would recommend that u create a function for the printing of k. i.e.
void printK(int &array, int sizeofK)
{
__for (i=0; i
|
|
|
|
|
do you mean having a two-dim. array with arrays as elements?
No hurries, no worries.
|
|
|
|
|
exactly, that is what i want!!
|
|
|
|
|
I can think of two ways.
1: do it like: array[i][j*k]
all elements after j are of the second array.
2: In .NET you can create arrays of objects, an array is an object, so you could create an object array, put it in a object array ... you should be able to cast it back into an array, I think . Better would be that the object is a class containing not only an array, but also the size of it. Sort of a CArray class. (Overload for the basic types: CString, int, double ...)
good luck.
No hurries, no worries.
|
|
|
|
|
what's the difference between CString and string? which one will be better and easier to use?
so far i'm always sticking to string, as i learnt it that way. someone please enlighten me the advantages of CString over string.
|
|
|
|
|
CString is Microsoft's string class. It has an easier syntax to the methods that it exposes. I use string by default, and CString if I have to. I'm far more likely to use bstr_t ( converts between wide and narrow strings for you ) than CString.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|