|
Hi,
In VC++ 6.0, is there a way to change the group to which a radio button belongs without having to recreate that radio button ?
Thank you for your help.
John
|
|
|
|
|
I think group depends on radio's position in tab order.
You can adjust it in dialog resource editor, select Layout -> Tab Order in main menu, or Ctrl-D
rrrado
|
|
|
|
|
Yes. Modify a combination of the GROUP property and the TAB ORDER of the controls in the dialog. All controls in TAB ORDER beginning with a control with the GROUP property set are considered a group up to (but not including) the NEXT control in the tab order with the GROUP property set.
|
|
|
|
|
I think you'll find that radio buttons in a group have to be sequentially numbered as well, so you'll have to change the resource ID.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Is there a way to kill a another process from within your process other than TerminateProcess??? Thanks.
|
|
|
|
|
You should signal your thread that you want it to finish by sending message, or using some signaling object, so that your thread could make neccessary cleanup before exitting
rrrado
|
|
|
|
|
You mean like using IPC? That would be the preferred method but that assumes known interfaces etc.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Is there a way to send a signal to one process from another process. I know you can call "raise(SIGINT)" to send a signal to your own process. Can one re-direct a signal to another process?
|
|
|
|
|
Hi,
Did you try ResetEvent(), SetEvent(), WaitForSingleObject() ?
Sincerely Yours,
RadioShark
|
|
|
|
|
ResetEvent(), SetEvent(), WaitForSingleObject() don't they work for thread...??
I think mutex is the solution....
|
|
|
|
|
You could use the WM_COPYDATA mechanism, but you need to have the hwnd of the process you want to signal.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
i hope can someone help me in this project.....
firstly i want to know how to read a text from a file...
after that convert the text to lowercase or uppercase...
than count the probability of the word that appear in the text......
|
|
|
|
|
Reading files look at CFile
For string manipulation look at CString , it can covert to upper / lower and has Find functionality in order to match partial strings (words) within other strings (text).
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Assuming you want to use MFC:
CStdioFile file;
BOOL eof=TRUE;
CString lineOfText;
//See CFile and CStdioFile documentation in MSDN for other Open() options
file.Open("C:\\pathToYourFile\\filename.txt", CFile::modeRead);
while(eof==TRUE)
{
eof=file.ReadString(lineOfText);
lineOfText.MakeUpper();
lineOfText.MakeLower()
}
file.Close();
MS
|
|
|
|
|
Sounds like a homework assignment to me...
How about reading your textbook first?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
The thought crossed my mind. Then I thought, the hell with it, I will point them in the right direction today! Some reading would be required however
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Given a path e.g. c:\somedir1\somedir2\file.txt how can you find out if file.txt is a directory or a file?
Can't base the judgement on the extension, since there could be a directory named file.txt.
On a side note
I have an application that is using FindFirstFile and FindNextFile to enumerate all files and subdirectories in a given path.
Now I want to check if this given path is a pointing to a file, so I could ShellExecute the file, instead of calling the above functions.
|
|
|
|
|
To check for directory you need to check the dwFileAttributes of the WIN32_FIND_DATA structure that you pass to FindFirstFile or FindNextFile
WIN32_FIND_DATA data;
...
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
...
}
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Test FindFirstFile() etc. WIN32_FIND_DATA.dwFileAttributes for FILE_ATTRIBUTE_DIRECTORY. Should do the trick.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
I am using the following code to create a named pipe
<br />
SECURITY_ATTRIBUTES saPipeSecurity = {0};<br />
PSECURITY_DESCRIPTOR pPipeSD = NULL;<br />
<br />
if(lpSecurityAttributes == NULL)<br />
{<br />
if ( ! ( pPipeSD = ( PSECURITY_DESCRIPTOR) <br />
( malloc ( SECURITY_DESCRIPTOR_MIN_LENGTH)) ) )<br />
return FALSE;<br />
<br />
if ( ! InitializeSecurityDescriptor ( pPipeSD, <br />
SECURITY_DESCRIPTOR_REVISION) )<br />
return FALSE;<br />
<br />
if ( ! SetSecurityDescriptorDacl ( pPipeSD, TRUE, ( PACL) NULL, FALSE) )<br />
return FALSE;<br />
<br />
saPipeSecurity.nLength = sizeof ( SECURITY_ATTRIBUTES);<br />
saPipeSecurity.bInheritHandle = TRUE; <br />
saPipeSecurity.lpSecurityDescriptor = pPipeSD;<br />
<br />
lpSecurityAttributes = &saPipeSecurity;<br />
}<br />
<br />
m_hPipe = ::CreateNamedPipe(pszPipeName, dwOpenMode, dwPipeMode, dwMaxInstances, <br />
dwOutBufferSize, dwInBufferSize, dwDefaultTimeOut, lpSecurityAttributes);<br />
then I use a CreateProcessWithLogonW to spawn a new process that connect to this pipe using CreateFile. The createfile fails and return last error gives 5(access denied). Can anybody guess what I am doing wrong.
|
|
|
|
|
but what kind of a value does dwOpenMode have?
Access specified when a pipe is opened (CreateFile) must be compatible with the access specified in the dwOpenMode (CreateNamedPipe).
if PIPE_ACCESS_OUTBOUND or PIPE_ACCESS_INBOUND
you must call CreateFile with
GENERIC_READ, GENERIC_WRITE accordingly as dwDesiredAccess param.
|
|
|
|
|
thanks I was able to resolve that issue...now I am facing a new issue..CreateProcessWithLogonW call is taking too much time on a WinXP machine, but work fine of a Win2000...any ideas why?
|
|
|
|
|
What is an upper limit for dynamic allocation of single array?
For an example:
int* A_of_int = new int[X];
What is upper value for X. The environment is visual studio 6 on windows platform (XP). I suppose one of the limits is memory size.
|
|
|
|
|
|
Hi
Perhaps I'm wrong but INT_MAX is defined as maximum int value 2^31-1
What I need is maximum array size for type int
Is constant INT_MAX also used to define maximum array size for type int?
Tomaz Rotovnik
|
|
|
|