|
As mentioned above you can use the CRgn class:
CRgn rgn;<br />
rgn.CreateEllipticRgn(left, top, right, bottom);<br />
<br />
if (rgn.PtInRegion(point))<br />
{<br />
...<br />
}
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I have declared an array of size 200 for a structure with character as well as integer members.I want to know how to reinitialize the array values to NULL in such a way that the old values should get deleted.
Eg:Group grp[200]; where Group is a structure.
|
|
|
|
|
Can't you just use memset() or ZeroMemory() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I need to copy all content of one projevct to another so to modifier what i need.
|
|
|
|
|
|
I create a new project but i want to copy others forms from a old project to the new, what to do
|
|
|
|
|
Form? Do you mean a dialog? You just want to copy the dialog or the controls in it too, with member variables if any, attached to those and message handlers for those controls and the dialog itself? What is the logic behind your question?
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
I need to copy a dialogs with all these codes
|
|
|
|
|
There is no such copy-paste operation which will perform this task. You will need to redo the thing.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
you create empty prject after that, you add exist project to.
All code, resource will be added.
Huynhnb
.: Your success is also me :.
|
|
|
|
|
how we can restrict the dialog.
what i mean is when we move the dialog to end of the screen.ok, no problem.if we further move i will move to out of screen.how to avoid that,
thank u in advance,
vasu.
|
|
|
|
|
SendMessage(DM_REPOSITION);
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
please tell some examples then i understand easily,
thank u for ur reply,
vasu
|
|
|
|
|
Handle the WM_MOVE message of your dialog. Just add the following line in that function.
SendMessage(DM_REPOSITION);
Does this solve your problem?
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
I have Subclassed a Window using the SetWindowLong function. Now, I would like to UnSubclass it. Is there any way to UnSubclass a Window?
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
Did you use GetWindowLong() to save the previous window procedure? If so, just put the old one back again.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
use SetWindowLong with pointer to original window procedure.
-Saurabh
|
|
|
|
|
I reversed a dll in asm to my liking. I want to keep the dll's integrity and make the midifications at run-time.
I've been looking all over for a more intermediate tutorial for such a method of gaining access to another program. I have worked with C++ quite a bit in the past, but only for very simple things and mostly console based. I am starting to get a hang of the Windows API only recently and I need a little help figureing this out.
I have created an application that (as far as I can tell) successfully loads a dll into a process. I am not all too familiar with how these libraries work, but my assumption is that a process has to call methods from the dll. I just want to be clear on how it works, so here is where my stupid question comes in: Am I supposed to create the program to inject the dll, then access the dll from my injector program? Or is there a way to make the dll run code as soon as it is injected?
All the tutorials I have found on this subject have way too much extra stuff in them for me to tell what exactly is going on. I understand that I need to read up on how dlls are implemented so if anyone could direct me to a tutorial that would give me the knowledge for what I want to do, I would appreciate it.
This is the current code I am using to inject:
void Inject(HWND hWnd, char* strDll )<br />
{<br />
GetWindowThreadProcessId(hWnd, &pId);<br />
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);<br />
LPVOID lpRemoteAddress = VirtualAllocEx(hProcess, NULL, strlen(strDll), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);<br />
WriteProcessMemory(hProcess, lpRemoteAddress, (LPVOID)strDll, strlen(strDll), NULL);<br />
CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"), lpRemoteAddress, 0, NULL);<br />
}
I took the dll from a source I found for injecting into a task manager and ignorantly tried to inject it using my code. I received no errors, but it was to no avail. This is why I assume I need something executing the code in my injector. Am I right about that?
Thanks for any help or links, it would be much appreciated.
-- modified at 0:45 Friday 7th July, 2006
|
|
|
|
|
You might get farther wrapping the DLL. Write a stub dll with the exact same function names and definitions and replace your old dll with the new one. Then your new dll gets control both before and after each function call, as well as getting control in DLLMain (process / thread attach and detach). This should work as long as the caller is using LoadLibrary / GetProcAddress. If the caller is using load-time linking, then you have to take more care with laying functions out in the dll.
earl
|
|
|
|
|
Thank you. That simple answer was actually very informative. There is one thing I don't understand about it, though. If I know the original DLL is calling OpenProcess() and I want to stop it from calling that funciton, what can I put in the dll to basically redirect the code to just after that call? Can I redefine the function in my new dll, even though it is from another library?
One other thing that would be nice to understand goes with your statement that I can replace the dll. Just for learning purposes, I ran a program with the original dll, then I had my loader inject a copy of the same dll that I modified something obvious in asm. Nothing happend. Why is this different than creating a "stub" dll?
Thank you for your help, all this stuff is very intriguing to me.
|
|
|
|
|
Hi,yesyterday i posted this but now i narrowed my problem in to one.
CConfigurator oConfig("Configurator",this,0);
CGraphviewConfig oGrphconfig;
CGrpTrnConf oGrpConf;
oConfig.AddPage(&oGrphconfig);//error
oConfig.AddPage(&oGrpConf);
oConfig.DoModal();
This is my AddPage function.
The two CGraphviewConfig and CGrpTrnConf are dialog based and i changed CDilog in to CPropertyPage.
In this i checked for adding single page with CGrpTrnConf and its performing good.It asserts error only for another Class CGraphviewCOnfig.
I compared these two classes both having same kind of declaration and construction.Then why it occurs..I everything changed CDialog into CPropertyPage ..But why?
This is my construction of CGraphviewConfig
IMPLEMENT_DYNCREATE(CGraphviewConfig, CPropertyPage)
CGraphviewConfig::CGraphviewConfig()
: CPropertyPage(CGraphviewConfig::IDD)
{
//{{AFX_DATA_INIT(CGraphviewConfig)
m_sPageNo = _T("");
m_sGrPgTitle = _T("");
m_sPanelTitle1 = _T("");
m_sPanelTitle2 = _T("");
//}}AFX_DATA_INIT
}
CGraphviewConfig::~CGraphviewConfig()
{
}
Pls help me?
|
|
|
|
|
On which line does the assertion occures?
nave
|
|
|
|
|
|
when the assertion dialog apperaces, click the retry button. Then u will get the line from which the assertion occured.
post that line and context
nave
|
|
|
|
|
when press retry it goes to disassembly and it shows the line
5F427DF0 int 3
|
|
|
|