|
Check this:
http://www.codeproject.com/dll/#Hooks
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
can u please tell how to get handle for all keyboard events (ie how to get message handler for keyboard events & mouse events)
|
|
|
|
|
SetWindowsHooEx Win32 API found in the Platform SDK, there are also examples of this API in use.
Normski. - Professional Windows Programmer
|
|
|
|
|
|
Why convert ? Use a dibsection in the first place.
Read the FAQ for tons of ways to save them.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I was written a DLL and used in an app in VS6 SP5. I just copied the .DLL and .LIB files to the app directory and in the app's sources, I included the header files of them. For debuging in the app, I can set breakpoint and go to the DLL source by pressing F11.
However, after upgrade to VS .NET, I couldn't debug from APP to go to the DLL's souce files. How can I solve it ? or any other means to debug the DLL ?
Thanks
|
|
|
|
|
Dear all,
In a dialog based application, i want to induce another dialog by
using menu command.
For example,
CMyDialog dlg;
dlg.DoModal();
But i found that the DoModal() cannot be accessed.
What is my missing for this problem?
Thanks in advance!
chen
|
|
|
|
|
what value is DoModal returning?
Bryce
|
|
|
|
|
Thanks Bryce!
The error info is
"Debug Assertion Failed"
File: Viewform.cpp
Line 69.
I want to know are there any other methods for accessing from
one dialog into another dialog.
Thanks in Advance!
chen
|
|
|
|
|
|
Just a guess but it can be a resource id clash. I would open the resource file (resource.h) and make sure all the resource id's are unique.
|
|
|
|
|
Thanks for replys.
I have checked the resource ID, there is no problem.
By step debug, I found that the problem is at the creation of the window.
In CMyDlg I have the following function
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
frame_window = new CFrameWnd();
CRect rect;
GetClientRect(&rect);
rect.bottom -= 10;
BOOL bCreate = frame_window->Create(NULL, "",
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, rect, this, 0);
CRuntimeClass* run_time_class =RUNTIME_CLASS(CGraphView);
if (run_time_class != NULL)
{
grview = reinterpret_cast<cgraphview*>(run_time_class->CreateObject());
};
frame_window->GetClientRect(&rect);
bCreate = grview->Create(NULL, "", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, rect,
frame_window, 1);
grview->SetAxisProps("X-Axis", "", 4, GRAPH_X_AXIS, TRUE);
grview->SetAxisProps("Y-Axis", "", 4, GRAPH_Y_AXIS, TRUE);
grview->SetGraphWorldCoords(0, POINTS_X_RANGE, -1, 1, TRUE);
return TRUE;
}
It will call the grview creat function.
It is:
BOOL CGraphView::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
BOOL b = CScrollView::Create( lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
m_splitter.CreateStatic(this, 1, 2, WS_CHILD | WS_VISIBLE);
m_splitter.SetRowInfo(0, 100, 0);
m_splitter.SetColumnInfo(0, 100, 0);
m_splitter.SetColumnInfo(1, 100, 0);
m_splitter.CreateView(0, 0, RUNTIME_CLASS(CGraphContainer), CSize(200, 200), pContext);
//This code cannot be implemented ! -----------
m_splitter.CreateView(0, 1, RUNTIME_CLASS(CPointsView), CSize(200, 200), pContext);
// ---------------------
pointsview = (CPointsView*)m_splitter.GetPane(0, 1);
grafix = (CGraphContainer*)m_splitter.GetPane(0, 0);
//set minimum size for CPointsView
m_splitter.SetScrollStyle(0);
m_splitter.RecalcLayout();
bSplitterCreated = TRUE;
RECT r;
GetClientRect(&r);
m_splitter.MoveWindow(0, 0, r.right - r.left, r.bottom - r.top);
//no scrolling at all - at least for now
CSize sizeTotal;
sizeTotal.cx = sizeTotal.cy = 0;
SetScrollSizes(MM_TEXT, sizeTotal);
return b;
}
Would you please this: in order to splite the window how to set
the correct size of the window?
Thanks in advance!
chen
|
|
|
|
|
I've read from MSDN that the M$ specific Winsock function AcceprEx when returns in overlapped fashion gives the accepted socket descriptor that is passed as one of its arguments.
But in MSDN doc it is written that this socket descriptor can be used with read(),write(),readfile(),writefile().
Can anyone tell me why this descriptor can't be used with WSARead() and WSAWrite or it can be.
|
|
|
|
|
I'm sure that AcceptEx can be used with WSARecv WSASend.
Normski. - Professional Windows Programmer
|
|
|
|
|
Hi...
msdn.microsoft.com
has the search box, double click on it and it drops down btu has a resize corner..which you can use...
does anyone know how to mimic this?
bryce
|
|
|
|
|
|
cool
now tell me its dead easy to implement like CEdit etc
bryce
|
|
|
|
|
http://codeproject.com/useritems/autocomp.asp
bryce
|
|
|
|
|
This probably is a stupid question... can you change your application's process name at runtime? That's what appears in Windows task monitor, I wanna change it, don't ask me why though, please.
|
|
|
|
|
Without going undocumented? No.
|
|
|
|
|
Mike Nordell wrote:
Without going undocumented? No.
Even with going to undocumented native API I doubt it. The process' name (on NT and above) is, like for any other kernel object, the name passed in the OBJECT_ATTRIBUTES to the NtCreateProcess()native call. Win32 CreateProcess() passes always the EXE name as name of the new process. However there is no way to change the name later on.
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
Or actually sorry I misspoke...whatever lol. Anyway, for example I have a program file named "abc.exe", I run it, open the windows task manager by hitting "alt-ctrl-del" and find "abc.exe" in the "processes" section(not "applications" section). Now I terminate the program, rename it to "def.exe" and run it, goto task manager processes section and check, its process name is still "abc.exe" even though the file had been renamed to "def.exe" before it was executed, how can I change it?
|
|
|
|
|
Aeh, what?
You rename the .exe, run it but it is shown under another name in task manager?
Strange. Very, very strange. Absolutely strange
Are you sure there isn't a second instance running or another program file of the old name still in the path?
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
There was not another instance running. Yeah that's very, very weird, that's why I'm confused and seeking help here...But now I kinda found out something out, the funny part is that, if I terminate "abc.exe", then rename it to "def.exe", then run it, task manager will still show "abc.exe", if, though, I wait for like a minute after I rename it, then run it, task manager will show "def.exe" properly.
Looks like task manager does not update process name immediately... Thanks anyway.
|
|
|
|
|
Only to make it clear (if there is anything that could be made clear is this weird thing ):
1) You kill it in taskmanager, it disappears from TMs process list, rename it and run def.exe. Result: TM shows a (new) abc.exe to be running. Right?
2) You do not close your instance of TM, don't you?
3) What operating system/SP are you using? (I tried it on my XP box, but it seems to work well there)
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|