|
hi!
there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
i just need to move my app so that those two windows are always side by side. i've done this with the wm_move event on my side.
thanks!
|
|
|
|
|
You can get the handle of window by FindWindow .
then create the User messages and post it to the specific window by PostMessage
Cheers
"Peace of mind through Technology"
|
|
|
|
|
i don't want to Post messages to that window, I need to be notified what that window moves.
in short i need that window (which i only have a dll) to post messages to me.
|
|
|
|
|
ilidan wrote: there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
Look up WH_CALLWNDPROC and WH_CALLWNDPROCRET .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Thanks. This is exactly what I'm looking for!
|
|
|
|
|
ilidan wrote: there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
i just need to move my app so that those two windows are always side by side. i've done this with the wm_move event on my side.
Hook the WM_MOVE Function using WH_CBT
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Please give me your thoughts on whether you think the following would be possible, and workable:
Do you think it would be possible to dynamically load and use a DLL without calling LoadLibrary , and GetProcAddress ?
Imagine the following procedure:
1. Use VirtualAlloc to reserve space in memory for the DLL
2. Read the DLL file and load it into the newly allocated memory
3. Write your own custom function to read the Export Table and manually compute the entry points for the DllMain and other functions you need
4. Call DllMain with PROCESS_ATTACH, then be sure to call it again for every thread you create
Do you think it would work?
Rich
ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
|
|
|
|
|
I think it's possible but you would just be re-implementing the loader.
Steve
|
|
|
|
|
Thanks for your reply, Steve. I'll chalk that up as one vote for "it might work."
ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
|
|
|
|
Troposphere wrote: Do you think it would work?
Yeah it will. But be assured that it will be rope walking. You've got to be very careful.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
If you want do this manipulation then better derive one class(your own edit class derived from CEdit).
and handle some events & functions like OnKeyDown
void CMyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar == VK_DELETE) {
if (!(GetStyle() & ES_READONLY)) {
processDelete();
}
} else
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
handle in that functions get sel, set sel,
you have get at, setat functions for CString.
etc.
bla bla bla.
.....
you can do like this.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
I think,....Then you can go for service programming. some thing like that.Or you can create a plugin for a editor or you have to create a windows service, if that service is running then you can restrict like this. Search for this kind of programs(this comes under com etc...). Sorry. I dont know the writeing services programming.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Kalyani Gupta wrote: i need to calculate the width of characters before using SetCaretPos to move the caret, i dont know how to do this.
Hi Kalyani,
Is GetCharWidth is of any help!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I want a code that is uused to split a window that already splitted by CreateStatic(...) fn and here i want tosplit when i done an event like RightButtonDown..etc.
so send me a code cleary it is urgent.....
|
|
|
|
|
See you can't ask for a whole code ....
Start doing something and wherever you stuck to the problem then you can ask for the problems....
Cheers
"Peace of mind through Technology"
|
|
|
|
|
|
Hi all,
I have an application that executes several command line tools in the background (i.e no command line window is openend).
I still like to get the output from the tools and I've got no problem capturing output from printf and all fprintf's to stdout, stderr.
The problem is that I can't find a way to capture outputs made with cprintf.
I do not have access to the source of all tools (some are very old) so there's no way that I can change the tools to use printf.
I'm quite sure that someone must have done this, doing custom command line windows etc.
Are there any source available for a one of thoose?
Any hints are welcome..
eq
|
|
|
|
|
if you want a command line solution, here is how you can do it.
myprogram 2> error.log
the 2> directs the error stream to the file error.log
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-- modified at 5:16 Tuesday 30th May, 2006
|
|
|
|
|
toxcct wrote: myprogram >> error.log
As far as i remember, it's like this:
> creates a new file/stream
>> appends to an existing file or creates a new file/stream.
> and >> redirects stdout
2> and 2>> redirects stderr
(And < redirects a stream to stdin).
|
|
|
|
|
|
Thanks you guys, but it still doesn't solve any of my problems.
I'm NOT trying to redirect output to a file, I'd like to capture the output from my Win32 program that executes the command line tools (without showing any command line window).
The redirections doesn't redirect the cprintf outputs anyway.
Consider the following test application:
<br />
#include <conio.h><br />
#include <stdio.h><br />
<br />
void<br />
main(void)<br />
{<br />
printf("This line is printed using printf(...)\n");<br />
cprintf("This line is printed using cprintf(...)\n");<br />
fprintf(stdout, "This line is printed using fprintf(stdout, ...)\n");<br />
fprintf(stderr, "This line is printed using fprintf(stderr, ...)\n");<br />
}<br />
Running this with some redirections give:
<br />
T:\>test.exe<br />
This line is printed using printf(...)<br />
This line is printed using cprintf(...)<br />
This line is printed using fprintf(stdout, ...)<br />
This line is printed using fprintf(stderr, ...)<br />
<br />
T:\>test.exe > temp.log<br />
This line is printed using cprintf(...)<br />
This line is printed using fprintf(stderr, ...)<br />
<br />
T:\>test.exe 2> temp.log<br />
This line is printed using printf(...)<br />
This line is printed using cprintf(...)<br />
This line is printed using fprintf(stdout, ...)<br />
As you see it's impossible to capture ALL output.
(Btw is there a way to capture both stdout and stderr to the same file and preserve the order?)
From my Win32 program I can capture all cases except the cprintf one.
So I'll ask again if anyone have some hints on how to do it since I'm quite sure it's doable, cmd replacements like 4NT seems to handle that.
eq
-- modified at 14:17 Tuesday 30th May, 2006
|
|
|
|
|
Hi Friends,
I have one window on which I want to display SSN. SSN is one of the option in list and it value display infront of it in edit box. Can you pls help me to display these scenario. I am new to windows programming.
Thanks
|
|
|
|
|
Iterate through the items of the list box using the GetCount().
Create an array of the edit box's in front of the boxes.
Dpeneding on the count of the list go on setting the corresponding values of the list box into the edit boxes.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|