|
Enter command prompt and do the following
Key in Format C: and press return.
Now press Y
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
i need to send the enable/disable message for my buttons from listview control in win32.
like suppose in the case of listview is empty all the three buttons disable at a time.
and enable when any item present in the listview.
both controls(window ,buttons) are in different windows.
like listview is in one window and all the three buttons are in different window which is below the listview.
can any one help me?
|
|
|
|
|
You can use of EnableWindow for enable or disable buttons
|
|
|
|
|
I have used that one but how can i notify my buttons run time from my list. that the list view is
now empty.
|
|
|
|
|
Do you want if list is empty then buttons diable
|
|
|
|
|
|
You can calculate count of items on the list and if result is 0 then disable buttons
|
|
|
|
|
that's ok but which window and which message i have to use to disable the window.
on listview's containg window.(listview notify message )
or the other window which contain three buttons.(or in WM_COMMAND) where ????
guide me where should i put my code for disable the buttons?
|
|
|
|
|
You can use of WM_ENABLE or EnableWindow for enable or disbale
ListView_GetItemCount or LVM_GETITEMCOUNT for get number of items on a list view And I think when you start your program buttons must disable because listview doesnt have any items and when you insert a item you can enable buttons and when you use of LVM_DELETEITEM or ListView_DeleteItem you can check if count is 0 disable buttons.
|
|
|
|
|
You don't notify the buttons of anything, you just enable/disable them as you deem necessary.
|
|
|
|
|
I'm a newbi. And I'm learnning Visual C++. I have a problem about my Application, I want to use a API function "PostMessage" to send a message window to an Online Game such as "Hero Online".
I write a DLL, and use funtion API "PostMessage" to control text is succesful, but I'm do on Game progamer not to do.
Please! help me
wqweq
|
|
|
|
|
‘PostMessage’ is one of the means by which you send messages (instructions) to different windows in the Windows OS and is not a means to send messages over the internet.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
|
|
Thanks!
I'm write a DLL hook and send a message to a application Game a message keyboard. I want application Game to action.
wqweq
|
|
|
|
|
hi is there any funcion to create radio button from program (like (CLabel*)Label->create())
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: hi is there any funcion to create radio button from program
Use style BS_RADIOBUTTON while creating button.
CButton button;
button.Create(_T("Radio button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(10,40,100,70), pParentWnd, 1);
|
|
|
|
|
how to specify the loactaion of radio button. i have to create it in my own locaiton
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Use of MoveWindow or SetWindowPos
|
|
|
|
|
deeps_cute wrote: how to specify the loactaion of radio button.
Have you seen Create API? RECT parameter is for that purpose only.
|
|
|
|
|
I read this article about calling conventions:
http://www.codeproject.com/cpp/calling_conventios_demystified.asp
Something is not clear for me:
1-) I see that function overloading is only possible with thiscall. Right? Is this true?
"Thiscall is the default calling convention for calling member functions of C++ classes"
I can set Visual C++ Compiler Options with /Gd, /Gr, /Gz (Calling Convention) . __cdecl, __fastcall, or __stdcall .
2-) But this doesnt affect C++ member class functions calling convention type, i mean thiscall. They are always thiscall. Right?
3-) In win32 programming i see all of functions declare with stdcall. So beacuse of that win32api is not object oriented. I mean can not use function overloading. But why didnt they design win32api with thiscall?
Can you please verify my conclusions. Am i wrong or right?
Thank you.
|
|
|
|
|
sawerr wrote: Am i wrong or right?
Yes. C (stdcall) versus C++ (thiscall), they are not the same.
led mike
|
|
|
|
|
sawerr wrote: But why didnt they design win32api with thiscall?
That would have been sweet for us C++ programmers, and .NET is a BIG step that direction, but I
imagine since the OS APIs need to be callable from any language (including non-OOP ones) they had
to use a common calling convention.
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
"thiscall" is not a keyword, it means "the function has this as its first parameter even though it's not written that way". A member function can be __stdcall - when you write an implementation of a COM interface in C++, the methods are __stdcall (it's hidden in the STDMETHODIMP macro).
Function overloading is done by the compiler giving each overload different internal names. This is unrelated to calling conventions.
Most Win32 APIs use __stdcall (or as it was originally called, PASCAL ). Only a few like wsprintf() use __cdecl . APIs can't be overloaded because that would break compat with Pascal and C and other languages that don't know about overloading or mangled names.
|
|
|
|