|
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.
|
|
|
|
|
I want to get thread I have post.
-- modified at 22:44 Friday 21st April, 2006
|
|
|
|
|
go to following link
http://codeproject.com/script/profile/whos_who.asp[^]
type your name in filter by name and select order by "message count". and click Refresh
Now click on Messages posted
Click on your desired message.
Good luck.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
what characteristics do they have?
Thanks
XKF
|
|
|
|
|
Hey all
I was playing with the CreateWindowEx function, and for the life of me, I can't figure out how to create a completely nude window... meaning nothing is showing but the body of the window (no titlebar, no border, no nothing!)... I was wondering if anyone knew how to do this.
Secondly, I'd like to know how you can do this once you've already called CreateWindowEx, and then after the fact, you want to strip it nude .
|
|
|
|
|
A window without the WM_BORDER OR WM_CAPTION should be a nude window,I suppose
You can use SetWindowLong to modify the styles of a window anytime after you create the window
I am the first one to answer this question.In China,this is called sofa.What is it called in English?
XKF
|
|
|
|
|
I'm writing a small utility to set a few default power management values. Although I have most of it completed I am having some issues understanding and working with this particular function.
BOOLEAN EnumPwrSchemes(
PWRSCHEMESENUMPROC lpfnPwrSchemesEnumProc,
LPARAM lParam
);
I'm a newbie if you will when it comes to coding yet I do understand the basics. I'm having difficulty understanding how to handle this function since it uses a CALLBACK function.
typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(
UINT uiIndex, // power scheme index
DWORD dwName, // size of the sName string, in bytes
LPWSTR sName, // name of the power scheme
DWORD dwDesc, // size of the sDesc string, in bytes
LPWSTR sDesc, // description string
PPOWER_POLICY pp, // receives the power policy
LPARAM lParam // user-defined value
);
I'm not quite sure how to handle the callback function and what I need to pass to the EnumPwrSchemes function.
Any help would be greatly appreciated.
TIA.
|
|
|
|
|
Does this help?
BOOLEAN CALLBACK PwrSchemesEnumProc(
UINT uiIndex,
DWORD dwName,
LPWSTR sName,
DWORD dwDesc,
LPWSTR sDesc,
PPOWER_POLICY pp,
LPARAM lParam
{
}
...
EnumPwrSchemes(PwrSchemesEnumProc, 0);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi all,
when we allocate memory:
char *s;
s = new char[10];
and at last delete it:
delete s;
how system determines number of memory bytes allocated for s, to unallocate them?
|
|
|
|
|
You have to write this way:
delete [] s; So the Standard Library (of C++) knows how many to dellocate.
Maxwell Chen
|
|
|
|
|
Ali Tavakol wrote: how system determines number of memory bytes allocated for s, to unallocate them?
That information is written a few bytes in front of the address actually returned by the new operator.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I am calling the Listen function as follows:
Listen(1);
but I can still Accept more than one connections. I know for sure that the first connection is still alive when I accept the second one or any other ones after.
Without having to post all my code, do you have any idea of what I may be doing wrong?
Thanks!
jpyp
|
|
|
|
|
The 1 param is the number of un-accepted connections that can be queued. So, you may have many connections open, regardless of your listen queue size.
The listen queue stores the pending connections until you "accept" them. So, in a busy environment, you need to have a fair sized queue so that you do not refuse clients because you cannot accept connections fast enough.
onwards and upwards...
|
|
|
|
|
Thanks! That explains a lot!
Thanks!
jpyp
|
|
|
|