|
I have a SDI application in MFC. I split the main frame to 2 rows and 1 columm, then further split first row of the main frame to 1 row and 2 columns statically. the following code is added to OnCreateClient().
// split main frame
m_mainSplitterFrame.CreateStatic(this,2,1);
// further split top main frame to one row and 2 columns
m_childSplitterFrame.CreateStatic(&m_mainSplitterFrame,2,1, WS_CHILD | WS_VISISBLE,m_mainSpitterFrame.IdFromColRow(0,0));
//Create view for sub frame
m_childSplitterFrame.CreateView(0,0,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext);
m_childSplitterFrame.CreateView(0,1,RUNTIME_CLASS(CMyChildView),CSize(100,100),pContext);
// create bottom view
m_mainSplitterFrame.createView(1,0,RUNTIME_CLASS(CMyMainView),CSize(100,100),pcontext);
retrun TRUE;
|
|
|
|
|
Well, Im not sure about... It can be an intern conflict with the frames/windows. Does the MessageBox (NULL, "Message", "Caption", MB_OK); work?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
i got this warning when i try to use isletter() in my WordDocu()
{
CString p[26];
CString v[26];
p[0] = "A";
p[1] = "B";
......
p[24] = "Y";
p[25] = "Z";
v[0] = "a";
v[1] = "b";
....
v[24] = "y";
v[25] = "z";
for (int i = 0 ; i <26 ; i++)
{
if ( v[i] == str || p[i] == str)
{
return FALSE;
break;
}
else if ( i==25 &&( v[i] != str && p[i] != str))
{
return TRUE;
}
else
{
return TRUE;
}
}
}
is there any path i dont wrote return TRUE/FALSE ? :/
|
|
|
|
|
It doesn't look like it.
Maybe you fooled the compiler by putting a break; after a return.
And why have a for() loop if it always exits the first iteration?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i want to know when a GetAt(i) is not letter (a-z A-Z) so it would be 1234567890!@$#^%^ etc
i want this so i can find how many words exist in a string
|
|
|
|
|
Immunity18 wrote: want to know when a GetAt(i) is not letter (a-z A-Z) so it would be 1234567890!@$#^%^ etc
if (0 == _istalpha(str.GetAt(...)))
{
}
I don't know what the problem with isalpha/iswalpha was...
Regardless, look at your for loop - no matter what the condition, the function returns.
To the compiler there's no return after the for loop. If the for loop condition fails before the
first iteration, then no value is returned. We know the for loop will always execute (because
for (int i = 0 ; i <26 ...) but the compiler doesn't.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
the _istalpha create me a problem and while it work fine for CStrings intiliaze and valued in code
it dont work for CString (buf) from File.txt
|
|
|
|
|
hmm well I never saw that code so I'm not sure why but it should work on any character you pass
to it.
There's nothing wrong with using your own function, but you probably want to fix it so
it works properly
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
you can see my code with alpha in below post
Different results when , compare 2 strings and 1 str with 1 str from file
|
|
|
|
|
can i ask something the isalpha how it works?
i mean i want only A-Z a-z i dont want numbers and !@#$~>time
isalpha work for that?
|
|
|
|
|
That's exactly what it does. It returns non-zero if the character is A-Z or a-z.
To find something NOT alphabetic then look for it to return 0.
From the posts below, it doesn't seem that this is the problem. It looks like you need to step
through your code and see exactly what's going on and in what order
If you are looking for matching words then why are you looking for non-alpha characters.
Don't you want to look for whitespace?
MArk
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
whitespaces = " " ?
That means this site (Codeproject) wouldn't reveal in my search because it is between ( ) ?
i thought an alorithm if the letter in i isn't character + letter in (i-1) is character then we got a word
"yes i think works correctly but not in my code
so here with that algorith it would find 10 words
Well i will alt tab back to Visual studio and alchemy with isalpha
To find something NOT alphabetic then look for it to return 0. i think this helped me
|
|
|
|
|
By the way, you could replace the entire function with a call to _istalpha (isalpha/iswalpha).
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i had but it create a problem :P
|
|
|
|
|
it's so obvious that you forget to return after the loop.
You may think that it will definitely return inside the loop (it loops 26 times) but at compile time, the computer can't tell whether the loop will be perform or not. To the compiler, a for() loop is one kind of structure that can be ignored, that's why you have to put a return explicitly after the loop.
|
|
|
|
|
GameProfessor wrote: it loops 26 times
It loops once
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have developed an application and I am wondering how I can prevent the main window from being displayed in the task bar even when it is visible; I am writing in plain C/C++ (no MFC)
Thanks for your help,
--PerspX
|
|
|
|
|
|
put this code in your OnInitDialog function
ModifyStyleEx( hWnd, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW );
nave
|
|
|
|
|
Thanks!
I used the foll: call to hide the taskbar:
ModifyStyleEx(0, WS_EX_TOOLWINDOW,0 );
Helped loads,thanks again.
|
|
|
|
|
Perspx wrote: I am wondering how I can prevent the main window from being displayed in the task bar even when it is visible;
Have a hidden parent for the window.
|
|
|
|
|
this is the best option ModifyStyleEx( hWnd, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW );
|
|
|
|
|
Thank you for all of your replies
--PerspX
|
|
|
|
|
hi guys,
from my application i want to read a html page just say rediff.com and i dont have to show the page but from the page i have to read some number and display those numbers in my application. so the basic task is read a html page from net and look for a number value which is in a table, and after reading display that value and label of table cell in the application, any idea or any help
|
|
|
|
|
Have you looked into the IHTMLDocument interface?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|