|
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
|
|
|
|
|
and you my friend!
Normski - Professional Windows Programmer
|
|
|
|
|
Thanks pal!
- My weekend is not as good as yours. My girl is in another city. 200KMs away. We just chat throught the net. ^__^
Regards,
Maer
|
|
|
|
|
Hi,
What I want, is to pass a function which is a member of one object into the contructor of a new object it declares. So the new object can then call it.
Keep getting errors along the lines of:
error C2664: '__thiscall CTest::CTest(void (__cdecl *)(char *))' : cannot convert parameter 1 from 'void (char *)' to 'void (__cdecl *)(char *)'
Can Anyone offer Any Advice, it work if i declare the function as a static.
Guess it's a c++/c isssue. The function prototype is for a standard c function where i want it to be for a class memeber function
Or is this the sort of thing that should be done through some Object Orientated Programming principle.
Thanks, Much Appreciated
Richard Jackson
|
|
|
|
|
Yes, you've pretty much got it - the non-obvious part is the passing of the implicit this pointer to member functions, which alters the function signature of those functions.
Filter on thiscall in this forum for more info. There's also a bit in the FAQ on using member fns as C (Windows) callbacks.
|
|
|
|
|
Hi,
in MFC using CSocket or CAsyncSocket following approach can set communication between a client socket and a Connecting socket on server side.
ListeningSocket.Accept ( ConnectingSocket );
Problem, How will multiple clients be implemented?
I have the clue that Link List, Array, Threads might be used for creating multiple connections with multiple clients.
like ListenSock.Accept ( ConnectSock[i] );
BUT how will the messages be handeled. How will one connecting socket differentiate form otherones message.
PLZ HELP !!!!!
RawCoder
|
|
|
|
|
I would strongly recommend NOT using the MFC implementation wrappers for sockets.
The best and *orthodox* way to to use raw sockets WSAEvent etc.
A very good book to but describing the programming of sockets for windows is
"Winsock 2.0" - By Lewis Napper.
|
|
|
|