|
Hello sir
in using wh_getmessage hook i have these problems
I need to type cast msg->wParam =VK_BACK
and post new characters using POSTMESSAGE api
problem i am having is if use postmessage then posted message 's character also coming again to my filter function
with the character code which i have send
ie say i type a then i type b , now i change b-> backspace and
postmessage(c ,b)
since i have changed b to backspace ,, the character which i posted ie c and b are also coming to filter function
since i dont change c to some other character no problem but since i have changed b to backspace the postmessage(b) also changes to backspace
how to prevent posted message not coming back to my filter function
i tried with a boolean but it dont work properly
so could you give me some idea sir how to implement this one
thanks in advance
with regards
vimal
|
|
|
|
|
Can any one please tell me how to create a Tree view for displaying directory structure in vc++.i want to create the tree view like a "windows explorer" program.
|
|
|
|
|
http://www.codeproject.com/useritems/drivebrowsingtree.asp
The World is getting smaller and so are the people.
|
|
|
|
|
Hi..
In c++ how can i create a new object of a class depending on the contents of the string. Suppose a function is there which takes input argument as a string which is nothing but a class name and that function will return me a new object of that class. something like...
char strClassName[] = "CTest";
CTest* pTest = new ??
now what will be replaced with ?? and i want to use that strClassName string.
class CTest is an example i can replace that with any class name. Whatever the class name appears in the strClassName that class's object should get created. Something like RUNTIME_CLASS macro in MFC. in this macro it uses ## to parsing token. Same thing i want to achieve not using MFC. how can i do that.
Thanks
Ravi
|
|
|
|
|
Its a simple use of logic i guess..
Class Class1 : public CBase
{
public:
void WhoAmI() //virtual fucntion in base class.
{
printf("i am class1");
};
};
Class Class2 : public CBase
{
void WhoAmI() //virtual fucntion in base class.
{
printf("i am class2");
};
};
char szClassName[] = "Class1";
void main()
{
CBase *pClass;
if(!strcmp(szClassName,"Class1"))
{
pClass = new Class1;
}
else
....
pClass->WhoAmI();
...
}
The World is getting smaller and so are the people.
|
|
|
|
|
It requires more thought that that. The RUNTIME_CLASS macro in MFC uses the runtime information gathered by MFC to create new objects.
In plain C++, the most effective approach would be to analyse the string the user has posted, and create a new object based on this info. For an example:
void* ptrObject = NULL;<DIV>
if ( _stricmp(strClassname, "CTest") == 0 )
{
ptrObject = reinterpret_cast<CTest*>(ptrObject);<DIV>
ptrObject = new CText(...);
}
<DIV>
... Use the object ...
<DIV>
delete ptrObject;
This code piece will analyze the input and create a new object based on the input. The void-pointer is used because we want the pointer to be global for the function, but we do not know it's type until we analyze the string. Be especially careful that you initialize the pointer to NULL before doing the cast conversion. Otherwise your compiler might throw you a warning.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
hi,
I'm a VietNamese student, now i'm doing a project with the ower-draw
control and I want to create a dialog that like your RGN Generator.
Would you please tell me how to create A RGN Generator text with the
burning fire around it and a button with the text circling it.
Thanks
|
|
|
|
|
Hello Guys,
Is it advisable to design a new control derived from CWnd like CButtons in stuff?
Can any one give me or direct me to a sample that has done it so that i can understand the complexity involved.
Thanx in advance.
Yo!
|
|
|
|
|
Search for CRulerWnd/ CRulerWindow in codeproject,which allows to create/use custom control Ruler(Scale)
Warm Regards,
KKR
|
|
|
|
|
Thanx Mate,
Regards,
Prakash.;)
The World is getting smaller and so are the people.
|
|
|
|
|
How can I crack an encryped *.zip file or an encrypted Word document? as we have known, decryption needs its algorithm and its key, but we don't know the encryption algorithm of it, I want to try the key one by one by using a hacker dictionary,
how can I do it? I want someone will help me~
I am a Chinese boy
|
|
|
|
|
Prolly wrong place to ask that question...
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Hahaha man you are so sick...Password are put so that ppl like you dont read them.
|
|
|
|
|
don't put your nose into stinking things!
Don't try it, just do it!
|
|
|
|
|
ive used GetDIBits to get the bitmaps images RGB data into a
byte array
so effectively i can modify the rgb values of the image by just modifying the bits in the byet array buffer.
i tried creating a function
SetPixelColor(LPBYTE imgBuf,int column,int row,DWORD dwColor)
{
}
that is supposed to set the dwColor for pixel at row and column specified
however im having problems in mapping the row and column to the 1D LPBYTE buffer
please advice??
or is there any other alternative APIs
|
|
|
|
|
How can i change the text in the status bar for an SDI document >
|
|
|
|
|
try it !
probably
AfxGetApp()->m_hMainWnd->GetDescendWindow(yourstatusbarID);
Hello World!
|
|
|
|
|
I would like to write a proxy compatible with windows 98/XP.
I have looked at the articles here on CP and the two relevent articles don't apply to my particular problem I don't think.
For instance, the firewall example here on CP uses features specific to XP (I think). I want to write a firewall, but need it to work in win 98 also. Does anyone know of articles which might explain the different approaches used in writting a http proxy? basically I just want to capture HTML before being sent to browser, preferably both IE and Netscape. I have already considered using IWebBrowser2 to accomplish what I want to do also.
Edit Actually I really need to capture HTTP and HTML...so maybe IWebBrowser2 wouldn't work at all
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
|
Coolness
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I want to design a windows program that can communicate using the serial port. I bought C#.net standard not knowing it did not have serial communcations framework and the work around is using MSComm.ocx from Visual Studio 6 which i do not have. Does C++.net standard have serial port communications framework? Or would buying Visual Studio.net solve my issue?
Thanks,
karl
|
|
|
|
|
For serial communication over COM port you have to use API functions like
CreateFile, WriteFile, ReadFile etc.
or alternatively you can use an OCX component, like MSComm.ocx.
Both ways can be achieved from C#, too.
Bunburry
|
|
|
|
|
Does any one know a fairly easy way to set the focus to a given edit control in a dialog box? Thx,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
GetDlgItem(IDC_MYCONTROL)->SetFocus() ???
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
That's it. Thanks.
ralf.riedel@usm.edu
|
|
|
|