|
Do search in Code project(CP). Plenty are available.
Nibu thomas
Software Developer
|
|
|
|
|
You can show or hide a window by CWnd::ShowWindow (nShow); where nShow is either SW_SHOW or SW_HIDE. You need to use modeless Dialog boxes in order to be able to pass command from one dialog to another.
William
|
|
|
|
|
Hi All,
Does anyone have any idea as what and all could be the drawbacks of MFC's.
Regards
|
|
|
|
|
Programs created with MFC expects supporting MFC dll in the target system. and when compared with Win32SDK programs , MFC weighs a little more heavier.
Expect these, MFC doesn't give you any other drawbacks. and BTW when you compare in the reverse way, i mean, when you look at the
complexity of a Win32SDK program, you'll realize how affordable the few extra KBs are. MFC has everything readymade. it just tells you wheels have been invented already.
VuNic
|
|
|
|
|
It's not 100% compliant to C++ standards. However, that is only a drawback if it negatively affects what you are doing. For the projects that I have been working on since 1993 or so, being compliant was not a requirement. Your requirements may be such that compliance is a must.
There are others, too. Folks that prefer STL will no doubt have more to say on the subject.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Looks like homework
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
HI,
Thanks In Advance.
I am creating a Dialog Based Application for getting the current Time and displaying the time in the Edit Box. I got it using COleDateTime class. But i want to get the seconds Edit Box to be Updated continuously.I mean the application to be in running state.
void CTimeDlg::OnTime()
{
COleDateTime d,t;
d = t.GetCurrentTime();
m_hour = d.GetHour();
m_min = d.GetMinute();
m_sec = d.GetSecond();
UpdateData(FALSE);
// I tried the below line but in vain.
// I realized that OnTime() method is BN_CLICKED event
OnTime();
}
Here i want to call the OnTime() method repeatedly. Is it possible to do so?
Helping others satisfies you...
|
|
|
|
|
|
Look up the SetTimer API - It should do the trick.
Steve
|
|
|
|
|
beat me to it
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Yeah, but you went into more detail - I was going to but I was too lazy.
Steve
|
|
|
|
|
Stephen Hewitt wrote: I was going to but I was too lazy
Nah generally you are not, you helped me a lot in the ATL forum
thanks
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I think you want to display the current time in a EditBox
Use SetTimer to Set a Timer preferable in OnInitDialog
SetTimer(2500,1000,NULL);
this is fire WM_TIMER every second
Use ClassWizard to handle WM_TIMER message
.....::OnTimer(UINT nIDEvent)<br />
{<br />
<br />
CDialog::OnTimer(nIdEvent);<br />
}
This is probably not the best way (cause of the delays) but will work
Hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
WonderFull!!!!
it is working.
Thanks a lot.
Helping others satisfies you...
|
|
|
|
|
Hi to All,
Can anybody explain what is a Simulator. What is the purpose of it. How to create it in VC++. Is there any relation between Service and a simulator. please help me in this regard.
Thanks
|
|
|
|
|
|
Dont ask plain when you talk about simulators. it has a *wide* meaning. In what context you wanna know about simulator?? a Mobile device??
VuNic
|
|
|
|
|
I dont even know that. When i start my system two simulators called Clinical and NonClinical are getting activated. (I guessed that)With that only I am able to get data for Clinical and Non clinical data.
|
|
|
|
|
Hello snprani,
A simple meaning of simulator is virtual world.
In simulater you can create a real environment effect virtualy.
It is use for testing of device, Training & many more places.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Hi,
under VC6 in a SDI project i want to have the question label (for context help) in the caption bar (in neighbourhood to min/max/close-Button) *but* in the main program window (not in normal dialog boxes .. that's easy). I tried much code with ModifyStyleEx() but nothing worked. Is it possible without writing complete new classes? Has anyone a sugguestion for a simple solution???
Thanx!!!
Greetings from good old germany ... from Frank
|
|
|
|
|
The WS_EX_CONTEXTHELP extended window style is not compatible with the WS_MINIMIZEBOX or WS_MAXIMIZEBOX styles. The context help icon isn't displayed on the caption as long as one or both of the minimize or maximize boxes is displayed. The same thing happens with dialog boxes using the DS_CONTEXTHELP and the WS_MINIMIZEBOX or WS_MAXIMIZEBOX styles.
Note that the window must have the WS_SYSMENU style.
Nibu thomas
Software Developer
|
|
|
|
|
Make sure the windows has the WS_EX_CONTEXTHELP style. This is an extended style. If you use ModifyStyleEx you may need to add code as follows to make the change take effect:
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED);
Steve
|
|
|
|
|
Hi Stephen,
thanx for that, but can you tell me in which module in the SDI project i have to place this code?
Frank
|
|
|
|
|
No, sorry - I'm not even sure it will work.
Steve
|
|
|
|