|
|
Ok this is killing me
i dont know much about Msg in the MFC
how to do a hitTest Msg and while the mouse down
mouseX = WindowX && mouseY = WindowY
|
|
|
|
|
What do you want to do ???
MS
|
|
|
|
|
Are you talking about the GetMessagePos() function?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i want to send MSG in the MFC
like the hit test MSG
blah::OnBlah()
like OnPaint()
|
|
|
|
|
ANDYFA wrote:
i want to send MSG in the MFC
Do you mean SendMessage() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Ok, what exactly did you want to know about message maps in MFC, aside from the framework using them to connect messages and commands to their handler functions.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i made a window(dia) with no title bar so i want to move it around when i click on it
|
|
|
|
|
It helps to be specific the first time around.
See here for an example.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
By entering characters in the edit box should be sent to the port.Now from the port i need to read the data character by character and display it in another edit box for each click of the ctrl buttton.
how am i to do it?
Pls help.
Mithuna
|
|
|
|
|
I want to create a new Excel file and create all the tables in it using the ODBC.
e.g. Creating the file Student.xls, then creating tables ID and Name.
I am using MFC with Visual Studio 6.
modified 9-Mar-17 17:25pm.
|
|
|
|
|
Congratulations on your desire to learn about manipulating Excel files via C++. What exactly are you having trouble with? What code have you put together thus far?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dear Friends,
I would like to restart a PC whenever any error occurs in my application.
How can I do so. Please help me as soon as possible.
Thanking You in advance.......
Billar
|
|
|
|
|
ExitWindowsEx()
There is no spoon.
mail
|
|
|
|
|
If you are using NT/2000/XP, you will need to set privileges.
DWORD dwVersion = GetVersion();
if ( dwVersion < 0x80000000)
{
HANDLE hToken;
LUID tmpLuid;
HANDLE handleProcess=GetCurrentProcess();
if (!OpenProcessToken(handleProcess,TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
return;
if (!LookupPrivilegeValue(0,"SeShutdownPrivilege", &tmpLuid))
return;
TOKEN_PRIVILEGES NewState;
LUID_AND_ATTRIBUTES luidattr;
NewState.PrivilegeCount = 1;
luidattr.Luid=tmpLuid;
luidattr.Attributes=SE_PRIVILEGE_ENABLED;
NewState.Privileges[0]=luidattr;
if (!AdjustTokenPrivileges(hToken, false, &NewState, sizeof(TOKEN_PRIVILEGES), 0, 0))
return;
}
ExitWindowsEx(...);
|
|
|
|
|
Thanks u very much for your important advice.....
Billar
|
|
|
|
|
Billar wrote:
I would like to restart a PC whenever any error occurs in my application.
This is a very bad design in my opinion. Since there is no way you are going to develop an error-free application, I certainly would not want my PC restarting while I am in the middle of something important (e.g., typing research paper, presentation to the board). Do you concur?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dear David,
You r absolutely right. There will never be a solution by restarting the system instead of solving the particular error, when have errors.
Actually my requirement was to restart the system on a certain condition.
Billar
|
|
|
|
|
I have 2 MS paintbrush applications side by side. I want to duplicate the brush strokes of one paintbrush on the other. I do this by installing a dll WH_GETMESSAGE hook on the 1st paintbrush and detect WM_MOUSEMOVE and LBUTTONUP/DOWN events.
But how to duplicate it on the 2nd paint app? If i do setCursorPos the mouse moves away from the control of the artist. And sending a PostMessage(WM_MOUSEMOVE,x,y) to the 2nd paint doesn't seem to work.
Is there any way to simulate a mouse move without taking the mouse away from the user?
Need Help.
thanks.
Regards,
Zee man
|
|
|
|
|
I have never done this but here's a thought... Use
CWnd* myWnd = CWnd::FindWindow(NULL, _T("Paint2"));
myWnd->PostMessage(..) and send all the mouse movement messages that you receive to the other window. It may work, it may not.
|
|
|
|
|
Thats what I said I did and but it doesn't work.
If I just filter out mousemove, lbuttonup and lbuttondown and postmessage those, VC spy says the destination paint is getting them but nothing draws on the paint area. If I send all mouse events then the detination paint just hangs up.
I'm stuck.
Regards,
Zee Man
|
|
|
|
|
Hi all
I have the follow problem.
In a mixed program i am using manage code to access webservices i cannot load an HIMAGELIST.
The program is written with no MFC or ATL/WTL. It is just plain win32.
When i call the ImageList_LoadImage(..) i got the follow error
"
An unhandled exception of type 'System.TypeLoadException' occurred in Emporio.exe
Additional information: Could not load type _IMAGELIST from assembly Emporio, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
"
If i compile the program with out CLR it works fine.
Thanks in advance for any help.
George
|
|
|
|
|
I managed to eliminate the problem compiling the specific cpp file without "Assembly Support /clr". Of course this is not a solution.
I have another file with a database grid which must be combiled with /clr support.
George
|
|
|
|
|
Supposed a usb disk has 3 partitions. Then how to get the volumes letters after my application run?
Sample code or article is preferred. Thanks.
|
|
|
|