|
I have design the menu bar for dialog based application.
When compiling there is no error.But it is not displaying in the run time.
What to do if i want to display menu bar at run time in dailog box
Thanks
|
|
|
|
|
how did u set the menu to the dialog?
nave
|
|
|
|
|
in resource tab right click the IDD_WARTZ_DIALOG ->insert menu->menu login function
|
|
|
|
|
Did you mention the id of the menu in the menu property of the dialog?
-- modified at 0:26 Thursday 3rd August, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
You have created a menu. The id of the menu would be IDR_MENU1 or something similar to this unless you have changed it. Right click on the dialog. Go to properties and in the menu option mention the id of the menu IDR_MENU1 in this case. Compile and Execute. You will see the menu.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
right click on the dialog box( not in resources tab). Take properties.
In the genearal tab, there will be a combo box with name Menu. Ffrom that combobox, select the menu u want to set,
Buid and run the application.
nave
|
|
|
|
|
Can you show your code that you insert menu to your dialog
|
|
|
|
|
Hello all,
I have several CWinThread which I created using
AfxBeginThread
m_bAutoDelete = FALSE
ResumeThread
After I perform WaitForSingleObject and time out occur (which mean the CWinThread is still running), can I still safely delete them?
Thank you very much
|
|
|
|
|
|
|
I am in the process of writing a very simple MDI application that uses CDAORecordset and CDAORecordView classes to talk to an Access Database. I have created 2 sets of derived classes CRequestSet, CRequestDoc, CRequestView, CContactSet, CContactDoc, and CContactView. I have created the Document templates for both documents and added them.
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_REQUESTTYPE,
RUNTIME_CLASS(CRequestDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CRequestView));
AddDocTemplate(pDocTemplate);
pDocTemplate = new CMultiDocTemplate(
IDR_CONTACTTYPE,
RUNTIME_CLASS(CContactDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame for contact
RUNTIME_CLASS(CContactView));
AddDocTemplate(pDocTemplate);
I have also created the required additional resource files. I have found how to have the application start with no active documents, and how to not have the popup display when I select new from the menu.
I have added new menu entrys in the IDR_MAINFRAME menu resource IDD_ACTION_NEWREQUEST, and IDD_ACTION_NEWCONTACT. What is the code necessary to have the application create a new CContactDoc document when the IDD_ACTION_NEWCONTACT is clicked, and a new CRequestDoc document when the IDD_ACTION_NEWREQUEST is clicked.
I am a newbie so any background information and explaination will be greatly appreciated.
Thanks,
Clint
|
|
|
|
|
I think you have to keep pointers to your CMultiDocTemplate objects in your application class. Then when you need new empty document, simply call:
pDocTemplateRequest->OpenDocumentFile(NULL);
or
pDocTemplateContact->OpenDocumentFile(NULL);
I hope this helps.
|
|
|
|
|
Will this work for multiple Document templates, and if so how?
thanks
|
|
|
|
|
Hey all,
I want to display set of values in the listbox in my project.
How do I do to diplsy the values with proper spaces between them so that the "=" is spaced equally on all the lines. this makes it more easier to read.
say: like this:
fruit = 5
tomatoes = 6
Thanks in advance.
|
|
|
|
|
My suggestion is to use List ctrl instead of Listbox so that the item can be displayed in two columns.
nave
|
|
|
|
|
hey thnaks for ur resposne
but how do i use listctrl. do u have any example?
|
|
|
|
|
thathvamsi wrote: listctrl
Add a list control from the toolbox.
Create control variable of the list control and then use InsertItem etc to create columns of the list control in the OnInitDialog()......
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See
<br />
m_List1.InsertColumn(0,"Test2");<br />
m_List1.InsertItem(0,"Test1");<br />
maybe it is some helpful to you also you can see examples in msdn from CListCtrl Class[^]
|
|
|
|
|
How do I create columns?
I have created a listcontrol using toolbox and have chosen the property to be of report view and then created a variable called m_recd for it. and then now what message function do i add and what do i do to create columns and then items.
I want to have 2 columns. How do I add title to it?
Can u send some code snippets if possible.
|
|
|
|
|
m_recd .InsertColumn(0,"Column1",LVCFMT_LEFT, 100 );// first column
m_recd .InsertColumn(1,"Column1",LVCFMT_LEFT, 100 );// 2nd column
nave
|
|
|
|
|
See
<br />
LV_COLUMN lvc;<br />
lvc.mask = LVCF_FMT | LVCF_WIDTH |LVCF_TEXT| LVCF_SUBITEM;<br />
lvc.fmt = LVCFMT_LEFT;<br />
lvc.pszText = CA2T("Col1");<br />
lvc.cx = 50;<br />
<br />
m_List1.InsertColumn(0,&lvc);<br />
m_List1.InsertColumn(1,"Col2");<br />
m_List1.InsertColumn(2,"Col3");<br />
<br />
m_List1.InsertItem(0,"One");<br />
m_List1.InsertItem(1,"Two");<br />
m_List1.InsertItem(2,"Three");<br />
|
|
|
|
|
I am doing secondary programming on a CAD software with its API, and need to execute the command in the context menu of the CAD software programmatically, just like I manully right click a item and select a command.
I don't have any clue to do that now, and if it takes too many words to explain, could you please recommend me some material to read.
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
You have to chk that in the CAD api itself to see whether they provide such an extendebility.
cheers..Milton KB
|
|
|
|