|
thanks a lot man
that helped me!
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Is it possible to easily wrap a popup menu into multiple columns. I would like something like the Start menu on Windows XP, but haven't been able to determine if this is a non-standard menu that Microsoft has implemented. I don't see anything in the SDK documentation to select between scrolling or wrapping popup menus.
Thanks.
Neal Stublen
http://www.awesoftware.com
|
|
|
|
|
You may be able to get somewhere using Owner Draw menus, other than that I think you are on your own.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Now, maybe its because its Monday, or maybe I truely am a dumbass; But I've got a bit of a problem code involving string pointers.
Let me explain: I've got a function that constructs a string and returns:
LPCTSTR CSomeClass::GetSerialString()
{
std::ostringstream strstream;
strstream<< std::setfill((TCHAR)'0')<<\
std::setw(5)<<m_nSerial;
strstream<<std::flush;
ASSERT( (strstream.str()).length() == 5 );
return (strstream.str()).c_str(); }
}
Whenever this function is called using the following code:
string strSerial;
strSerial = GetSerialCodeString();
The strSerial variable points to an invalid string array, even though at the point of tracing, the GetSerialString function contains the correct string.
Can someone explain why the LPCTSTR return value gets destroyed?
I Dream of Absolute Zero
|
|
|
|
|
Can someone explain why the LPCTSTR return value gets destroyed?
Because the LPCSTR returned is a pointer to the internal string of strstream , and strstream (and its asocciated string ) is destroyed as soon as GetSerialCodeString exits. Use a smarter data type like string itself:
std::string CSomeClass::GetSerialString()
{
return strstream.str();
}
...
string strSerial;
strSerial=GetSerialCodeString(); This ought to work because string has an overloaded copy constructor that takes care of safely moving the internal resources between objects.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
cheers dude!
I Dream of Absolute Zero
|
|
|
|
|
In the windows right corner there is a set of icons which represents some application running on PC. How can I add a new icon to this set, how can I interact with this one?
Thanks
Telecommunication Engineer.
He works from more than 3 years as a software consultant over distributed systems developed in C++ or Java and based on a CORBA or DCOM tecnology. Knowledge of relationship and object DB
|
|
|
|
|
|
|
hello sir
I have written a MAPI client program in C++..
what all softwares do i need to install for this program to run..
is visual studio enough..
or is there anyother simple software for MAPI to get executed??
actually i have to run tihs porgram in a fresh machine..what al softwares do i need for tis C++ MAPI client to run onthe fresh machine??
do i needto install microsoft exchange server too..coz' i remember reading somewhere that
"The information here only applies to MAPI client applications that access Exchange."
what else do i need to install for my program to run??
ranjani
|
|
|
|
|
Hi,
You pass mapi questions during last month
To install mapi you need register Msmapi32.ocx using
regsvr32.
In some casees you will need to have file Msmapi.srg with
licenses.
Vitali
http://www.creative-case.com[^]
|
|
|
|
|
what is that msmapi32.ocx ??how do i register into it??
or is the file.. msmapi.srg enough for running my program?
ranjani
|
|
|
|
|
|
do i need MS exchange server to run my client??
or is the file u specified before sufficient for executing it??
ranjani
|
|
|
|
|
|
what do u mean by this statement??
can i have more than 1 mail server in my system??
what is ms exchange server??
ranjani
|
|
|
|
|
"The information here only applies to MAPI client applications that access Exchange."
what does the above written statement mean??
ranjani
|
|
|
|
|
Fist part of the question: now you know how to install MAPI.
OK?
Second part: you don't need to install exchange server. MAPI can work
with any email server supported it.
I hope clear?
Vitali
http://www.creative-case.com[^]
|
|
|
|
|
so u mean to say..in a fresh machine MAPI won't work just with visual studio installed in it.,is it what u mean??
ranjani
|
|
|
|
|
I don't know why but recursion is always a problem for me. T_T Actually this is my mid-term test and I screw it. Y_Y Anyways, can anyone help me solve this please?
The teacher gave me 3 files for the problem(1 header file and 2 source files.) This is part of them.
/*Change the implementation of 'find' and 'insert' function to use an iterative algorithm instead of resursion.*/
struct cell // cell in a tree
{
keytype key;
valuetype value;
cell *left;
cell *right;
};
typedef cell *cellptr;
cellptr sortset::find(cellptr temproot, keytype key)
{
if (temproot == 0) return 0;
else
{
int compare = keycmp(key, temproot->key);
if (compare == 0) return temproot;
else if (compare < 0)
return find(temproot->left, key);
else
return find(temproot->right, key);
}
}
void sortset::treeinsert(cellptr &temproot, keytype key, valuetype value)
{
if (temproot == 0)
{
temproot = new cell;
temproot->key = key;
temproot->value = value;
temproot->left = temproot->right = 0;
}
else
{
int compare = keycmp(key, temproot->key);
if (compare < 0)
treeinsert(temproot->left, key, value);
else if (compare > 0)
treeinsert(temproot->right, key, value);
}
}
void sortset::insert(keytype key, valuetype value)
{
treeinsert(root, key, value);
}
Thanks in advance
|
|
|
|
|
This is homework, so it is not fair to provide a full solution. Instead, I can give you some guidance. In a recursive function, each time the function is further invoked a new set of argument and local variables is created. In your particular case, find only uses two argument variables, namely temproot and key . So, you can think of the function in progress as progressively creating variables temproot1 , key1 , temproot2 , key2 and so on. Now, if you want to avoid recursion, you'll have to find a way to reuse the local variables so that they adopt the rol they'd have in a recursive call. find is particularly simple, as key is really a constant value (it never changes inside the function), and as for temproot you can notice that it is no longer used after recursively invoking find , so you can safely change it to hold the value it'd have in the recursive invokation and loop again (instead of calling find .)
Good luck, don't hesitate to post again if you stuck somewhere.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How to get the number of new and unread emails from an email box??
under vc6?
Thank you very much!!!
|
|
|
|
|
Hi,
Use MAPI
Vitali
http://www.creative-case.com
|
|
|
|
|
I want to use UIDL.
But I don't know how to use.
Any example?
Thank you very much.
|
|
|
|
|
There is some DC,
and I want to know which window owns it..
Is it possible?
thanks you.
|
|
|
|