|
|
hi
i want write an application that work as a debuger.
i set a breakpointb in exe with "DebugeBreakProcess" function then i use "ContinueDebugEvent" function , But
it can not countinue execution the exe.
if you have information abut it please help me.
|
|
|
|
|
I think you can find your answer on www.Codeguru.com I think it has an article about exe files
|
|
|
|
|
Hello everybody!
I can't seem to find a reference on how the hell to do a simple operation like setting a control's "Enabled" to false... (ie, "gray" it out) In C# all you have to do is controlId.Enabled = false; , but MFC seems to handle things different... I'm being a complete n00b, but oh well... Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
For disable or enable you can use EnableWindow but if you want to work with controls you can declare variables for them.For example use of a Button you can declare CButton m_Button; and then m_Button.Functions Is this your question?
|
|
|
|
|
|
CButton m_Button;
m_Button.Create("Button",WS_CHILD|WS_VISIBLE,CRect(0,0,100,23),this,1);
m_Button.EnableWindow(1);
Its working
How to create your button?
|
|
|
|
|
|
Is your problem solving? and if you have a variable for your button you can use form it
|
|
|
|
|
>>Yeah, but how do I do that with the designer?
If you want it disabled by default...
Highlight the control, press F4 for the properties window, and change the Disabled property to
TRUE.
Mark
|
|
|
|
|
Alright! That solved it, thanks you two!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Please tell how to change the cursor when i move it into rectangle (100,100,200,200).
Thank you for helping
all for development
|
|
|
|
|
Do you need to LoadCursor and SetCursor ?
|
|
|
|
|
//Win 32 Application
//Hello world program
CALLBACK Winproc(HWND,Message,wParam,lParam)
Switch(wId)
...
....
case WM_MOUSE:
if(condition)
{
HWND hCursor=LoadCusor(hInst,(LPSTR)IDI_NEWCURSOR);
SetCurspr(hCursor);
else
.......
When condition ==1 ,the cursor not change.
Help me.
all for development e
|
|
|
|
|
I want to help you but what question?
|
|
|
|
|
Handle WM_SETCURSOR and if the cursor is within that rect, call SetCursor() to change it.
|
|
|
|
|
I've conclued I don't really know how to get handles to objects in VC++. They are referred to all the time, and I get the idea they are one of the basic tools of VC++ along with pointers. The books and manuals all talk about handles, but presume the reader is bright enough to know how they all work. I'm not. (Someone who knows what they are doing could write a great article titled, "Handles for Beginners")
So.....
Suppose I have:
dialog: CTestDlg
edit control: IDC_EDIT1
member function: CTestDlg::FuncTest
Exactly how would one get handles to any or all of these? I suspect one starts with
"HWND hHandle = ???????"
But what goes on the right side of the expression?
Thanks.
|
|
|
|
|
Handles are a Windows concept - they are just used in VC because VC normally is used for Windows programming. They are similar to a pointer in that they store an index into some internal table. By looking up that index, Windows can find the actual data that manages the window. But as far as you are concerned, a handle is just some opaque number you can pass around to various Windows functions.
For the dialog - there should be something like pTestDlg->getHwnd() or whatever the MFC equivalent is.
To get a handle to a control, call ::GetDlgItem(hDialog, IDC_EDIT1); where hDialog is an HWND obtained by using a method above. Alternatively, if IDC_EDIT1 is represented by an MFC class, just call the getHwnd equivalent on that class.
Member functions cannot have handles. A handle is used by Windows - but a member function is just a special type of function. You can create a pointer to a member function, but the syntax is ugly and very limited as to what you can do. Or you can search for fastdelegate on CodeProject to find a member function pointer wrapper.
Mike
|
|
|
|
|
Hi,
I dont know what exactly do you need by I am suspecting you want to get a HANDLE to the IDC_EDIT control. If this is the case,
You can use the following
CWND* pwnd=this->GetDlgItem(IDC_EDIT1);
it will return a pointer to that EDIT CONTROL. But this is CWND pointer; if you need the HWND then
CWND has a member variable m_hwnd which is public.
So
HWND handle=pwnd->m_hwnd;
But I guess, if you are using MFC, the pwnd is enough to do something to the window like writing a text, for example.
pwnd->SetWindowText("Text");
Regards,
Angbo2006
|
|
|
|
|
|
Thanks for the help. I didn't have an immediate and particular need, but I simply recognized a deficiency in my understanding of how to get a handle. So, I try to formulate a tight question that will shed some light. When I see correct code that does something, and understand its intent, then I can backtrack through the manuals and get a full understanding. (I guess that is my learning style.) I found the four volume MFC reference library in a used book store for $2 each, and have been reading about all these great classes and functions. However, the difficulty arises in understanding exactly how to write the code to get the required arguments for the functions.
Thanks again
|
|
|
|
|
Could somebody please point me towards the correct set of functions to create a full screen window. I have a window ( 800 x 600 ) which I need to view in full screen, but I will need to change the screen resolution in order to this. All the articles I have found so far simply resize the window and remove the titlebar. This is not the effect I want. I should also note this has to be done without MFC or ActiveX.
|
|
|
|
|
Can you explain I guess your question isnt for a change simple size
|
|
|
|
|
The window has a bitmap skin, so really resizing isn't an option. In order for the window to become full screen I will also need to change the resolution to match that of the bitmap. I have seen this done with lots of games, so I know it's possible, I just don't know how.
|
|
|
|
|
In the CreateWindow function, the third parameter is the window sytle, change it to:
WS_EX_TOPMOST | WS_POPUP | WS_VISIBLE
Like this (in WIN32):
<br />
wndHandle = CreateWindow (<br />
TEXT("Full screen"), <br />
TEXT("Full Screen"), <br />
WS_EX_TOPMOST | WS_POPUP | WS_VISIBLE,<br />
CW_USEDEFAULT, <br />
CW_USEDEFAULT, <br />
1280, <br />
1024,<br />
NULL, <br />
NULL, <br />
hInstance, <br />
NULL );<br />
Hope that helps.
|
|
|
|