|
You can create dynamically the button (I mean, not through the resource editor but by calling the Create member function). Then, you can use the ON_COMMAND_RANGE[^] macro to specify a range of ID. Don't forget to 'reserve' this range in resource.h.
|
|
|
|
|
wow, It's really a wouldful method!
thany very much.
|
|
|
|
|
i m just a beginer in c++ language and my teacher has asked me to think about a project to work on it.What are the general as well as simple projects for a beginer like me to work?can u please suggest some??
|
|
|
|
|
What are u doing ?? which degree ?? & yr intrest ???
|
|
|
|
|
homework!?
Can you be more specific
you need to one project that work on it?
well what problem? you should select one subject and work on it and if you have problems then we can help to you
you said one suggestion but what? easy hard
|
|
|
|
|
i just need a simple project especially related to medical science.Due to lack of basic knowledge on c++ nothing is striking my help.
I would be thankful if u suggest some.
|
|
|
|
|
I suggest that you can see LSA i think its good
whitesky
|
|
|
|
|
Talking in a general layman's term a simple application could be to develop an application that is based on MFC.
The application can have 4-5 odd dialogs and controls like list box , listcontrols, edit boxes etc. If you want to have a database like support use the database api's to connect to MS-Access or whatever you choose. You can also go for using file handling if you have limited amount of data.
Using the above functionality you can develop a project related to management of some organization etc.
And if you want to develop advanced applications try using ATL, COM etc and the rest is upto what extent you can put you efforts in and how quickly you pick up the facts related to these technologies.
IF you want to create graphical applications like a speedometer etc you can use directx or openGL
_AnShUmAn_
|
|
|
|
|
Hi,
Try to think of something that interests you and that you could write some software to help you with. For instance if you likes music then a database of your music collection or it you liked travel you could write a currency convertor. With a little imagination you can make these simple projects as complex as you need for a starter project.
If you simply cannot think of anything relating to you personally, then write a simple game such as 'Noughts and Crosses'.
Hope I've sparked a few ideas, good luck with your studies,
Ali
|
|
|
|
|
|
As a beginer, you can make simple console based Point of Sale system. Other options are Student Registration System, Library management system etc.
You can make them either console based or using MFC.
Good luck
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
subikchya wrote: What are the general as well as simple projects for a beginer like me to work?
The project which prints "Hello world!" on the screen!
Maxwell Chen
|
|
|
|
|
First my program and very nice but its not good for project
|
|
|
|
|
WhiteSky wrote: First my program and very nice but its not good for project
Every newbie has to experience the pleasure of "Hello world".
Maxwell Chen
|
|
|
|
|
I am new to VC++ and MFC and not very much strong on it... I am having this problem.
I have a dialog application which contains a ListView control. I want to have the column names in Urdu. so here what I do.
TCHAR szCol7[] = {0x6A9, 0x644, 0x20, 0x646, 0x642, 0x637, 0x6C1, 0x20, 0x62C, 0x627, 0x62A} ;
As my Dialog class, UrduAppDlg contains the ListView contorl, what I do is that place the above mentioned defination of Unicode string in UrduAppDlg.h file before the clas defination... Right? So far so good... But when I build the solution, I get the following error
UrduTextAnalyzer error LNK2005: "wchar_t * szCol7" (?szCol7@@3PA_WA) already defined in UrduTextAnalyzer.obj
But placing the same defination in UrduTextDlg.cpp does not create any problems and I get my job done... Please tell me what this phenomen is and why? Where should I put such data like col names? I cannot use resource compiler I think becuase Its not Unicode compatible I think... Please guide me in this regard.
Mohsin
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
I guess you have accidently included the .cpp file instead of the .h file or you have forgotten to add #pragma once to the top of the .h file.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
I think the reason is that szCol7 is defined in a header that is included in multiple .CPP files and thus defined multiple times. Use something like this instead:
TCHAR szCol7[] = {0x6A9, 0x644, 0x20, 0x646, 0x642, 0x637, 0x6C1, 0x20, 0x62C, 0x627, 0x62A} ;
extern TCHAR szCol7[];
You include the header file into and .CPP file from which you want to access szCol7 .
Steve
|
|
|
|
|
yes i agree with Nibu thomas i guess you have forgotten #pragma once in header file
or change location szCol7 from header file
|
|
|
|
|
#pragma once or not you can define an array twice in two compilation units. Try this for example.
#pragma once
char g_hello[] = "Hello";
#pragma once
char g_hello[] = "Hello";
#include "a.h"
#include "b.h"
This code will result in "error C2374: 'g_hello' : redefinition; multiple initialization".
Steve
|
|
|
|
|
yes I misread this error with another error but...
|
|
|
|
|
Thats right, I have #pragma once included at the top of my header, and I am including .h file not the .cpp.
However, extern solution worked very well... But the question is that extern only is giving declaratin, not defination... is it? Then is any need to declare the arrays in the header file using extern keyword and then redefine the arrays in a cpp file where they are needed?
Please explain a little logic behind this and what role the extern keyword has to play there?
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
extern tells your compiler that this symbol is defined elsewhere and not to worry about it if it can't find it in this compilation unit (object code). Basically it passes the problem to the linker.
If you have more than one definition for this symbol in separate cpp files the linker will complain that the symbol is already defined. This is what will happen if you try to define your array in more than one cpp file.
If you have no definition for this symbol in all your cpp files the linker will complain that it can't find the symbol.
In certain cases where it is desirable to have the definition in the header file, you can use __declspec(selectany) to indicate to the linker that if it finds multiple symbols, to just pick one.
|
|
|
|
|
A good concise explanation. The only thing missing is to point out that __declspec(selectany) isn't portable; but I guess that would be obvious to most as it's a __declspec .
Steve
|
|
|
|
|
hi ,
I am not able to Diable the Restore Button (Minimize, Restore,close) of a SDI Application. Even though I have Disabled the Close Button By removing it from system Menu.But when i apply the same Procedure to Restore Buitton I am not able to Do tht.
also, wht will be the Procedure to do the same in MDI Application.
Vinod C S
Integral Softech Technnolges
Kochi
|
|
|
|
|
An option is to handle the SC_RESTORE message in PreTranslateMessage (...).
Once you handle it make sure you don't call Base class handler. Return TRUE . This way you can disable the behavior of SC_RESTORE but the button remains there.
Another option is to use Brute Force (Remove the System Menu itself) :evilgrin:
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|