|
I use installshield for microsoft vc++6.0 to make a install programe. No error during setup, but when run the application program,it appear the warning dialog "Failed to create the empty document" in chinese -- i have a chinese version windows 98 in my computer. But it can run correctly in a PC installed VC++6.0. Can you tell me why? How can i solve this mistake? if it's because some dll files failed to install in the system , how can i find which dll file should i install?
thanks
zhaohanqing
Zhao hanqing
|
|
|
|
|
Check the versions of MFC..dlls on the computer with no VS. This can cause a problem
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Does anyone know how to get a list of all the thread handles in a process on Windows NT4.0? On Windows 2000 and Windows XP the toolhelp32 api can be used, but this is not available on Windows NT 4.0.
Also the process status helper library (PSAPI) has a function to enumerate all processes, but not all threads.
Note, I am interested in the thread handles, not the thread ids as I don't know of a way to get a thread handle if you know a thread id (that works on Windows NT 4.0).
Cheers
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
Correct me if i'm wrong here i'm a beginner.
Doesn't VC++ 6 have some tools for looking at threads etc... I've been playing around with them myself, however u may be looking for something a bit more techy than them.
I hope this will either ring a few bells in your or other visitors heads as to the matter.
.NET or not .NET? MFC is the question......
|
|
|
|
|
Use the Spy....
But if you want it prgramatically, for each process, you need to open new enumprocess for each process. The process are a tree, and pspi show you every level, you need to open every process for see if you have more sub process...
Best Regards....
Today is Friday!!! and Party!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hello everyone,
I thought of posting this in the operating system forum, but it has so little traffic I thought the question would be overlooked.
On Windows XP and Windows 2000 you can use:
HANDLE hThread;
DWORD dwProcessId;
dwProcessId = GetCurrentProcessID();
hThread = OpenThread(..., dwProcessId);
to get a handle to a thread if you know its thread id.
How do I do this on Windows NT 4.0? The OpenThread() function
does not exist in kernel32.dll on Windows NT 4.0.
Hoping someone can help. Kernel mode device driver solutions
are valid, I'll consider any method to get this info.
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
MSDN says:
Windows NT 4.0 and earlier, Windows 95/98/Me: There is no way to get the thread handle from the thread identifier. If the handles were made available this way, the owning process could fail because another process unexpectedly performed an operation on one of its threads, such as suspending it, resuming it, adjusting its priority, or terminating it. Instead, you must request the handle from the thread creator or the thread itself.
A thread can use the GetCurrentThread function to retrieve a pseudo handle to its own thread object. This pseudo handle is valid only for the calling process; it cannot be inherited or duplicated for use by other processes. To get the real handle to the thread, given a pseudo handle, use the DuplicateHandle function.
|
|
|
|
|
I would like to implement a resizable dialog box with controls in the dialog box resizing along with the dialog borders. I tried adding guides and margins in the Microsoft Dialog Editor, but these margins do not seem to resize along with the dialog borders. Can anyone let me know how I can resize items along dialog borders?
Thanks in advance.
|
|
|
|
|
|
Hey,
First off if this is a really silly question then please excuse me but this is my first attempt at writing an application in c++.
I am trying to write a c++ program that can access a SQL Server database through ODBC/ADO(I don't care how just want it to work). I get c2059 error : 'constant'on the following line:
hr = m_pConnection->Open(_bstr_t(L"driver={sql server};SERVER=(local);Database=loggy;"),_bstr_t(L"sa"),_bstr_t(L"choices"),adModeUnknown);
Every command run after this complains about not being a member of _connection. I am using #import to import the msado15.dll whcih seems to be the best way(after many surfing hours). I would apreciate it if any one could help me. I think I have just put some code in the wrong place or something.
Thank you in advance
Regards
Adam
-------
Like you will ever visit my sites...
www.ufowatch.com - Seen a UFO then report it here or view over 500 different reports.
www.clubpages.co.uk - Taking the Bournemouth club scene through the millenium
|
|
|
|
|
I have lost the Admin password to a VSS database. Without this I can no longer run the SS Admin tool. Does anyone have an idea of how to recover for this situation?
Thanks.
Chris Meech
|
|
|
|
|
After a couple of hours searching through Google, I hit this great link.
http://groups.google.com/groups?q=VSS+ADMIN+PASSWORD&selm=93v9ll%24ldt%241%40nnrp1.deja.com&rnum=6
It gives a procedure for removing the password requirement for Admin. You use a hex editor to replace some values in the database's um.dat file and presto, you can now start the Admin utility without being prompted for a password.
Hope this helps out someone else.
Chris Meech
|
|
|
|
|
In a Document/View supported application,
Can i do this.........
CMyDoc::OnFileOpen()
{
...
...
..code
}
CMyView::OnFileOpen()
{
...
...
..another code
}
CMainFrame::OnFileOpen()
{
..
...
...
codes
}
will these code generate on error
|
|
|
|
|
Hi,
i think you will get an error something like function already exits....
regards ( new in vc++ )
Sonu
|
|
|
|
|
Maverick wrote:
will these code generate on error
No you will not get an error
But all three won't get called
Nish [anony posting from a net cafe]
|
|
|
|
|
Nish [I am not logged in] wrote:
No you will not get an error
Please Explain to me why you will not get an error.
Best regards
Sonu
|
|
|
|
|
This is simple. The function "OnFileOpen" is local to three different classes, namely CMyView, CMyFrame and CMyDoc. You would get an error if they were declared as global.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
ahh.....
Got it thanx for the information....
regards
Sonu
|
|
|
|
|
If you have command handlers in view, frame and documents, then the framework will call the one in view only. If there is no handler in your view class, then the framework will try to dispatch the command in your frame class.
This might be more clear if you look in the MFC source code (in "winfrm.h", MFC7), where the message is actually dispatched.
BOOL CFrameWnd::OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo)
{
CPushRoutingFrame push(this);
CView* pView = GetActiveView();
if (pView != NULL && pView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
if (CWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
CWinApp* pApp = AfxGetApp();
if (pApp != NULL && pApp->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
return FALSE;
}
Hope this helps.
Regards.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Hello again everyone, and Happy New Year.
I'm relatively new to VC++ so I'll try to explain this the best I can. Here's my situation... I have an SDI app where the MainFrm is CSplitterWnd'ed into several different views. I have one view that is a "keypad" (CView) with a bitmap that resembles a standard keyboard numpad. If the user presses any numpad buttons, I want that view to "see" and process those window messages. The following snippet is how I'm trying to do it, but it doesn't seem to receive any messages. What am I missing??
// ==================================================================
void CMainFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
ASSERT( GetActiveDocument() );
CClocksterDoc* pDoc = static_cast<cclocksterdoc*>(GetActiveDocument());
int iQty = 0;
switch(nChar)
{
case VK_NUMPAD1: iQty = OES_KEY_01; break;
case VK_NUMPAD2: iQty = OES_KEY_02; break;
case VK_NUMPAD3: iQty = OES_KEY_03; break;
......
}
if( iQty > 0 )
{
pDoc->DoPurchaseRequest( iQty );
}
CFrameWnd::OnKeyDown(nChar, nRepCnt, nFlags);
}
// ==================================================================
I hope explained this well enough.
Thanks...
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
It's the view that receives key-down messages and not your CFrameWnd derived window
Nish
p.s. from cafe. so anony post
|
|
|
|
|
Thanks Nish. That works, but only when it has the focus. Is there a way to force the view to always receive the key-down message??
Thanks.
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
You maybe interested in system wide event hooks.
Lookup SetWindowsHookEx
|
|
|
|
|
Just telling you that you have to do all hooks in a DLL if you want to catch when a key is pressed while your app is in no focus!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Richard Jacko & Rickard Andersson & All,
First, thanks for the reply. I think I'm headed in the right direction.
Secondly, I'm very new to Windows programming so I'd like to apologize for my "Windows ignorance" . Please bear with me...
From reading the docs on SetWindowsHookEx, I assume that I want to set the idHook = WH_KEYBOARD, right? Then, I have to write a DLL with a procedure that will handle the message (which I've never done).
Is this all correct? Thanks.
Marcus
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|