|
never mind
I got it working...
I had to change the LPTSTR to LPCTSTR
|
|
|
|
|
Hi everyone.
I'm writing a service that periodically launches a GUI program. I want to check to make sure someone is logged on to the computer before i launch the program so it can interact with the desktop. Is there any easy way to do this? Thank you very much.
Jay
|
|
|
|
|
How about NetWkstaUserGetInfo() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
if u use OpenInputDesktop() and it returns NULL then the interactive desktop is not available. ie: no-one is currently logged on or "using" the computer.
|
|
|
|
|
Hi,
I program with Visual C++ .NET 2003.
I have an application that I want to quit if a specific date is passed. (the user will not choose Quit in the menu)
I want to terminate the application in the OnClose member function of my CApplicationView class.
I have tried with various methods like PostMessage(WM_DESTROY, 0, 0) or PostQuitMessage(0) without success.
Does anybody have suggestions ?
Thanks,
Claude
|
|
|
|
|
|
|
The correct method is PostMessage(WM_CLOSE) .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
You can try PostMessage(WM_QUIT,0,0) too.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I am writing a real-time communication software whit VC++7 (App Type is Win32 Console)this is my first experince whit SQL in a heavy program.
I Open DataBase with CDataBase.OpenEX() in the beginning of program and Close it in the end.This program must run for several days or weeks each time and in each second i makeseveral transactions using CDataBase.ExecuteSql() and CRecordSet.GetFieldValue()
My Question Is, Can I Depend on Validity of Sql Connection for several days(I Guess not!),If not What Kind of Handling Required?
I can Not Open and Close DataBase each Time ineed it, Because of Real Time feature of
My Program.
Yours, Mehrdad
|
|
|
|
|
I don't think you can count on the connection remaining open for that long a period if the app is on a different machine than the database. what I did in one of my apps was to check for that specific error that indicates the connection is not open, then try to re-open the connection without sending the user any indication. if the re-open fails, then I let the error message continue as usual
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
how to typecast unsigned int(void *) to unsigned int64?
Please help me.
Heaven's on me
|
|
|
|
|
i'm not sure i understand you.
what does a void* make here ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi,
I have an ATL COM object with DECLARE_CLASSFACTORY_SINGLETON
is there a way to access the singleton instance inside the serverdirectly?
(currently I'm using CoCreateInstance, but the registry/DllGetClassObject round trip seems not necessary)
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
I created two static horizontal panes using CreateStatic() function of CSplitterWnd class. The view class of the top pane is derived from CView and the bottom pane from CScrollView. The message mapping of the menu items is performed in CMainFrame as it cannot be done directly from both the view classes(Atleast it seems like that). The problem is wheni call Invalidate(TRUE) in one of the functions of the View class it gives a runtime error.
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT ,<br />
CCreateContext* pContext)<br />
{ <br />
VERIFY(m_wndSplitter.CreateStatic(this, 2, 1));<br />
<br />
VERIFY(m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CTitleView),<br />
CSize(100, 100), pContext));<br />
VERIFY(m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CTrialView),<br />
CSize(100, 100), pContext));<br />
m_wndSplitter.SetRowInfo(0,50,50);<br />
return TRUE;<br />
}
As u can see from the above code i created a splitter window. CTitleView is derived from CView and CTrialView from CScrollView.
void CMainFrame::OnFileOpen() <br />
{<br />
m_pTrialView.OnFileOpen();<br />
}
m_pTrialView is an object of CTrialView. It is used to call the function FileOpen in CTrialView.
void CFaceRecognizerView::OnFileOpen()<br />
{<br />
Invalidate(TRUE);<br />
}
void CFaceRecognizerView::OnDraw(CDC* pDC)<br />
{<br />
CFaceRecognizerDoc* pDoc = GetDocument();<br />
ASSERT_VALID(pDoc);<br />
if(flag==1)<br />
AfxMessageBox("HI");<br />
}
This is where the error comes. My aim is to access the OnDraw() function. Hopw someone can help me out of this
|
|
|
|
|
When working with Doc/View framework, is it better to call UpdateAllViews from doc objects instead of trying to repaint views themselves.
Jaime
|
|
|
|
|
hello everyone
i wanted to know what exactly is the .hh file formats.are they the header file extensions.
one can see a lot of these files used like header files for the cpp files
this website has programs which use these file formats.
http://www.mip.informatik.uni-kiel.de/~wwwadmin/Software/Doc/BIAS/html/files.html
|
|
|
|
|
looking at their content, it seems that they are headers to...
moreover, you can find such code lines, that explicit what i thought :
#include <Base/Debug/Error.hh>
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
why would one use such an extension when we have a .h extension header ?
|
|
|
|
|
good question... but as we cannot ask to them directly...
we probably will never know
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
.hpp / .h++ / .hxx / .hh for C++ headers.
.h should be reserved for C headers
This is not respected though
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How does one convert from std::wstring to std::string?
I am the handsome one in the crowd.
|
|
|
|
|
does W2A() help? And yes, what about more generic W2T Macro.
I am not sure if it works for STL strings or not but worth a try.
Einstein: "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
My Articles
|
|
|
|
|
I have been using a rtf help generator called Cheetah and then by using Microsoft Help Workshop (taking the rtf created by Cheetah) to generate the Help file.
In my program I load this help file via
WinHelp(0, HELP_CONTENTS);
However the Help Window's Title is the name of this help file.
How can I change the Help Window title to something more meaningful.
Any suggests please.
|
|
|
|
|
Edit the .cnt file with the help of either microsoft help workshop or something similar, that would allow you to change the window title.
-*-*-
<bold>
- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|