|
|
I am programming item with windows authentication . Our client may be working in winxp or win2000. Client must input username and password .So I use CredUIPromptForCredentials() in winxp. But this function is not supported in win2000. I have not found replaced function. I find that "Enter Network Password" dialogbox in win2000 is fit to me .But I don't know how to call this dialogbox and how to get user name,password?
Could you give me some advice?
Thanks
|
|
|
|
|
The WNetConnectionDialog function starts a general browsing dialog box for connecting to network resources. The function requires a handle to the owner window for the dialog box.
|
|
|
|
|
I am programming item with windows authentication . Our client may be working in winxp or win2000. Client must input username and password .So I use CredUIPromptForCredentials() in winxp. But this function is not supported in win2000. I have not found replaced function. I find that "Enter Network Password" dialogbox in win2000 is fit to me .But I don't know how to call this dialogbox and how to get user name,password?
Could you give me some advice?
Thanks
|
|
|
|
|
i am starting a thread and in which setting timer like this
CWinThread *startThread;
UINT threadproc(LPVOID param)
{
CShow_ImageDlg *cmdlg= (CShow_ImageDlg *)param;
cmdlg->SetTimer(1, 100, 0);
return 0;
}
but i want to stop timer at the time of mouse move on my dialog but i am trying like
startThread->SuspendThread();
but it doesn't stop timer, anyone have idea to stop timer and restart the timer please share with me.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Handle WM_MOUSEMOVE inside CShow_ImageDlg and kill the timer there.
Nibu thomas
Software Developer
|
|
|
|
|
Why do you want to put the timer inside a thread? it can very run the same way outside the thread. Stoping the thread is not going to stop the timer. to stop it use KillTimer.
VuNic
|
|
|
|
|
How to get the WM_TIMER event in win32 console app, where the main() is the entry point.
Any ideas?
Best regards,
JT!
|
|
|
|
|
|
Nice link!
<code>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <conio.h>
VOID CALLBACK MyTimerProc( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime );
int main()
{
SetTimer( 0, 0, 0x50, (TIMERPROC)MyTimerProc );
printf( "A timer proc has been set up. Press any key to exit.\n");
getch();
return 0;
}
VOID CALLBACK MyTimerProc( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
{
printf( "In MyTimerProc: hwnd:%X uMsg:%X idEvent:%X dwTime:%X\n",
hwnd, uMsg, idEvent, dwTime );
}
</code>
VuNic
|
|
|
|
|
This code will not work for the reason described in the article - There is no message pump running.
Steve
|
|
|
|
|
!!! , i still have the bad habit of not reading an article top to bottom. i was impressed by the simplicity of the code but i should have ed it a litte more.
VuNic
|
|
|
|
|
I am working on window application in which I am hosting a word doc on window form.
Now I want that when ever user insert a new table through the button which I am using to insert a table .a aero should be shown between the last table and the new inserted table..
I don’t know how to use the show the aero..
|
|
|
|
|
lint seem to be complex. it is commerical software.
|
|
|
|
|
depending on your compiler, you can just adjust the warning level up a notch, this gives "valid but potentially unsafe" operations a warning number to let you try to fix them. These are not all errors, though some may be. But this is a good place to start.
After that you might want to peek here [^] and see if anything is what you are looking for. I personally like lint, I have used splint, GNU lint, and PC-Lint in times past with good luck.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
good , do you have msn messenger? I wanna talk to you
|
|
|
|
|
I've used Splint a bit and it had a number of vagaries. PC-Lint seems to be much better maintained and the price isn't bad.
The tigress is here
|
|
|
|
|
Trollslayer wrote: I've used Splint a bit and it had a number of vagaries. PC-Lint seems to be much better maintained and the price isn't bad.
This was basically why we moved to PC-Lint. Although I have used various others, small to large and did the work (some more than others) to learn to work, eventually I just decided it was too much work to good success and switched to PC-Lint.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
derek7 wrote: lint seem to be complex
This might make PC-Lint easier to use: http://www.riverblade.co.uk/products/visual_lint/index.html[^]
I have not used it yet, though considered it several times since I learned of it. Of course it too is commercial.
Basically if you want to use the free lints, it will take some work.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I read link document, dive into many options and disapear.
could you give me some frequently used option?
for example : detect all un-initialized variable or something good.
|
|
|
|
|
if I am not indicate a head file is a library header file, what wrong will arise?
|
|
|
|
|
This is a continuation from my earlier thread so all could respond. When I try to open an executable from my program using the following line it opens the executable then immdiatley closes it.:
ShellExecute(NULL,_T("open"),_T("cd1\\CBTNuggetPlayer.exe"),NULL,NULL,SW_SHOW);
The executable is a GUI and it opens fine if I go to the directory and double click on it, but it wont open the window when I try to open it from my program. As I said earlier, I am using a relative path since my program will be at the root of a CD and the executable will be 1 to 2 layers down as it is here.
Anyone know why?
thanks
|
|
|
|
|
Using relative paths is *always* asking for trouble. The fact that ShellExecute() doesn't appear to be working indicates that it's not finding the EXE
How do you know somebody won't copy your CD to a hard disk and run it from there? How do you know what the *current directory* will be when your main program is run. ShellExecute() starts from the current directory, not where the main program lives.
I always figure out where my main program is using GetModuleFileName() and generate absolute paths relative to that.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
Yes, I do understand that it starts from the current directory, that is why I start the relative path from the my program will be which is one directory up the tree which would be cd1/CBTNuggetsPlayer.exething I needed to know is the proper format for a relative path so i know I am doing it right.
|
|
|
|
|
CNewbie wrote: ShellExecute(NULL,_T("open"),_T("cd1\\CBTNuggetPlayer.exe"),NULL,NULL,SW_SHOW);
ShellExecute(NULL,_T("open"),_T(".\\cd1\\CBTNuggetPlayer.exe"),NULL,NULL,SW_SHOW);
Nibu thomas
Software Developer
|
|
|
|