|
Add a menu to resource and then on your code use of LoadMenu and SetMenu
|
|
|
|
|
where is your problem, to design a menu, or to affect it to a dialogbox ?
|
|
|
|
|
Hi.
I have a ready made menu IDR_MAINFRAME created by AppWizard.
So my problem is to load this menu on the Dialog box at the upper right portion of dialog window.
Thanks
Sameer Thakur
|
|
|
|
|
Right click on the dialog box, take properties. You can find a combo box called, Menu. Select IDR_MAINFRAME from the combox. close the properties dialog and build the project.
nave
|
|
|
|
|
Hi Nave.
Mannn that was easy wasn't it. Thanks.
But my requirement is to load this menu dynamically. I mean depending upon the requirement, I want to keep this menu changing.
i.e. For situation -->1 menu = IDR_MAINFRAME
For situation -->1 menu = IDR_ANOTHER
and so on....
Thanks
Sameer Thakur
|
|
|
|
|
ok.
1. The create a member variable of class CMenu in your dialog.
2. In the Oninitdialog function, call LoadMenu with the resource you want( IDR_MAINFRAME or IDR_ANOTHER )
3. Now call SetMenu function and pass the pointer of the CMenu object.
eg .
m_Menu.LoadMenu( IDR_MAINFRAME );
SetMenu( &m_Menu );
nave
|
|
|
|
|
Thanks Nave,
It worked
Sameer Thakur
|
|
|
|
|
hi,
can anybody tell me about VC++ free online exam/certifaication?
VC++,MFC,Win32.......online exam.
Thanks & Regards
Rakesh
|
|
|
|
|
Hi,
I want to read unicode file its content is hindi/english/japanese lang. and file is read into japanese Operating systems.can you please tell me something about this topic?
can you please help me on this asap?.
thanks in advance!
Thanks & Regards
Rakesh
|
|
|
|
|
|
thanks you man i suppose it will help.
i will look into it and get back to you soon.
Thanks & Regards
Rakesh
|
|
|
|
|
if the file is unicode, Only thing you have to do is to pass a wchar_t pointer to the read function.
nave
|
|
|
|
|
yeah you are right
read like that is ok.
so it support unicode format.
Thanks & Regards
Rakesh
|
|
|
|
|
yes. If u do so, you will get the unciode string in the buffer. And What you want is to display it in the edit or some other controls, you neeed to define _UNICODE in your project settings
( Project->settings->Preprocessor definitions )
nave
|
|
|
|
|
Hi,
I have a class which needs to link with the .lib file. The .lib is added in the project settings (Library option). It is compiling perfectly. BUt while building the exe, linker error is thrown and also the following warnign is displayed during compilation for all the member functions of the dll.
warning C4251: '<csample::m_var' :="" class="" 'std::basic_string<_elem,_traits,_ax="">' needs to have dll-interface to be used by clients of class 'csample'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>
]
Please validate.
Thanks
Raji
|
|
|
|
|
You should also make sure that the where this lib file is located (which directory. Fill up the library direcctory
|
|
|
|
|
Main window is a dialog, and two modeless dialog with popup property are created.
now, I want to get the top one when one overlaps another.
|
|
|
|
|
eat_union wrote: I want to get the top one when one overlaps another.
overide the PreTranslateMessage function of the main dialog and handle the WM_WINDOWPOSCHANGED messages of the child windows.
nave
|
|
|
|
|
thanks!
I'll try it out.
best regards!
|
|
|
|
|
what is "defeat image processing"? Do you know code of it?
|
|
|
|
|
What is google ?
Never heard of it, BTW ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello.
Im trying to open a file to read some data using VC6 MFC. The problem is that I dont know how to go about after getting the pathname.
<br />
void CMyExtractDataDlg::OnFileOpen() <br />
{<br />
<br />
<br />
CFileDialog m_ldFile(TRUE); <br />
<br />
if (m_ldFile.DoModal() == IDOK)<br />
{<br />
m_filePath = m_ldFile.GetPathName();<br />
<br />
UpdateData(FALSE);<br />
}<br />
<br />
}<br />
Should I get the filename as well or is pathname alone sufficient? How do i go from here?
Thanks in advance.
|
|
|
|
|
It's good programming practice to always use fully qualified filespecs, i.e. use GetPathName() .
/ravi
|
|
|
|
|
Use can use CStdioFile for file operations
Known is a drop, unknown is an ocean
|
|
|
|
|
ReturnRain wrote: The problem is that I dont know how to go about after getting the pathname.
Once you have a file name then call yout Application class's
OpenDocumentFile(m_filePath);
i.e. theApp.OpenDocumentFile(m_filePath);
I think this will serve the purpose.
Sameer Thakur
|
|
|
|