|
Thanks. But i know how to implement a ICopyHook. Butmy problem is how to make it effective from the point I perform the registration.
|
|
|
|
|
ragavan wrote: Butmy problem is how to make it effective from the point I perform the registration.
Have you modified the registry?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
|
I create a mfc regular dll and run the AfxBeginThread function in it.
As soon as I run this function ,there is a error .
Why?
|
|
|
|
|
Can you post your code ? It surely comes from how you are calling it.
~RaGE();
|
|
|
|
|
void CYiCltDllApp::Start()
{
m_proxyServer.bRun = TRUE;
m_proxyServer.m_Info.hWnd = m_hWnd;
m_proxyServer.m_Info.nPort = m_nPort; // local
m_proxyServer.m_sitebase =m_sitebase;
m_proxyServer.m_IpAddress =m_IpAddress;
m_proxyServer.m_BufferRoot =m_RecvBuffer;
if(m_hWnd!=NULL)
{
AfxBeginThread(StartThread, (LPVOID)&m_proxyServer, THREAD_PRIORITY_BELOW_NORMAL);
}
}
|
|
|
|
|
After debug in StartThread function by set break point, I found that the program do not step into the StartThread function.
|
|
|
|
|
Is StartThread declared as static ?
~RaGE();
|
|
|
|
|
not static.
At first,I set it as a member of CYiCltDllApp.
Then set it as a independent function.
|
|
|
|
|
Then try and define it static. You will have to pass the this pointer as a parameter to get hold on your data.
~RaGE();
|
|
|
|
|
What is returned by AfxBeginThread ?
Does it help to set the priority to THREAD_PRIORITY_NORMAL ?
~RaGE();
|
|
|
|
|
the return of AfxBeginThread is not null.
|
|
|
|
|
If it is not null, then the thread was created (AfxBeginThread returns a CWinThread object).
~RaGE();
|
|
|
|
|
Thank you very much!
Set static function is ok.
|
|
|
|
|
I have a window which contains a menu, two large edit boxes filling the whole space underneath, and nothing else. No caption / title bar.
To allow dragging the window, the area to the right of the menu can be used instead of the caption area. All works fine, but I would like to draw something on this area to indicate that it is an area on which the user can click to drag the window.
So my question is, how do I draw in the menu area? Not on an actual menu item, but in the empty space to the right?
I tried this in OnPaint and no luck, I tried OnNcPaint. I thought I could just detect some flicker from my drawing when I resized the window, and the window border at the far right did have something drawn on it, but too low down, below the menu.
Is what I am trying to do possible without creating my own menu and menu handler?
Shraddhan
|
|
|
|
|
Is this a Dialog or a SDI/MDI child window ?
Maybe try in OnEraseBackground .
As for "too low down", do not forget to convert screen coordinate in client coordinate and reverse. (see ScreenToClient and ClientToScreen functions).
~RaGE();
|
|
|
|
|
Rage wrote: Is this a Dialog or a SDI/MDI child window ?
Actually it is a CWnd which is behaving like a CDialog. (It used to be a CDialog, and for some unpsecified "good reasons" I noted in my comments long ago, it was converted to a CWnd.)
As for the actual drawing coordinates, I used the following code in OnNcPaint:
CPaintDC dc(this); // device context for painting
dc.Rectangle(100, 1, 700, 3);
dc.Rectangle(100, 5, 700, 7);
dc.Rectangle(100, 10, 700, 12);
dc.Rectangle(100, 15, 700, 17);
RECT rect = {50, 0, 700, 20};
dc.DrawText("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 45, &rect, 0);
CWnd::OnNcPaint();
Commenting out the final line gave me a transparent header, though the menus still showed. The window varies from about 300 to 550 pixels wide.
The string of XXXXXXXXXX seemed to be drawn and rapidly covered over.
I thought that OnEraseBackground only handled the client area? Anyway, I tried it out, still did not paint to the right of the menu area.
Shraddhan
|
|
|
|
|
|
It's not a matter of adding another menu item.
What I want to be able to do is to draw some hatch bars like you see in the bottom right of some windows. The whole or the area to the right of the last menu item is used for dragging the window, and I just want to identify this area in some way. Adding a menu item prevents the window being dragged with a click in this area.
Besides, my drawing code does not draw on top of the menus I've got. Plus, remember that the window's width can be changed by dragging its edges.
Shraddhan
|
|
|
|
|
Shraddhan wrote: It's not a matter of adding another menu item.
I am not asking you to add another menu item.
File ->>>(Add your text here in the menu bar)Click here to drag the window.
New
Open
Etc...
This is just a workaround.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: File ->>>(Add your text here in the menu bar)Click here to drag the window.
New
Open
Etc...
This is just a workaround.
Err, no...
If I understand you correctly, what I now end up with is my original window with an extra menu item on the right. When I click on it, I can certainly drag the window, except that if I make the window narrow enough, the new item drops down to a line below, and the dragging on the new menu item no longer works because it is in a different place (previously occupied by an edit control, and much further left than it used to be). I can still drag the window by clicking to the right of the menu.
What I want to do is to somehow mark the whole of the window area to the right of the menu. When I increase the window to the full width, the menu that says "Click here to drag the window" is now almost centered in the window horizontally, and the issue remains, that nothing marks the drag area on the right.
|
|
|
|
|
|
Owner drawn wrote: Which version of Visual studio are you using.
Visual Studio C++.NET 2001
|
|
|
|
|
How do you get share level permissions. Not ntfs level permissions.
I tried NetShareEnum but it returns ACCESS_NONE for all shares may be because i am running the program on an NT level machine
Kelvin Chikomo
|
|
|
|
|
I've tried to search in the forum, but can not find the answer I want. So, here is my question.
1. I create setup and deployment project by Visual Studio 2005. In default settings, there is no shortcuts created in the "User's Programs Menu", so, I added the shortcut from [Application Folder]. I build the project and got 1 setup.exe and 1 MSI file then. After using setup file to install this program, I deleted the setup file and MSI file. And error occurred at 2nd time I launch this application from "Start" menu. Error message is:
An installation package for the product xxxxx can not be found. Try the installation again using a valid copy of the installation package.
I found the problem is, the installation MSI file should not be removed after installation. Why?? That's not reasonable.
2. I can not find a way to build out only one setup.exe file which is a combinition of original setup.exe file and my MSI file. Is it possible to achieve this by Visual Studio 2005?
eric_liu@phonol.com
|
|
|
|