|
I am building an application; Along with the main SDI window it has a modeless dialog, SDI has system menu but the modeless dialog has no system menu icon; (upper left part of task bar), although I have selected system menu and taskbar options in the dialog properties.
How to add system menu / icon in a modeless dialog?
Please Help.
|
|
|
|
|
Is it a child and is that selected?
"Naked we come and bruised we go."
- James Douglas Morrison
Best Wishes,
ez_way
|
|
|
|
|
Thanks for reply;
I have created dialog in the OnCreate of CMainFrame like this;
mydlg.Create(IDD_MYDLG, this);
In the properties tab the style of dialog is POPUP not child;
making it child donot displays it.
|
|
|
|
|
Hi,
I want to execute the function for evry 3 minuts.How can I call the event multiple times in this regard?
Please help me.
dadsadasd
|
|
|
|
|
Hi
Add a event handler of WM_TIMER. Create a ID for the particulare timer, ie for 3 minutes say, IDT_TIMER1.
On the initialization part of your application call
SetTimer(IDT_TIMER1,18000,NULL);
Now call the function inside the event handler for WM_TIMER.
Check for the nIDEvent with IDT_TIMER1 if you have multiple timers in your application.
Hope this would help you
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
zainu wrote:
SetTimer(IDT_TIMER1,18000,NULL);
You might want to change that to 180000.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
It's possible set a file dialog (CFileDialog) to let select to user only directories?
I want to do this to choose the work directory of my software.
Somebody can help me?
Thanks a lot
|
|
|
|
|
|
Or here's a function that i use to return the folder name in a CString:
CString GetFolder()
{
LPMALLOC pMalloc,pMalloc2;
CString strDirectory;
BROWSEINFO bi;
CString strPath1,strPath2;
char pszBuffer[MAX_PATH];
LPITEMIDLIST pidl;
bi.hwndOwner = GetDesktopWindow();
bi.pidlRoot = NULL;
bi.pszDisplayName = pszBuffer;
bi.lpszTitle = _T("Select First Directory");
bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
bi.lpfn = NULL;
bi.lParam = 0;
if (::SHGetMalloc(&pMalloc) == NOERROR)
{
if ((pidl = ::SHBrowseForFolder(&bi)) != NULL)
{
if (::SHGetPathFromIDList(pidl, pszBuffer))
{
strDirectory = pszBuffer;
}
pMalloc->Free(pidl);
}
pMalloc->Release();
}
return strDirectory;
}
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Hi,
How do I add an unicode support to a code.
also when i build I would need the project configuration list to seperately display one with unicode, other without unicode.
How do i add this "w / without unicode" entry in the project configurations.
thanx,
hiva P
|
|
|
|
|
I have an executable file which was compiled in debug mode.
When I run it in debug mode, I get an error message before the code even seems to execute (InitInstance on my CWinApp class doesn't even get called). The error message says: "C:\path\to\filename.dll" File not Found.
This filename.dll is the output from another project I have, but the 2 projects are unrelated.
If I run the same exeutable file in non-debug mode, then there are no issues like this.
Does anybody know why my application might be trying to link up with this filename.dll ? Does VC++ have someplace where it keeps the list of DLLs it tries to link with at runtime?
Any and all help appreciated.
|
|
|
|
|
Hi
Please look into Project->Settings->Link, Object/Library modules is empty or not.
Hope this would help you.
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I'm loading:
advapi32.lib
So, this isn't the issue.
|
|
|
|
|
Howdy - I've got the code I need to add and remove menu items that I need, but I'm not sure where to place this code.
Using an SDI MFC app, what message do I handle to know that the user dropped down a menu in the main menu?
Thanks!
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
Please, try out WM_INITMENUPOPUP. It is useful to modify popup menu at runtime
|
|
|
|
|
I guess I overlooked that one, Thanks!
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
My application is MDI application.
So,I cannot know what parameter use in following code???
m_tabPages[0]->Create(CMyTabDlg,this);
>>>>>>>>>>>>>>>This is my error>>>>>>>>>>>>>>
MyTabCtrl.cpp(54) : error C2275: 'CMyTabDlg' :
illegal use of this type as an expression
MyTabdlg.h(13) :
see declaration of CMyTabDlg'
>>>>>>>>>>>>>>>This is My code>>>>>>>>>>>>>>>>
//MyTabCtrl.cpp
CDialog *m_tabPages[2];
//MyTabCtrl.cpp
void CMyTabCtrl::Init()
{
m_tabCurrent=0;
m_tabPages[0]->Create(CMyTabDlg,this);
//what i use parameter
m_tabPages[1]->Create(CMyTabDlg,this);
//what i use parameter
m_tabPages[0]->ShowWindow(SW_SHOW);
m_tabPages[1]->ShowWindow(SW_HIDE);
SetRectangle();
}
//MyView.h
CMyTabCtrl m_tab;
//MyView.cpp
void CMyView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
m_tab.InsertItem(0, _T("One"));
m_tab.InsertItem(1, _T("Two"));
m_tab.Init();
}
|
|
|
|
|
As I thought, CMyTabDlg was a class name, not variable name, so that, it is illegal to appear as a function argument.
|
|
|
|
|
//CMyTab
//MyTab.h
CDialog *m_tabPages[2];
//MyTab.cpp
m_tabPages[0]->Create(CMyTabDlg,this);
My demo is MDI application.
i have a class.This is CMyTabCtrl,
i found codeproject web site.
this demo is dialog base application.
i run this demo is ok.
and i making mdi application.
and use this class.
but i don't know.what parameter place in
"CWnd* pParentWnd".
>>>>>m_tabPages[0]->Create(CMyTabDlg,this);
>>>>>function argument(CDialog::Create)
BOOL Create( LPCTSTR lpszTemplateName,
CWnd* pParentWnd = NULL );
|
|
|
|
|
BOOL Create( LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL );
In this case, the first argument typed string?
|
|
|
|
|
Yes!!!
i change.................
m_tabPages[0]->Create(IDD_MY_DLG,this);
thank you so much...........
|
|
|
|
|
Can you make me a program in C++ that taking the inverse of a matrix using Gaussian Elimination?
|
|
|
|
|
if you aren't going to sell or distribute the source code you can use or modify the source from numerical recipes http://www.library.cornell.edu/nr/cbookcpdf.html
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
you're nicer than i am mate
i'd have told him to bugger off and do his own homework
cheers
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
C++ Seeker wrote:
Can you make me a program in C++ that taking the inverse of a matrix using Gaussian Elimination?
I assume you mean Gauss-Jordan elimination, but I wouldn't do it that way. It works, but it's very unstable. A much safer way would be to use LU decomposition.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|