|
thanks a lot for this timely help!
kindest regards
safee
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
How can I programmatically know when any machine on my network accesses my machine through a share or through C$, D$ using admin priviledges?
Is it possible to know the logged in username also?
Thanks in advance.
With best regards,
Sayan
With best regards,
Sayan
Email:sayanmukherjee@indiatimes.com
|
|
|
|
|
Sayan Mukherjee wrote:
Is it possible to know the logged in username also?
GetUserName() will return the currently logged in user on the local machine.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi
What about c:\>NET Session at the command prompt.
best wishes ...mil10
|
|
|
|
|
Hello,
I'm using VC++ 6.0 and I want to change the background color of my CTreeCtrl object. I don't know how . Can anybody help me?
thanks in advance.
|
|
|
|
|
CTreeCtrl::SetBkColor()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I've just started programming in VC++ and I've encountered some problems.
I'm accessing an Access database using DAO. This database contains two fields; a hyperlink (Addr) and a description of this hyperlink (Desc).
I've done that like this:
[code]
void CClientListDlg::RefreshList()
{
COleVariant var;
var.ChangeType(VT_BSTR, NULL);
CString Desc,Addr;
m_Desc.DeleteAllItems();
db.Open("List.mdb");
recset.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM Clients",NULL);
while(!recset.IsEOF())
{
int i = 0;
recset.GetFieldValue("Desc",var);
Desc = (LPCSTR)var.pbstrVal;
m_Desc.InsertItem(i,Desc,0);
recset.GetFieldValue("Addr",var);
Addr = (LPCSTR)var.pbstrVal;
m_Desc.SetItemText(0,1,Addr);
i = i++;
recset.MoveNext();
}
recset.Close();
db.Close();
}
[/code]
Is it possible to let VC++ show this hyperlink (Addr) clickable?
Also, is there a routine to make my prog search through the database, preferably in both fields?
Sorry about the newbie questions, but as I said, I'm new at this.
Thanks in advance for all your help!
Greetz,
[NL]G}{0$T
..: [ Once Busted - Twice As Shy ] :..
|
|
|
|
|
1. Yes; by adding a click handler (or possibly a double-click handler) to the listview, you could then launch IE from there (by ShellExecute or some such).
2. If you want to search, you'd modify the SQL used to open the recordset.
You can do this modifying one of the member variables of the CDaoRecordset, setting it to something like
Addr LIKE '%codeproject%'
which would return all the hlinks containing codeproject.
(% might need to be a * depending on your version of Access).
Steve S
[This signature space available for rent]
|
|
|
|
|
Thank you for your quick reply..
You're right, I should ShellExecute IE, but how can I use a variable link in the command?
I've tried:
[code]
void CClientListDlg::OnDblclkClients(NMHDR* pNMHDR, LRESULT* pResult)
{
(32 >= (int)ShellExecute(NULL, "open", ADDRE, NULL, NULL, SW_SHOWNORMAL));
*pResult = 0;
}
[/code]
But this does't seem to work. It VC tells me that ADDRE is not defined..
Any suggestions?
Greetz,
[NL]G}{0$T
..: [ Once Busted - Twice As Shy ] :..
|
|
|
|
|
Steve S wrote:
[This signature space available for rent]
How much?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hiya I am using remove function to remove a file i.e
remove( "\\myfile.pmx" );
which works fine but when the file is in a directory i.e
remove( "dir\\myfile.pmx" );
It doesn't remove it. Any ideas??
thanks
|
|
|
|
|
Did you try with the complete file path?
|
|
|
|
|
Hi all,
how to use extended MAPI as redemption.dll is used..please check http://www.dimastr.com/redemption/security.htm for more details..I want to make something like that..so that when I access any object of outlook to post some data it doesnt show me any error..anyone has any clue about it..any ideas or tutorials or pointers are highly appreciated..
Thanks a lot in advance..
Himanshu
|
|
|
|
|
Hi all,
how to use extended MAPI as redemption.dll is used..please check http://www.dimastr.com/redemption/security.htm for more details..I want to make something like that..so that when I access any object of outlook to post some data it doesnt show me any error..anyone has any clue about it..any ideas or tutorials or pointers are highly appreciated..
Thanks a lot in advance..
Himanshu
|
|
|
|
|
Hi,
Is the following possible with Visual C++ .Net:
class.h:
template<class t="">
class A
{
public:
T* GetT();
private:
T* m_T;
}
class.cpp:
template<class t="">
T* A<t>::GetT()
{
return m_T;
}
If so, what is the correct syntax? The above gives me a linker error saying 'undefined reference to A<t>::GetT()', which basically means to me that class.cpp is not included in the compilation somehow, or at least that the contents of class.cpp are not associated with the declaration in class.h (correct me if I'm wrong on this).
I hope my question is clear enough, thanks for all insights!
cheers,
roel
|
|
|
|
|
You can't do this at the moment with Visual C++. The definition of the template must be available to the compiler at the point of instantation, including the definitions of all methods.
In practical terms, this means you must define the function in the class.h header file.
At a rough guess, it should look something like:
template <typename T>
class A
{
public:
T* GetT();
private:
T* m_T;
};
template <typename T>
T* A<T>::GetT()
{
return m_T;
} Hope this helps.
By the way, to format your code on CodeProject, for small snippets, use the <code> attribute; for larger ones, use <pre>. To get angle brackets to render, you must use the < and >, or use the 'no HTML' check-box.
|
|
|
|
|
You can't do this at the moment with Visual C++.
Bummer I hope they'll add support for that soon...
By the way, to format your code on CodeProject, for small snippets, use the attribute; for larger ones, use
.
Yeah I should have done that, I'll remember it next time, thanks.
|
|
|
|
|
Whoops I screwed up on that one Hehe.
|
|
|
|
|
It's the semi-infamous export keyword.
Exporting a template is supposed to mean that it only gets parsed and part-compiled once. However, C++'s template model means that you can only formulate the final code for an instantiation if you have access to a partly-chewed representation of the template. The current implementations that do export - IIRC, only Comeau C++[^] currently - do so by placing a dump of the syntax tree for the template in a separate file with a name it's guaranteed to find.
You'll never get a situation where you can just ship a template implementation as a binary.
|
|
|
|
|
You'll never get a situation where you can just ship a template implementation as a binary.
I know but that's not why I want it - it's just to make the interface cleaner (interface in .h file, implementation in .cpp file). But thanks for your explanation!
cheers,
roel
|
|
|
|
|
Gnarf wrote:
I hope they'll add support for that soon...
maybe not... some of the world's experts are talking about trying to get export removed from the standard. Even EDG, the world's leading compiler front end designers say that export makes little difference to build times, possibly even increasing them, whilst possibly changing the meaning of some C++ code.
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1426.pdf[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Very interesting, thanks!
|
|
|
|