|
assasin_shark wrote:
i don't have "Help" nor "MSDN"...
Actually you do. Check out http://msdn.microsoft.com[^].
When calling GetCheck() and SetCheck() , use BST_UNCHECKED and BST_CHECKED instead of 0 and 1. It has nothing to do with your problem, but it does make the code more readable.
assasin_shark wrote:
CButton* pCheck = (CButton*)GetDlgItem(Check_Eagle);
The value passed to GetDlgItem() should be the ID of the checkbox control. Is that what Check_Eagle is, or is it a (int ) variable?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
<small><b>DavidCrow wrote:</b></small>
<i>Actually you do. Check out http://msdn.microsoft.com.</i>
Actualy i was there .. but .. realy .. i didn't find what i was locking for ...
<small><b>DavidCrow wrote:</b></small>
<i>When calling GetCheck() and SetCheck(), use BST_UNCHECKED and BST_CHECKED instead of 0 and 1.</i>
u mean <code>SetCheck(BST_CHECKED)</code> ?
<small><b>DavidCrow wrote:</b></small>
<i>Is that what Check_Eagle is, or is it a (int) variable? </i>
<code>Check_Eagle</code> is the name or ID of the Check_box, yes ...
iarta, iubeste, zimbese, exprima-te, relaxeaza-te, ajuta un batrin, accepta un compliment, ascula-ti prieteii, reia un proiect abandonat, fii intelegator cu tine si cu altii, uita-te la un album cu fotografii, picteaza un tablou, asculta tacerea, aminteste-ti intotdeauna ca nu esti singur, spune-le celor ragi cit de mult ii iubesti, imagineaza-ti ca astazi nu ai nici o grija, joaca-te cu un copil, citeste o carte buna, alege-ti o stea de pe cer, fii copil inca o data, suna-ti prietenii cu care n-ai vorbit de mult, da-ti voie sa mai si gresesti, lasai pe altii sa te ajute, renunta la ce u iti place, indeplineste-ti promisiunile, inchide ochii si imagineaza-ti ca esti pe o plaja tropicala, priveste atent o floare, cumpara-ti ceva ce iti doresti de mult, spera ca ceea ce iti doresti se va indeplini, ajuta-i pe altii, respira profund, fa-ti un cadou, iubeste !!!
|
|
|
|
|
assasin_shark wrote:
i didn't find what i was locking for ...
Specify exactly what you are looking for and someone will point you in the right direction.
assasin_shark wrote:
u mean SetCheck(BST_CHECKED) ?
Exactly.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
ok .. that solves one of the problems ... but the most impotant one ???
how do i do that ???
|
|
|
|
|
assasin_shark wrote:
how do i do that ???
How do you do what? You've not specified what the problem is. The code snippet in your original post appears to be syntactically correct. What part of it is in error?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
not eror ... just that i don't know how to do that ... i'll tell u again ... i whant to make an Edit_Box "Enabled" after i click the Check_Box and to enter a value also .. in te same time ... my problem is with the changing of the status of the Edit_box because of my click ... understand ?
nu prea ma fac inteles, dar incerc sa ma exprim !!!
|
|
|
|
|
Assuming your dialog class has a CEdit member variable mapped to the edit control, you can use:
m_ebEdit.Enabled(pCheck->GetCheck() == BST_CHECKED);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Actually what David meant was:
m_ebEdit.<code>EnableWindow</code> (pCheck->GetCheck() == BST_CHECKED); /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hummm, most of MSDN is on line (avialable via www). If you're developing the program using the VC++ IDE, then you should already have access to MSDN; otherwise there would be no help avialable when you hit F1. If you are using MFC (via VC++), then activating the class wizard will give you the option of setting the UI options (via command id) as follows:
void MyView::OnUpdateColortypeFill(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_Grid.GetColorType() == CGetColor::FILL);
}
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
guys .. i apreciate the help .. but it would be better if u would tell me were to put the sequence of code ... these are my arrors ....
<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(150) : error C2653: 'MyView' : is not a class or namespace name<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(152) : error C2065: 'm_Grid' : undeclared identifier<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(152) : error C2228: left of '.GetColorType' must have class/struct/union type<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(152) : error C2653: 'CGetColor' : is not a class or namespace name<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(152) : error C2065: 'FILL' : undeclared identifier<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(164) : error C2065: 'm_ebEdit' : undeclared identifier<br />
D:\DOCUMENTELE MELE\3\3Dlg.cpp(164) : error C2228: left of '.EnableWindow' must have class/struct/union type<br />
so .. i'm in the fog again ..
|
|
|
|
|
hello everyone...
i have a small question:
i want to intercept keyboard strokes being sent to applications...for example i want the 'a' button to send a 'b' to applications instead of 'a'...should i use hooks or subclassing...i need to know what are the appropiate APIs that should be used..
note:i want this to be done for all applications ((processes)) not only one...
|
|
|
|
|
Hook is better , just try global Keyboard hook.
saeedmalas wrote:
.i need to know what are the appropiate APIs that should be used..
SetWindowsHookEx(...) ,but for Global hook you have to create a dll.
look for more example here :-
http://www.codeproject.com/system/hooksys.asp
http://www.codeproject.com/system/Paladin.asp
http://www.codeproject.com/dll/hooks.asp
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
it looks like that using SetWindowsHookEx is only for monitoring not modifying...i actually want to prevent a message from reaching applications or modifying that message before reaching them..not just see what the message is...
|
|
|
|
|
Actually after hooking you can use GetWindowLong to to get Window procedure of any window and you can modify the charater from there.
look for that in more Detail in the link given by me in last post
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
if i'm going to do that,i think i have to get the Window procedure of all windows of all processes...i think that's a very hard work..isn't there an easier way..
|
|
|
|
|
This is not a small question!
There are aticles at CP that may give you the information that you seak.
I'll tell you this much, you need to use hooks.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
After I read some articles about building MFC Dll in this website,
I tried to export my class as MFC dll. However, I also want my class to
handle messages, such as PostMessage, SetTimer, etc.
I want to ask that how can I use message handling ability in my class which is exported as MFC Dll?
Thanks
|
|
|
|
|
Simply derived class from the CCmdTarget or it decesendent for enabling the messaage handlling in that class.
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello, I'm developing a application that does the communication wit TCP/Ip between two computers and send files between them, but i have some questions like i want to know what is the best way to develop it, for example socket or i don't know. Somebody can say me the best way ant what libraries can i use for develop it.
Thanks.
|
|
|
|
|
|
Thanks Ravi, but i have other question because i think that u know a lot. With this example i can see how can i implement my communication betwwen 2 computers with files but my applicacion start when i connect with a USB device and i have to pass the ID of the device to the server and the server has to see what files can download this device from the server. And i want to know how can i integrate my program that control the USB device and i know the ID of the device to pass this ID to the server and what will be the best way to develop the permissions in the server ( with a data base, only with text files, can u help me?, it's only to say to the client that whatever device has permiss to download for example only 5 files).
Thank you very much for your help.
/Jorge
|
|
|
|
|
You could check out http://www.msgconnect.com/[^] I haven't used it, but it looks good.
And as Ravi said there are lots of articles here on tcp/ip. Would be nice to abstract your problem out to higher level concepts than tcp/ip though.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
densitet wrote:
the best way to develop it
Well that is up to you (unless you have someone to bounce your ideas of of)!
densitet wrote:
socket or i don't know.
I understand why you asked this question, but we both know that it is bogus.
Basicaly, what you see is what you get!
Curiosity: What is this sopposed to mean, "densitet"? (OpenOffice spell checher - has no ideas, and neither do I.)
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
after I finished a dialogue template ,I want to build the class "CMyDlg" of the dialogue template ,but the problem arised: Unable to open the files (D:\ly\CMyDlg.h,D:\ly\CMyDlg.cpp)for class "CMyDlg" . Who can tell me why? thanks!
|
|
|
|
|
This is not an uncommon message from ClassWizard. I get it about 30% of the time when creating a new class. To ensure that your class gets properly added to the project, exit the IDE, delete the temporary files (e.g., .opt, .ncb, .aps, .clw) , and re-open the project. The next time you invoke ClassWizard (Ctrl+W), all should be well.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|