|
First, why would a dialog need access to the mainframe's statusbar ?
Second, I think that you need to have a parent window for a child dialog box, me think that win32 needs it ( I'm no expert on win32, so YMMV ).
If your dialog box doesn't have a pointer to the mainframe, you will need to keep a global variable to the mainframe ( either a variable, or a global scope function that returns a pointer to the mainframe )
one other way would be to use some kind of messaging mecanism, either with ::SendMessage/::PostMessage or with a Observer/Observable pattern.
for example ( high level pseudo code )
CDialog::DoSomethingToMainFrameStatusBar()
{
CStatusBar* pStatusBar = YourMainFrameManager::GetStatusbar();
}
CStatusBar* YourMainFrameManager::GetStatusbar()
{
return pMainFrame->getStatusBar();
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
What are you doing in the OpenReadFile()?
Did you try to check that whether the control is going in the if condition and yes for your information you don't have a loop in the code you posted.
Somethings seem HARD to do, until we know how to do it.
_AnShUmAn_
-- modified at 8:20 Thursday 11th May, 2006
|
|
|
|
|
Anu_Bala wrote: if (fod ==1)
{
BOOL OpenReadFile()
}
I think that it is better:
if (fod ==1)<br />
{<br />
OpenReadFile();<br />
}
|
|
|
|
|
Hi _Russell_
can you say whats question?why these question are hide(2 once)
|
|
|
|
|
I know that usually girls run away from me , but....
Do you know if it could be related with this men's behaviour?
|
|
|
|
|
I think you need to remove the BOOL in front of OpenReadFile. You are declaring a function inside the OnYes function. Of course, doing that won't call the OpenReadFile function
Anu_Bala wrote: But it does not get in to the loop
First, it's not a loop but a condition and second I think you didn't test properly if it entered the condition (you just checked if the function get called), am I right ?
|
|
|
|
|
Please, don't delete your post once you get an answer to your question. This is considered selfish. This forum is there to share information, how can people learn from your mistake if you delete your post ?
Everybody is doing mistakes, it's not something to be ashamed of.
|
|
|
|
|
|
toxcct wrote: look at his profile, you'll understand the character
|
|
|
|
|
|
Yes, but what's wrong with his profile ?
|
|
|
|
|
|
toxcct wrote: here[^] !
You mean that he's the No. "1" winner ?!
Maxwell Chen
|
|
|
|
|
|
Well said cederic, but as said by toxcct, she's been a real nonsense
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Yup! Did you check your mail buddy??
Which mail Buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Which "Which mail" buddy ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Which "Which mail" buddy ?
Mail you mention in your post
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Cedric Moonen wrote: Everybody is doing mistakes, it's not something to be ashamed of.
You are WRONG! It is something to be ashamed of!
Wait ... no you are correct, my mistake :->
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Hallo guys,with in 12 hrs you r people getting very tensed. Really iam very sorry...Yesterday I posted my question...But within 3 seconds i found out my mistake and i got solution.Thts why i deleted my message.When i deleted my question there was no answer.Thats why i deleted my question.
Just i deleted BOOL in front of the function call.I got solution.
Really Im very sorry, iam not selfish and nonsense...OK...
|
|
|
|
|
Hi,
What is good starting point to learn about RAS API's for Win2k (or) Does MFC contains RAS API's? Suggest me good book which teaches. Is RAS API's differ from OS to OS. I have to work on dial-up networking project which uses RAS API's.
|
|
|
|
|
subramanyeswari wrote: Does MFC contains RAS API's?
No.
The Remote Access Service Reference[^] might help.
also found this codeproject article[^] there may be more. Try Google.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Greetings.
I have modified the code from the Simultaneous Previewing & Video Capture using DirectShow written by Sivasagar K.R in www.codeguru.com (see below). When I run it, it uses the *ptr pointer to render the pixels on screen, but I want to analyse the pixels for each frame, rendering the analysed pixels.
In essence, I want to save the pixels (as I do in the array CurImaArr) and then do some analysis on them, maybe change some values, and then render them. Any ideas on how to do so?
Your help would be very much appreciated.
bool CVMR_Capture::Convert24Image(BYTE *p32Img, BYTE *p24Img,DWORD dwSize32)<br />
{<br />
<br />
if(p32Img != NULL && p24Img != NULL && dwSize32>0)<br />
{<br />
<br />
DWORD dwSize24;<br />
<br />
dwSize24=(dwSize32 * 3)/4;<br />
<br />
BYTE *pTemp,*ptr;<br />
pTemp=p32Img;<br />
<br />
ptr=p24Img + dwSize24-1 ;<br />
<br />
int ival = 0;<br />
int count = 0;<br />
int witth = 1;<br />
int hite = 0;<br />
int hites = 120;<br />
int greens = 0;<br />
for (DWORD index = 0; index < dwSize32/4 ; index++)<br />
{ <br />
unsigned char r = *(pTemp++);<br />
unsigned char g = *(pTemp++);<br />
unsigned char b = *(pTemp++);<br />
(pTemp++);
if ((witth <= 320) && (hite < 240))<br />
{<br />
CurImaArr [witth-1][hite] = g;<br />
}<br />
else<br />
{<br />
return false;<br />
} <br />
<br />
<br />
<br />
<br />
<br />
if (g > 150)<br />
{<br />
greens++;<br />
}<br />
<br />
<br />
*(ptr--)= 0;
*(ptr--)= CurImaArr [witth-1][hite];
*(ptr--)= 0;
<br />
witth++;<br />
<br />
if (witth >= 320)<br />
{<br />
witth = 1;<br />
hite++;<br />
}<br />
<br />
<br />
}<br />
<br />
<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
<br />
return true;<br />
}
|
|
|
|
|
Lessthannovice wrote: it uses the *ptr pointer to render the pixels on screen
Actually it doesn't. You can't use this method to do what you want. Build a filter graph with the Sample Grabber filter instead.
|
|
|
|