|
What are you asking ? You want to put in a new location ? I don't think that will set your mouse position for you, in fact I'm sure of it. But you can use MAKELPARAM to join two values into a suitable LPARAM value.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Hi.
Does 32-bit Windows console support multithread programming? For example, is is possible to use _beginthreadex(), WaitForSingleObject(), and CloseHandle() in a 32-bit Windows console program?
Thanks,
Kuphryn
|
|
|
|
|
Yes. #include <windows.h> and you're away.
Dave
|
|
|
|
|
|
Yes, and the best part is that normally you won't need the MsgWait* functions, only the normal Wait* functions
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
Hi I want to drag some images from a listbox to Oulook2000. How should I do it? HOw can I set Allowdrag property of Outlook to true. I want to do it using VC++.
Please help me.
Thanks
|
|
|
|
|
any body tell how to use that function OutputDebugString because i have try but it does not show any meassage.plz help?
OutputDebugString
r00d0034@yahoo.com
|
|
|
|
|
OputputDebugString outputs its message in the Visual Studio debug window: Press F5 to launch your program, click on Visual Studio and look for it --usually a lot of "foo.dll loaded" messages appear right at the beginning of execution.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
but i want to display my message like Trace does
but i am having problem with trace because i am using managed code ?
how to solve this problem?
r00d0034@yahoo.com
|
|
|
|
|
Try using Microsoft's DBMON or DebugView[^]
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
hello @all,
i have a vc++ MDI programm. in this i need a dialog box. the dialog box is not the problem. my problem is the placing of it. is there a way, how i can place the dialog box in a corner (at the bottom left hand corner).
thanks
lucky
|
|
|
|
|
In OnInitDialog() your Dialog, uses MoveWindow or SetWindowPos functions for move your dialog
Best regards,
Eugene Pustovoyt
|
|
|
|
|
can you give me a example how i can use the function "SetWindowPos" ?
I must place the dialog box in a corner (at the bottom left hand corner)forever and ever.
thanks
lucky
|
|
|
|
|
You're must get the coordinates of a corner and then ...
SetWindowPos(HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
Best regards,
Eugene Pustovoyt
|
|
|
|
|
i want to show a string in vs.net debug output window.
i think i can use Trace or Debug class. but i dont now how to use them to display a string in managed code ?
if there exist some other way plz tell?
i want to see the execution and flow of my program
can any bode tell?
plz write the complete syntex.i will be very thank full to u.
r00d0034@yahoo.com
|
|
|
|
|
I'm trying to get data from the controls on a seperate application. I can get the HWnd and can do some things to the controls (DeleteAll from a ListBox for example) but other things cause the other application to crash. In particular I have had no luck at all trying to access the TreeCtrl from the handle to a TreeView. I'm trying to do this using MFC, if possible. But attach() and subclasswindow() don't seem to be designed to do what I want. Anyone have more of a clue than I do? Thanks in advance.
This works for a ListCtrl as long as I have a valid m_hWnd:
CListCtrl test;
test.SubclassWindow(theWin->m_hWnd);
test.DeleteAllItems();
test.UnsubclassWindow();
This does not work for a TreeView:
CTreeView test;
CTreeCtrl test2;
test.SubclassWindow(theWin->m_hWnd);
test2.SubclassWindow(test.GetTreeCtrl());
test2.DeleteAllItems();
test2.UnsubclassWindow();
test.UnsubclassWindow();
|
|
|
|
|
I'd say you're lucky your subclassing scheme hasn't crashed yet --basically you're instructing the external process to divert code execution to your own window proc, which is a guarantee to failure.
You can look at the source code for the methods you're interested in: they reduce mostly to various SendMessage s which you can easily replicate in your code without subclassing.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks,
What would I do for a TreeView. I need the handle to the TreeCtrl to do anything but I can't use SendMessage (as far as I can tell) to get it.
|
|
|
|
|
You could use macros like TreeView_DeleteAllItems(hWnd) to manipulate the TreeView.
The macros for the TreeView are here[^].
_____________________
"So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too."
Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
They are the same window. MFC keeps them logically separate so they can be delt with in different ways by other objects, but as far as Windows is concerned there is just the TreeCtrl.
Shog9
------
If you really what to get shitfacde tell a crowded bar that is is yourt borthday and hife your wallet. you ka will many more friends.
- David Wulff, Brithday selebrations, 9/19/02
|
|
|
|
|
Thanks guys, seems to do what I need!
|
|
|
|
|
Each program runs in its own protected memory space. You cannot just pass in pointers because memory in your app's space cannot be accessed by another app (not without doing shared memory).
The subclass window calls effectively redirect the control's window proc to your own, which is not in the same process, so it will crash immediately.
Some messages can be passed, as long as they don't involve pointers. That's why LVM_DELETEALLITEMS works, it has no parameters.
Now, the exception is the USER controls (the ones from Win 3.1, list box being one of them). The OS is designed to handle messages sent between processes for Win 3.1 compatibility (where this was possible because all apps shared the same memory). However this is a special case, no controls introduced with Win 95 or later work this way.
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have an app created with the CreateDialog function. When i want to show a popup dialog in my app i use the CreateDialog function again. But when the user closes the popupwindow both windows get closed, why?
|
|
|
|
|
It's hard to say without further info, but it could be that your popup is calling PostQuitMessage on exit time.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How could I modify the following code so that the if, else if, and else conditions are counted and printed at the bottom?
{
int a, b, c, d, e, f; /* For key cuts 1, 2, 3 ... */
int pins, cuts;
cuts = 6;
pins = 5;
for (a=1; a <= cuts; ++a)
for (b=1; b <= cuts; ++b)
for (c=1; c <= cuts; ++c)
for (d=1; d <= cuts; ++d)
for (e=1; e <= cuts; ++e)
for (f=1; f <= cuts; ++f)
if( a == b && b == c && c ==d && d == e && e == f)
printf("%3d %3d %3d %3d %3d %3d Unacceptable per Rule #2\n", a, b, c, d, e, f);
else if(( (b > (a+4) | b < (a-4)))
| ((c > (b+4) | c < (b-4)))
| ((d > (c+4) | d < (c-4)))
| ((e > (d+4) | e < (d-4)))
| ((f > (e+4) | f < (e-4))))
printf("%3d %3d %3d %3d %3d %3d Unacceptable per Rule #1\n", a, b, c, d, e, f);
else
printf("%3d %3d %3d %3d %3d %3d\n", a, b, c, d, e, f);
}
|
|
|
|