|
I m still waiting for reply from any guru.....
|
|
|
|
|
So you want to be informed when a tooltip is created by any application? If this is the case you will probably have to install a system wide hook. Look up SetWindowsHookEx . I'd probably use the WH_CBT variety. If you're not familiar with system wide hooks (as opposed to the safer and easier thread local hooks) you should read up on it before coding one since system wide hooks inject code into other processes and can thus crash them or worse.
Steve
|
|
|
|
|
Hello!
I want to write some aplication for example some proprietary TCP client that will connect to some server and receive and send messages. I want this functionality to be encapsulated in DLL library. Some GUI client will load this DLL and call its functions. So far so good. But here is a problem...when TCP client receives some message, I want it to notify GUI client trough some kind of callback function. How do I do that? How do I call a function that is implemented in GUI part from TCP client DLL?
I know I did something like that long ago when I was learning about DLL from MSDN article. I can't find this article now. I checked local and internet version of MSDN, but I just can't find it. The title was something like "Introduction to DLL's" or something like that and contained nice pictures of text and data segments mappings. If somebody knows this article please direct me to it.
Best regards,
Rostfrei
|
|
|
|
|
define a register callback function that take a function pointer as a paramater and export it out of the dll.
EX
bool RegisterCallback(bool (*FP)(void *,const char *,const char *),void * passin)
This defines a function that takes a void pointer and a pointer function that returns a bool and takes a void pointer and two character pointers.
I have found that when you define a function that takes a call back you should allways have a void pointer in the callback deffinition and in the called function so you have some way to pass data into the callback.
a programmer traped in a thugs body
|
|
|
|
|
Hai,
I am just struggling to read the data which i have put into the LPSTREAM.
Can any one help me?
Here is the code snippet:
char *buf = new char[statstg.cbSize.LowPart];
hrRetTemp=lpStream->Read((void *)buf, statstg.cbSize.LowPart, &ulBytesRead);
I dont get any data in the "buf" .Pls help me.
Saravana Kumar
|
|
|
|
|
Run it in the debugger after placing a breakpoint after the Read call. When the breakpoint is hit type "hrRetTemp, hr" in the watch window. This should show a textual representation of the error.
Steve
|
|
|
|
|
hi
i have a dialog class.I want to get Document Pointer in that class and using that access a member variable of the Document class.
how to get the document pointer in the dialog class?
|
|
|
|
|
|
Instead of accessing the document's member variables directly, you'd be wise to use a "getter" method instead. For example, if the document contained information about a person, it should have method for retrieving that information something like:
class CMyDocument : public CDocument
{
private:
CString m_strName;
CString m_strAddress;
UINT m_uAge;
public:
CString GetName() const;
CString GetAddress() const;
UINT GetAge() const;
};
"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
|
|
|
|
|
hi~everyone
i hava a question puzzle me ! when i used "CFile's" open()function read a file use unicode in windows 98
but it's allways fail !
please help me ande very thanks in advance!!
nothing
|
|
|
|
|
|
ebinaini wrote: ...but it's allways fail !
Define "fail."
"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 can't get the handle of file and i install MLU in windows 98
thanks in advance!
nothing
|
|
|
|
|
ebinaini wrote: i can't get the handle of file...
Why not? What does the code snippet look like that does not work?
"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
|
|
|
|
|
can anyone expain this logic flow!i mean the for loop makes no sense to me!...yet it works!and displays the map of india!
#include <stdio.h>
main()
{
int a,b,c;
int count = 1;
for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!" [b+++21]; )
for(; a-- > 64 ; )
putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0;
}
-- modified at 5:22 Wednesday 25th January, 2006
|
|
|
|
|
|
|
|
First shot:
namaskaaram wrote: a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!"
This is the map of india, XORed with some easy key.
namaskaaram wrote: for(; a-- > 64 ; )
putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0;
This displays spaces or '!', ++c=='Z' ? c = c/ 9:33^b&1 being the decyphering code.
More in a while...
~RaGE();
|
|
|
|
|
Rage wrote: This displays spaces or '!', ++c=='Z' ? c = c/ 9:33^b&1 being the decyphering code.
we have a ?: operator here, so might be seen this way first :
putchar(
(++c == 'Z') ?
(c = c / 9) :
(33 ^ (b & 1))
);
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
More as promised:
namaskaaram wrote: a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!" [b+++21];
for each step in this for loop:
1. b is increased by one in [b+++21], so you basically do b=10, b=11, b=12, and so on.
2. a is initialised to the value of the char placed in position b+21 as stated in [b+++21] in the map string.
3. the second for loop is executed. Let's have a closer look:
++c=='Z' ? c = c/ 9:33^b&1
this is equivalent to
if (c==30)
putchar(c=c/9);
else
putchar(33^b&1);
c++;
following happens in the for loop
3a. a is decreased by one, meaning you stay in this loop (a-64) times
3b. c is increased. If c is equal to 'Z'(=30), a return to carriage is printed, since ++c=='Z' ? c = c/ 9:33^b&1 returns c = c/9, and this is 10.
3c. otherwise, you return 33 Xored with b&1 which is either a space or a '!' char, which prints the map.
when the index b+21 exceeds the string length, the assignement a = string[b+21]is false, leaving the first for loop.
and finally, int count = 1; is of no use
Hope this helps.
~RaGE();
-- modified at 6:03 Wednesday 25th January, 2006
|
|
|
|
|
Rage wrote: if (c==30)
Is actually:
if (c == 90) thus dividing by 9 would yield 10, a newline character;
"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
|
|
|
|
|
this is how we could see it in a better view :
<font color=blue>#include</font> <stdio.h>
<font color=blue>int main</font>(<font color=blue>void</font>) {
<font color=blue>int</font> a = 0,
b = 10,
c = 10; <font color=green>
<font color=blue>char</font>* pszMap =
<font color=gray>"- FIGURE?, UMKC,XYZHello Folks,"
"TFy!QJu ROo TNn(ROo)SLq SLq ULo+"
"UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^"
"NBELPeHBFHT}TnALVlBLOFAkHFOuFETp"
"HCStHAUFAgcEAelclcn^r^r\\tZvYxXy"
"T|S~Pn SPm SOn TNn ULo0ULo#ULo-W"
"Hq!WFs XDt!"</font>;
a = pszMap[b+21];
b++;
<font color=blue>while</font> (a != <font color=gray>'\0'</font>) {
<font color=blue>while</font> (a > 64) {
a--;
c++;
<font color=blue>if</font> (c == 'Z') {
c /= 9;
putchar(c);
}
<font color=blue>else</font> {
putchar(33 ^ (b & 1));
}
}
a = pszMap[b+21];
b++;
}
<font color=blue>return</font> 0;
}
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
|