|
I know this is simple to most users but I am new at this.
I want to close down a dialog screen as soon as as an option to open another
dialog (using a button), so that I am only left with certain screens and not
access to all dialog screens.
Many thanx,
Phil
|
|
|
|
|
For each window use it's own DestroyWindow() function.
|
|
|
|
|
If it is a modal dialog, call EndDialog() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi there all experts!
I have an app where I want to access a string that is being set in a Dialog. I use MFC and the Doc/View structure.
I now want to be able to pass it on to the View class but I havent been able to do so.
The Dialog is an own class that I have included into my CvtkSDIApp.cpp file where all the others Doc/View/Frame are included. Look below to see
..
#include "MainFrm.h"
#include "vtkSDIDoc.h"
#include "vtkSDIView.h"
#include "StressesDlg.h"
...
I access the dialog from the mainframe
I have tried to add an getView function in my StressesDlg class to be able to get hold of the view string member that I want to use.
// CStressesDlg dialog
//forward declaration
class CvtkSDIView;
class CStressesDlg : public CDialog
{
public:
CStressesDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CStressesDlg();
CVtkSDIView * GetView();
private:
CVtkSDIView * GetView;
};
// and In my implementaion file
CVtkSDIView * CStressesDlg::GetView()
{
return View;
}
// it doesnt like this at all it doesnt recongiazie my view (CVtkSDIView) as a class.
//I have tired with and without forward declaration of the CVtkSDIView class in the dialog class as you can see above.
Regards,
peter
|
|
|
|
|
Hi Friends,
I have a small problem. I have a VB application which will call an .EXE file which is developed in MFC. While calling an EXE file it will pass the paramter to that EXE file. Problem is I have to create that .EXE file in MFC. I don't how to create a MFC applcation which accepts paramter.
Thanks in Advance.
Best Regards,
Promise
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Duplicate question
See the answer in the previous Question.
Regards
|
|
|
|
|
You can do this via the m_lpCmdLine member variable, or the __argc and __argv global variables. If you MFC application uses main() as its entry point, you can also use the first two parameters of it, typically argc and argv .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Can someone tell me how to get the address of bluetooth device(BT_ADDR )?
I'm tring to set up Bluetooth communication between my PC and another BlueTooth device using WinSock Extensions and in order to connect the other device i need thse address.
Regards,
Eli
|
|
|
|
|
Hi,
I have problem using MFC,
the software behavior until now was
Visual Basic process invoke dlls wrote in c++ that using MFC (DAO),
now I want to change the flow of the program
Visual Basic process invoke dll's of c++ ,the c++ dlls create new process that use again the dll's of c++
after the new process terminate(after he work properly), when he exit he fail when he try unload the dll
MFC42D in stage of checking memory,
two notes
1) in the release the problem not appear
2) when I run the process as independent procees (not invoked from his parent process)
the problem not appears
can someone have Idea what the problem
Thanks Aviv
|
|
|
|
|
If we reght click a file in Explore, we can see a context menu, one of sub-menu of the context menu is "send to" with a set of sub-menu items, such as "desktop (create shortcut)".
my purpose is to add a sub-menu similar to "send to" sub-menu - difference is: my sub-menu only applies to a centain file, i.e. .mytype.
if user reght clicks a file with extension of .mytype, my sub-menu appears, otherwise the menu is hidden (or not added).
every my sub-menu items associated with an application.
i.e. if user clicks sub-menu item 1, app1 is launched and so on.
how to do this?
thanks
includeh10
|
|
|
|
|
|
Hi Michael,
i read your article (part 1), i am very confused.
1) why does it associate to txt file only? i want to modify it to with .mytype, how to do?
2) it looks we need write SimpleShlExt.rgs mannually - if so, what is rule to write for other requirements?
thx
includeh10
|
|
|
|
|
includeh10 wrote:
why does it associate to txt file only? i want to modify it to with .mytype, how to do?
The extensions for which the extension is invoked depends on what keys you register the extension under. If you have these keys:
HKCR\.mytype
default value = "mytypefile"
HKCR\mytypefile\Shellex\ContextMenuHandlers with your extension listed under ContextMenuHandlers , then it will be invoked for .mytype files. Sorry, I didn't understand what you were asking in #2.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
|
|
|
|
|
|
i have serial class.while i use serial close function,my application is slow.
i want to know how to control my application more faster.
BOOL CSerial::Close( void )
{
if( !m_bOpened || m_hIDComDev == NULL ) return( TRUE );
if( m_OverlappedRead.hEvent != NULL ) CloseHandle( m_OverlappedRead.hEvent );
if( m_OverlappedWrite.hEvent != NULL ) CloseHandle( m_OverlappedWrite.hEvent );
CloseHandle( m_hIDComDev );
m_bOpened = FALSE;
m_hIDComDev = NULL;
return( TRUE );
}
|
|
|
|
|
How do I check whether it's summertime or wintertime for a given date x? How do I determine when switches between summertime and wintertime occur?
|
|
|
|
|
Well I still don't know how to easily check exactly when a switch between winter and summer time would occur, but I did figure out how to determine which one of the 2 is in effect at any given date x. The Daylight Savings Time flag indicates whether the current time for your locale is summertime (1) or wintertime (0), example:
<br />
time_t t1;<br />
time(&t1);<br />
struct tm * t2 = localtime(&t1);<br />
printf("DST Now:%d\n", t2->tm_isdst);<br />
t1 -= 7776000;<br />
t2 = localtime(&t1);<br />
printf("DST Then:%d\n", t2->tm_isdst);<br />
Still trying to find out exactly when shifts occur though.
|
|
|
|
|
The switch from summer to winter happens on the last Sunday of October at 2:am I think.
The switch from winter to summer on the last Sunday of March again at 2am
Hope this helps you..
Greets,
Davy
|
|
|
|
|
Anonymous wrote:
The switch from summer to winter happens on the last Sunday of October at 2:am I think.
The switch from winter to summer on the last Sunday of March again at 2am
Could be that a more i18n safe procedure is called for.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Only in the parts of the US that bother with the stupid thing. Several US states (or parts of states in at least one case) do not bother with it at all. Many countries around the world have their own date, which is not the same as the US date.
Better look for a different way to figure it out.
Best is to get everyone off the stupid idea. I have yet to hear a good argument for daylight savings time. Thats a different rant though, so I'll head over to soapbox someday and give it to those interested.
|
|
|
|
|
Look up GetTimeZoneInformation(), it fills a TIME_ZONE_INFORMATION structure where you can get the SYSTEMTIME of the daylight date and the standard date.
[edit] forgot to tell you that the return value actually tells you if it is daylight saving time or not.[/edit]
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
For this you'll need to read up on the winter and summer solstice:
http://scienceworld.wolfram.com/astronomy/WinterSolstice.html
http://scienceworld.wolfram.com/astronomy/SummerSolstice.html
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
If you actually mean what the season is, not just the daylight saving time flag, there isn't a single algorithm for it since different countries define the seasons differently. Ie if you try to tell someone in Australia that December 25 is in the winter, you'll get weird looks.
Also, some countries like the US define the seasons based on the solstices and equinoxes, while others change seasons on the first of the month every 3 months.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
|
|
|
|
|
shellext is a sample in sdk of MSDN.
i modify the sample but VC refuses to compile sample with my modification.
if i delete all obj files and output file from Explorere manually then re-compile it, VC doesn't re-generate any obj and output files but displays info of "no error" - actually there are some code errors because i added errors for testing.
how to re-compile it with my code?
cheers
includeh10
|
|
|
|
|
includeh10 wrote:
i modify the sample but VC refuses to compile sample with my modification.
What do you mean by "refuses?" That's a fairly vague term.
includeh10 wrote:
...VC doesn't re-generate any obj and output files...
Are you looking in the right spot for them? They may not necessarily be in the project's folder.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|