|
"#define _WIN32_WINNT 0X0500" is above ".cpp" file, what i call this function into it.
Zo.Naderi-Iran
|
|
|
|
|
If you insert it to StdAfx.h what happens?
|
|
|
|
|
valla sharmanda . man ham hamin moshkelo daram va natonestam halesh konam !
|
|
|
|
|
Hi!
i solve this problem:
in project properties, C/C++ option --> Command Line --> in "Additional options", you write: /D_WIN32_WINNT=0x0500
good luck (Ooo yesterday)
Zo.Naderi-Iran
|
|
|
|
|
See this :---> http://www.cygwin.com/ml/cygwin/2001-04/msg00779.html
|
|
|
|
|
Use this sample at :---> http://www.totalcmd.net/download.php?id=CreateHardLink
|
|
|
|
|
|
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
|
|
|
|