|
|
That looks like it should work perfectly.
Thanks Michael!
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
Well, there is another way instead of using control variables:
From MSDN:
<br />
CWnd::SetDlgItemText(int nID, LPCTSTR lpszString);<br />
So you would be able to type and run this:
<br />
SetDlgItemText(MY_RESOURCE, "I am alive");<br />
Applying this to your source code would be:
<br />
SetDlgItemText(MY_RESOURCE, "This is my first text");<br />
Sleep(1000);<br />
SetDlgItemText(MY_RESOURCE, "This is my second text");<br />
Sleep(1000);<br />
Hope it helped.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
while ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Hi there
I have a CFrameWnd with a CTreeCtrl and a CListCtrl ... If a user selects a control it automaticly got the focus (Yes its the truth ) ... but how to determine which control got the focus?
Thanks for reading
|
|
|
|
|
|
You could do something like this:
<br />
CWnd* pWnd = CFrameWnd::GetFocus();<br />
Then you can work with pWnd, when really you are working with the control that has the focus. For testing purposes you can try this:
<br />
CWnd* pWnd = CFrameWnd::GetFocus();<br />
<br />
pWnd->SetWindowText("THIS WORKS MAN !!");<br />
Hope it helped...;)
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
while ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
thank you both for answering and helping
|
|
|
|
|
I'm looking for a way to limit the tcp/ip bandwidth of an application (or set of applications) from another application.
Basically I need to provide the facility to limit the upload and download KBytes/Sec of a set of processes, with the limits set by the application I am writing.
I know this is possible (as there are a number of applications out there that can do this, www.netlimiter.com is one example), however I need to be able to include the functionallity in my own program.
Any suggestions of what approach to take, where to look for ideas etc...?
Thanks...
Blade[DMS]
|
|
|
|
|
If it will help in your search, this technique is often called 'throttling'.
Elaine
The tigress is here
|
|
|
|
|
Thanks... Thats the word I was looking for
So far my search has lead me to "Packet Filtering" with potential solutions here on codeproject[^] for Win XP and 2000.
Not sure if this is the right direction to head yet tho...
Blade[DMS]
|
|
|
|
|
|
I'm currently modifying a program originally written in C, and I'm fairly inexperienced in programming using MFC and Visual C++
I have a class that gets read in from a menu command, which works OK.
How can I access this class from the automatically generated View classses so that I can display it?
Any help and/or comments are welcome
Keck
|
|
|
|
|
If you have the class in your document class use GetDocument() in your view class to get a pointer to the document and access the member variable from there.
John
|
|
|
|
|
Thanks - I realise now exactly what's going on in this case
thank you again
Working as intended
Keck
|
|
|
|
|
Hi, i want to block net access in pc (in a local network)
this pc connect to web althrought Proxy or connection
sharing. Can anyone help me, thank for advance.
|
|
|
|
|
Program the router to do so. For non sophisticated users, set up a firewall on the PC in question.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
I'm curious, is the intent here to keep another student or classmate from accessing the Internet?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thank, for your humour, but i search for this idea to
include it in my software dedicated for CyberCafe .
|
|
|
|
|
I see that when I step into OnHScroll() upon clicking the slider (not even sliding it, just clicking it) why does it step in three times and then finally show the adjusted display after exiting onHScroll?
Thanks,
ns
|
|
|
|
|
I saw that the third time, it steps in with nPos coming in as 0!!! Even though I scrolled right quite a bit, and nPos is NOT 0!. The nSBCode is END_SCROLL. Got around the problem by skipping the third step-in, but in another part of my project where the slider and SetBrightness() function both are in the same class (here they are in two different classes), the third time also, nPos is non-zero and really what it should be.
void CDlgSettings::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
pSld = (CSliderCtrl*)pScrollBar;
if (pSld !=0 && nSBCode != SB_ENDSCROLL)
{
if(*pSld == m_sliderBright)
{
m_pParentWnd->SetBrightness(nPos);
}
m_pParentWnd->DisplayLocal();
}
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}
thanks,
ns
|
|
|
|
|
As Mike Dunn (I think) already pointed out, you should be doing using GetPos() to get the slider's current position and not the message-specific nPos value.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Yikes! I didnt see that response about SetPos.,.....
Thanks much! I must have missed it over the weekend.
|
|
|
|
|
ns wrote:
I must have missed it over the weekend
What!? You don't work weekends!? Oh I forgot, you're normal.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
haha! You are so funny!
Revamped my project yet again.....waiting for something new, but keep ripping up the current one and redoing it. Did a QT project a while ago.
The HScroll issue was so perplexing. Wonder why nPos cant be relied on....
|
|
|
|