|
Why do you want to do it in secret, are you writing spyware ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
i wanna know how can i use messenger or mail services in my code to send infromation to an id in background or in secret way.
|
|
|
|
|
hi
i'm working on a remote admin project but.and it is a big but, i have a problem with controlling file in remote pc.
i wanna see the whole file && dir as i am see in my pc.i mean visual control!i wanna a code more power than ftp trasnfer.
thanks for ur reply
|
|
|
|
|
I want to get index of the image loaded in a listctrl(Report view). The image is loading dynamically. eg:- On clicking the row 2, I just want to know which image (Image index) is displayed in the 2nd column of that listctrl(ie, In the cell (2,2)).(The purpose is if the image loaded is image1 then on Selection i want to change it to image2, otherwise I want to load image 1)
At least I want to know if there is an image in That particular cell of the list report
GetItem is not working properly.
Sandeep
Sanc
-- modified at 2:01 Saturday 22nd April, 2006
|
|
|
|
|
To get an image associated with the cell use
LVITEM litem;
litem.mask = LVIF_IMAGE;
litem.iSubItem = 2;// the subitem number
litem.iItem = 2;// the item number
litem.iImage = -1;
GetItem( &litem );
after u have called the GetItem function, the litem.iImage member of the LVITEM will contain the image index.
This function will return the image number only if u have set the LVS_EX_SUBITEMIMAGES extended style....
nave
|
|
|
|
|
You have no leave today...!
- NS -
|
|
|
|
|
|
near home
- NS -
|
|
|
|
|
Hello,
I have this variable in the Doc class.
CTypedPtrList<coblist, cobjdata*=""> m_objectsList;
Suppose at present it has 5 entries.
I want to delete 3rd record. then how to achieve it?
I tried.
POSITION pos = m_objectsList.GetHeadPosition();
UINT cnt=0;
while(pos!=NULL)
{
CObjData *objFmList = m_objectsList.GetNext(pos);
cnt++;
if(cnt==3)
delete objFmList;
}
but then if next time I go to read this m_objectsList, program gives memory related error. How to do it safe way?
thanks
Leya
|
|
|
|
|
You forgot to remove the item from the list. So at the next time you are deleting the object, which is previously deleted.
- NS -
|
|
|
|
|
|
I have a C++ agent that accesses an HTTP proxy that requires NTLM authentication.
Is there a way I can format the NTLM Type 3 message NTLM/NTLMv2 response using the password the user entered to logon without asking the user to re-enter the password?
I do not want to know the actual password for security reasons and possible liability if the password gets compromised.
Is there such an API that I can use to format these fields by supplying the user and domain names?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
wrote: Is there such an API that I can use to format these fields by supplying the user and domain names?
Are you using AcquireCredentialsHandle() ? If so, you can set pvAuth to be NULL to specify default credentials.
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"
|
|
|
|
|
Thank you Ryan.
AcquireCredentialsHandle looks like exactly what I need.
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
|
Thank you for the link
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Hello Ryan,
I have just gotten around to implementing the AcquireCredentialsHandle code and am running into something strange.
In the code I have
if(SEC_E_OK == EnumerateSecurityPackages(&nPackages,&pPackages)){
to see if the security package is installed on the system because this will be distributed to clients where I do not have control over the system configuration
and then to get the cerdentials
if(SEC_E_OK == AcquireCredentialsHandle(<br />
_T('\0'),
szPackageName,
SECPKG_CRED_OUTBOUND,
NULL,
NULL,
NULL,
NULL,
&shCredential,
&ts)){
I get a link errors
NTLMDlg.obj : error LNK2019: unresolved external symbol _AcquireCredentialsHandleW@36
NTLMDlg.obj : error LNK2019: unresolved external symbol _EnumerateSecurityPackagesW@8
When I hover the cursor over the function name I see a #define without the leading underscore.
Do you have any idea what is going on?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Are you linking against secur32.lib ?
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"
|
|
|
|
|
Thank you Ryan.
My problem was caused because I did not specify secur32.lib as an additional dependency for the linker.
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
I draw white border when mouse on button,i want to erase it when mouse leave
|
|
|
|
|
All painting should happen in a WM_PAINT handler. Call Invalidate() to force a paint message, and just capture the mouse and track it's movement to know when it leaves your control.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
It is better you go for ownerdrawn button...
You can track mouse enter like this...
bool m_bMouseInside = false;
void MyButton::OnMouseMove( UINT nFlags, CPoint point )
{
if( !m_bMouseInside )
{
m_bMouseInside = true;
TRACKMOUSEEVENT stTME = { 0 };
stTME.cbSize = sizeof( stTME );
stTME.dwFlags = TME_LEAVE;
stTME.hwndTrack = m_hWnd;
_TrackMouseEvent( &stTME );
Invalidate( FALSE );
}
CButton::OnMouseMove( nFlags, point );
}
<pre>
Then you will get a mouse leave message. You have to map it like...
<pre>
BEGIN_MESSAGE_MAP(LinkButton, CButton)
ON_MESSAGE( WM_MOUSELEAVE, OnMouseLeave )
END_MESSAGE_MAP()
LRESULT LinkButton::OnMouseLeave( WPARAM, LPARAM )
{
m_bMouseInside = false;
Invalidate( FALSE );
return 0;
}
So your DrawItem will be called when the mouse enters and leaves the button. You should check the m_bMouseInside flag to draw the border.
Good Luck!
- NS -
|
|
|
|
|
Obviously you know when the mouse cursor is within your buttons boundaries. In that function use can capture the mouse, which will send you a message telling you when it has left the button window (a button is just another window). At which point you can reset things to normal and release the mouse cursor.
INTP
“Testing can show the presence of errors, but not their absence.”
Edsger Dijkstra
|
|
|
|
|
if you derived CButton and use WM_DRAWITEM you can declare this case
for constant focus or select and else focus for buttons.
|
|
|
|