|
mmmm... I wouldn`t like to log on on an application using my windows password... I never know what are you going to do with it.
I think you need to look for another approach.
If you need login in an application you will need an encripted passwords file.
|
|
|
|
|
Company IT policy doesn't allow me to keep
my own password file, even if it is encrypted.
We thought of using the Windows password because
it is an authenticaion system already available
in the company.
|
|
|
|
|
if the user is logged in and is using your program then they are already authenticated. If you are doing this over a network then you could use named pipes and check the user at the other end..
james
http://www.catch22.net
|
|
|
|
|
I also argued the position that logging into Windows should suffice.
After all, Office works this way. We use Outlook here, and you
need not provide a seperate password for that.
The local powers here were unconvinced, so I have been looking
for a way to do it.
Thanks.
|
|
|
|
|
|
Hi all,
How can i make my application to choose a printer other than the default printer programmatically?
thanks
kleser
|
|
|
|
|
Call:
OpenPrinter()
StartDoc()
StartPage()
EndPage()
EndDoc()
ClosePrinter()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
thanks for your reply, this works with MFC?
thanks
|
|
|
|
|
Kleser wrote:
thanks for your reply, this works with MFC?
Yes. You can try CPrintDialog.
Danny
|
|
|
|
|
Kleser wrote:
this works with MFC?
Yes. You'll also want to check out the CDC class as it has most of these as member functions.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Search MSDN for SetPrinterDevice - there is function you can write in CApp to change app current printer by name. Then default MFC printing routine will use it. Contact me in private, if you will not find it - I will send it to you.
Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was easier!
|
|
|
|
|
Message when clicking on a Edit Box with the mouse
--------------------------------------------------------------------------------
How can i get a message when i click on a Edit Box with the mouse? Many thanks in advance. Serj.
|
|
|
|
|
Create a handler for the WM_LBUTTONDOWN message and then call MessageBox() . Is that at all what you were looking for?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I've got problems to get the handler with the edit box. My code is:
void CSubtitlesDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
CEdit* pW = NULL;
pW= (CEdit*) GetDlgItem(IDC_EDIT_SUBTITLES_LIST);
GotoDlgCtrl(pW);
AfxMessageBox("Click sobre la lista de subtítulos");
SetFocus();
}
|
|
|
|
|
I would suggest getting out of the habit of using GetDlgItem() and use member variables instead. Create a CEdit member variable in your CSubtitlesDlg class and then do:
void CSubtitlesDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
GotoDlgCtrl(&m_editSubtitles);
AfxMessageBox("Click sobre la lista de subtítulos");
SetFocus();
}
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
see if the OnFocus() event handler don't work better...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
(using VS.net 2003 and boundschecker 7.2 )
I have a weird behaviour with bounschecker and my simple statically linked MFC application.
I created a basic MFC application from VS.net wizard; then, I selected in the project settings to "Use MFC in a Static Library".
when running the application I get "allocation conflicts" when closing a the document ( when closing the application ) telling me that in the method void CView::PostNcDestroy() the line that contains delete this; I have a conflict (for example ) :
"Allocation Conflict: Attempting to call CObject::operator delete on 0x027D7CA0; pointer was allocated by _malloc_dbg."
If I use the "Use MFC in a Shared DLL" I have no such allocation conflict.
Do I have to set another project setting somewhere ?
Anyone have an Idea before trying to contact compuware ?
thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
When I have a C++ class, let's call it CCLassX,
I construct one on the heap using
CClassX* pC = new CClassX();
versus
CClassX* pC = new CCLassX;
what is the difference?
|
|
|
|
|
I think this is a ClassX case of the same behaviour.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Blake Miller wrote:
what is the difference?
None. It's just syntactic sugar.
Good music: In my rosary[^]
|
|
|
|
|
I think, both are same only as both will allocate different memory.
|
|
|
|
|
No, they'll produce the exact same code and will behave exactly the same.
Good music: In my rosary[^]
|
|
|
|
|
Both expressions are equal. You can remove the brackets when the constructor of CClassX does not have any parameters.
Don't try it, just do it!
|
|
|
|
|
i think about one more think anybody evoked in the previous answers :
if the constructor is declared as explicit , the compiler may need you to call explicitely the constructor (for example with new class() )...
if some can confirm/infirm my assertion...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Explicit only says that stuff like this:
void function(const CString& str);
function(_T("A LPCTSTR which is an accepted constructor parameter for CString")); will fail, because you have to be explicit about constructing CString objects (assuming that CString(LPCTSTR) was indeed marked as explicit).
Good music: In my rosary[^]
|
|
|
|