|
The pointer coming in to that function is all you need - it has methods like enable, settext, setcheck. So you just operate on the CCmdUI pointer passed in to the function.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I have a string,but i don't know how delete it in a .txt file?
Please tell me,OK!!!
I'm very like VC++.
|
|
|
|
|
Do loop, search the string in the file.
nothing but everything
|
|
|
|
|
- Why we often discuss the two topics together?
- For example, MSDN topic: DllMain, TlsAlloc, etc.
Thanks,
Maer
|
|
|
|
|
A DLL isn't a thread. A DLL is a separate piece of library code which can be used to separate a program into component parts. These components parts can be shared among more than one program.
A Thread is a bit like a separate path of execution. One program can run multiple threads which means that it can be performing more than one task at a time.
This is a very basic overview. I'm sure there will be some more in-depth articles on the site in the Threads and Processes section.
--
Andrew.
|
|
|
|
|
- Thanks Andrew pal! Your reply give a lot help.
Have a nice day,
Maer
|
|
|
|
|
I've been meaning to ask this for a while... Anyone know what KEY_CREATE_LINK access is good for? I could find no registry API for actually making a link in the registry.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
It's almost documented in the DDK. ZwCreateKey mentions REG_OPTION_CREATE_LINK (defined in winnt.h though).
Please drop a note if you get it to work with RegCreateKeyEx.
++luck;
/Mike
|
|
|
|
|
Just a guess, but I imagine MS uses it for backwards compatibility (I don’t think there are to many of us who will need to use it). Say for exmple if MS were to constantly be changing the location of Windows specific registry keys, they could simply add links under the old keys that point to the new ones. This would make it so older software would not break under a new version of Windows (yeah right).
My 2 cents.
Ben Burnett
"It's all absolutely devastatingly true -- except the bits that are lies"
- Douglas Adams
|
|
|
|
|
I've found an article that shows how to make an app with non-rectangle window, but is not MFC, how can i use the MFC to make a non-rectangle Dialogs based app?
|
|
|
|
|
Most Win32 APIs are duplicated as CWnd member functions. If the APIs you need aren't, then just call the API and pass it your dialog's HWND - call CWnd::GetSafeHwnd() to get the HWND.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
|
I know that there are the __FILE__ and __LINE__ macros, but is there some sort of equivalent that produces the current function and class names? I know that some compilers support
__FUNCTION__ or __func__, but MSVC does not seem to support this. Is there a way to do this in MSVC??
|
|
|
|
|
maybe you already know this, but if you have RTTI info turned on and use the typeid() keyword
you can easily get the class name of an object
Base* someClass = .....
char* className = typeid( *base ).name();
your out of luck for functions, so far as I know.
|
|
|
|
|
Hi,
I have a scenario, where i have an object say 'A' which has a member varible which is another object say 'B'.
I want to be able to pass data from object B Up To A. Without B have any knowledge of A.
Anyone any sugestion, Surely this must be a regular task.
Cheer
Richard
|
|
|
|
|
class B {<br />
<br />
public:<br />
int getData () { return data; }<br />
<br />
private:<br />
int data;
<br />
};<br />
<br />
class A {<br />
<br />
public:<br />
void printBData () { <br />
<br />
int data = myB.getData ();<br />
cout << "B's data: " << data << nl;<br />
<br />
}<br />
<br />
private:<br />
B myB;<br />
<br />
};
Ben Burnett
"It's all absolutely devastatingly true -- except the bits that are lies"
- Douglas Adams
|
|
|
|
|
There are two methods that you could consider;
1. Instead of having B push the information to A, why not have A query B for the information when it's needed?
2. Use a proxy class. Thus, B and A will know about C, and B will use C to pass information to A. This is similar to the observer pattern (I think?) - there's a good articleon this site about the observer pattern but I can't remember exactly where now.
--
Andrew.
|
|
|
|
|
How can i make a taskbar in my app?
|
|
|
|
|
|
I mean a taskbar in the app 'coz when i minimize my dialogs don't keep a little window, and stay in a bar just like mIRC and other programs.
|
|
|
|
|
I have two seperate classes for two different dialogs in MFC. Now i want to acces the variables of one dialog in the code of the other class of the other dialog. How do i do this?
Thanx
Kuniva
Want, take, have.
|
|
|
|
|
The easiest way is to declare the variables as public members of the class and then access them in the usual c++ way,
void CDialog1::Test()
{
CDialog2 dlg;
dlg.m_bTestFlag = TRUE;
int nRet = dlg.DoModal();
if(nRet == IDOK)
{
BOOL bTest = dlg.m_bTestFlag;
}
}
|
|
|
|
|
How to find a string in a file?
Are there any VC functions that I can use directly?
Can you help?
Thanks,
Maer
|
|
|
|
|
If your file is a text file which I assume it is, try this...
CStdioFile file;
if (!file.Open("c:\\file.txt", CFile::modeRead))
return;
CString str;
while (file.ReadString(str))
{
if (str.Find("Search String) != -1)
{
TRACE("Found it!");
}
}
Normski - Professional Windows Programmer
|
|
|
|
|
Hi, Normski!
Thanks for your reply! It is the one I am looking for!
Have a nice weekend!
Maer
|
|
|
|