|
thats is what i am doing but still i am able to work on the bottom dialog box.
|
|
|
|
|
this is what i am doing
CPopUpDlg* ptrPopDlg = new CPopUpDlg(k,stOperatorDetails.strOpName,stVisitorPrDetails.strSessionID,this);
ptrPopDlg->DoModal();
ptrPopDlg->Create(IDD_POPUPDLG,NULL);
ptrPopDlg->DoModal();
ptrPopDlg->ShowWindow(SW_SHOW);
Tell mw whats wrong in it
|
|
|
|
|
Why are you calling DoModal() twice? Does ptrPopDlg need to be a pointer? Since it probably does not, the call to Create() and ShowWindow() can also be removed.
In your first dialog, just do:
CPopUpDlg PopDlg = CPopUpDlg(k, stOperatorDetails.strOpName, stVisitorPrDetails.strSessionID, this);
PopDlg.DoModal();
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
please read this[^] article, and inspirate from it
|
|
|
|
|
Hello everyone,
I am using VSTS 2008, there are 4 different command windows under "Visual Studio Tools" from Programs of Start Menu.
They are,
Visual Studio 2008 Command Prompt
Visual Studio 2008 x64 Cross Tools Command Prompt
Visual Studio 2008 x64 Win64 Command Prompt
Visual Studio 2008 Itanium Cross Tools Command Prompt
I am using x64 machine and always use x64 binary, sometimes I will use x86 binary. What are the differences between the 4 command window and for my requirement which one(s) should I use?
thanks in advance,
George
|
|
|
|
|
i'd be glad to help if I knew the answer, but I don't, and frankly, i'm not sure codeproject is the best place for such a question. i'm pretty sure you can find this documented on MSDN
|
|
|
|
|
|
What does this have to do with VC++? Ask here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks DavidCrow,
I think the sub-forum you recommended is more suitable. I even not know there is a sub-forum named Visual Studio before!
regards,
George
|
|
|
|
|
Hello,
I want to put an image,like a logo, to the right of the main window of my application, just like Internet Explorer.
What is the best way to implement? (Using MFC)
Thanks in advance.
Bekir
|
|
|
|
|
|
Hi,
I want to prevent the computer from sleeping while my program is working intensively. I found SetThreadExecutionState on MSDN[^]. But I'm confused what are the proper parameters.
Also, what parameters do I pass to the function when I don't need to prevent sleep anymore?
Here's the example from MSDN:
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED);
SetThreadExecutionState(ES_CONTINUOUS);
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
The system prevents sleep mode by detecting user input.
It doesn't automatically detect processes using the CPU or the
display.
To tell the system you're using the CPU, use
ES_SYSTEM_REQUIRED
To tell the system you're using the display, use
ES_DISPLAY_REQUIRED
Of course, you can use combinations.
Use ES_CONTINUOUS to have your settings remain in effect until the next
call.
To clear your continuous settings, use
SetThreadExecutionState(ES_CONTINUOUS);
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What about ES_AWAYMODE_REQUIRED ?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Read carefully[^]
It also looks like it's Vista+ only.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for pointing that out. The example at MSDN had me confused with its using all the 3 params, but now I see it was about 'Television recording'
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
I am having two values one is of int type and another is of CString type.
Now I am calling SendMessage function as below:
m_ptrMainDlg->SendMessage(WM_CHAT_PICKED,m_nIndex,m_strSessionID);
but the above code is giving the following error:
Error 41 error C2664: 'CWnd::SendMessageW' : cannot convert parameter 3 from 'CString' to 'LPARAM' c:\documents and settings\shy\desktop\dheeraj latest working copy\sourcecodes 8-10-08(morning)\source code 06dec2007\popupdlg.cpp 148
Please tell me whats the problem
Thanks In Advance
Dhiraj
|
|
|
|
|
Use this:
m_ptrMainDlg->SendMessage(WM_CHAT_PICKED,m_nIndex, (LPARAM) (LPCTSTR) m_strSessionID);
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
it is not advisable sending CString as sendmessage parameter, it always advisable to send Dyanmic allocated character pointer string!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Hi @ all,
is it possible with direct x to list all attatched microphones and
choose one of them to work with? The same question are for speakers.
Greetings
Karsten
|
|
|
|
|
Hi all,
In a FormView Derived class on OnInitialUpdate() function i m using a code that is use many function of my class when i vew this form than before opening the Mouse cursor takes much time and application looks like it hangs.
Can i use thread to reduce the time for open form view.(If yes Please tell me how can i use thread i have no idea about thread.)
or any other method.
please tell me.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Yes, you can use a thread for that purpose. It won't speed up the time needed for the computation but at least your UI won't be frozen. Here's a link to a great article[^] about thread.
|
|
|
|
|
Thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi everyone,
I want an application which detects mouse clicks on desktop (at a particular pixel on the desktop).
For this I have created a global mouse hook to detect mouse events but it detects mouse click on every window, how do i detect that the mouse has clicked on desktop.
thanx in advance
|
|
|
|
|
May be you can get the desktop window handle using
HWND hWndDesktop = GetDesktopWindow();
And compare it with the handle received in the HOOK procedure.
I hope it helps..
Regards,
Sandip.
|
|
|
|