|
How to create simple vc++ project?
kavita srivastava
|
|
|
|
|
Run Visual Studio (assuming you have VS2003 or later), select File->New->Project menu item, then choose Visual C++->Win32 node and select Win32 Console Application in the Templates frame.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Do you want to make console program or windows program?
|
|
|
|
|
|
There are no spoons simple VC++ projects.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I am working on UNICODE Built-MFC Application that have to display both
Thai and Japanese texts on dialog.
The ploblem is My application's dialog can only display the language that I set as
default language for non UNICODE program in Regional and setting.
e.g.
If I set language for non UNICODE program to thai , my dialog
will only display thai language correctly but the japanese text will be displayed as
?????.
But when I try to set control's caption using SetWindowText function,It work for
both thai and japanese language.
Are there any specific setting that I have to take care in order to make my dialog support both
language in resource edit mode ?
|
|
|
|
|
A suggestion: Use CWnd::SetFont () on the specific controls (like CStatic, CEdit) to set the Japanese controls to a Japanese font, and the Thai controls to a Thai font.
|
|
|
|
|
Then how can I create a control that have to display both thai and japanese ?
and having to call SetFont to every control on dialog seem to be a little to much work.
since I expect Visual studio to let me edit Control caption in dialog on the fly(in any language).
Please give me some advice.
Thank in advance
|
|
|
|
|
You could create two copies of the dialog; one for each language.
Another option: you can set the font in a loop that iterates through all the dialog's controls. This link: http://www.themssforum.com/MFC/iterate-controls/[^] tells how to do this.
I suggest you pre-create both fonts because creating a new font every time you do SetFont is slow.
|
|
|
|
|
Hi all,
I m working on VC++2005 ,MFC, SDI-Type Application.
When i m create my project i was no need of Print function so i was deleted Print("Print,Print Preview and Page Setup") Menu item from the Main menu.
But now i want to use them ,I m add all these in Menu. But it is not working.
Please tell me how can i use them.
I m waiting for ue Valuable suggestion.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Make a new project with the wizard and look in the rc-File to copy the needed data...
But to get fine results, as mentioned "you got to do your homeworks" and implement the event handlers & functions yourself.
Greetings from Germany
|
|
|
|
|
hi.. i have a string of format "name tom". how can i get out tom out of it.
regards
amit
|
|
|
|
|
You may search for the ' ' token, for instance (plain C )
char string[] = "name tom";
char * p;
p = strtok(string, " ");
p = strtok(NULL, " ");
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
What is the type of your string ? std::string, CString (MFC) or a plain char* (or TCHAR* or wchar*) ?
For the last one, take a look at strtok[^] (and choose the correct version depending on your UNICODE settings).
|
|
|
|
|
Thanks for reply.. it works
Regards
amit
|
|
|
|
|
If you are using of MFC you can use of CString::Mid or CString::Find and then CString::Right.
|
|
|
|
|
Hi,
How to display icon or bitmap at Menuitem???
I already tested codes below, but it's not working???
I got assertion failure error...
I need help???
private:
CBitmap m_bmpMenuFileNew; //File new bitmap (Checked and unchecked)
CBitmap m_bmpMenuFileOpen; //File open bitmap (Checked and unchecked)
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//Load the bitmap resource
ASSERT( m_bmpMenuFileNew.LoadBitmap( IDB_MENU_NEW ) );
ASSERT( m_bmpMenuFileOpen.LoadBitmap( IDB_MENU_OPEN ) );
//Access the application menu
CMenu* pMenu = GetMenu();
ASSERT( pMenu );
//Assign the icon
ASSERT( pMenu->SetMenuItemBitmaps( ID_FILE_NEW, MF_BYCOMMAND,
&m_bmpMenuFileNew, &m_bmpMenuFileNew ) );
ASSERT( pMenu->SetMenuItemBitmaps( ID_FILE_OPEN, MF_BYCOMMAND,
&m_bmpMenuFileOpen, &m_bmpMenuFileOpen ) );
return 0;
}
CMainFrame::~CMainFrame()
{
if( m_bmpMenuFileNew.m_hObject )
m_bmpMenuFileNew.DeleteObject();
if( m_bmpMenuFileOpen.m_hObject )
m_bmpMenuFileOpen.DeleteObject();
}
|
|
|
|
|
|
Hi,
As i have to to autocomplete in comboBox, i searched article in code project. I found that CComboCompletion demo.
I have one doubt in it.
In Dialog,Class Wizard..When i have to add member variable for combobox, I found CComboCompletion variable type in it.How its possible?
How can i add that type to Varialbe Type.
Anu
|
|
|
|
|
Include the class header file and then create a variable of the CComboCompletion class in your dialog code. This you would need to do manually.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Anu_Bala wrote: As i have to to autocomplete in comboBox
What exactly do you want to autocomplete? If you are looking for filepath auto completion then use ShAutoComplete[^].
Anu_Bala wrote: How can i add that type to Varialbe Type.
You can maybe add a CComboBox control variable and then rename it to CComboCompletion .
|
|
|
|
|
Anu_Bala wrote: ...I found CComboCompletion variable type in it...How can i add that type to Varialbe Type.
It's either there or it's not.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm trying to find out what strings to enter into the output filename field of the linker section of project properties in order to make my project always have the compile date included in the output filename. Preferably year first, then month, then day, as this will make the numbers increment more logically. Separators such as hyphens or underscores between the numbers are acceptable, but not necessary. The idea is that the compile date can act as a build number, and also will tell me at a glance which compile is from when, so I have an idea of what features are in the build based on when I compiled. I did try digging around in the help files, but as usual for MS, they should be called "no help" files.
CaptJosh
There are only 10 kinds of people in the world;
those who understand binary and those who don't.
|
|
|
|
|
I am not sure if you can do that in VS. One way to do this is to create a bat file in which you rename the generated executable file and run that bat file in post-build events.
-Saurabh
|
|
|
|