Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalonwner draw button Pin
FarPointer30-Sep-05 1:02
FarPointer30-Sep-05 1:02 
AnswerRe: onwner draw button Pin
Bartosz Bien30-Sep-05 1:12
Bartosz Bien30-Sep-05 1:12 
Questionadministrative privileges of SCSI Pass through Pin
Chandler2530-Sep-05 0:26
Chandler2530-Sep-05 0:26 
AnswerRe: administrative privileges of SCSI Pass through Pin
Chandler252-Oct-05 16:18
Chandler252-Oct-05 16:18 
Questionprinting from CScrollView Pin
vikas amin29-Sep-05 23:33
vikas amin29-Sep-05 23:33 
QuestionHow to add a bullet to the text ? Pin
Amarelia29-Sep-05 23:16
Amarelia29-Sep-05 23:16 
AnswerRe: How to add a bullet to the text ? Pin
mark novak30-Sep-05 2:32
mark novak30-Sep-05 2:32 
QuestionAny better solution to solve this? Pin
G Haranadh29-Sep-05 23:04
G Haranadh29-Sep-05 23:04 
I have one function with 3 parameters.
In that function I have one switch case statement which depends on first parameter of my function. Nearly the cases are 28 to 30. For each case there is another sub switch case which depends on the second parameter of my function with more cases. For different cases I am allocating different classes memory in one class object. At last the function returning that object. For this concept implementation is there any simple implementation or any other logic, any template. The cases are increasing because of new implementations. Expecting some better solution.

The sample code is:

CMyCls* CEmr:GetCls(DWORD dwDId, DWORD dwClsId,BOOL bFe)
{
      CMyCls* pCls = NULL;
      switch (m_byClsFamily)//data type is BYTE
      {
            case _FAMILY_1_:
                  switch (dwClsId) 
                  {
                        case 0x8242:
                        if (bFe || (dwDId == DB_18C453))
                              pCls = new CMyCls1;
                              break;
                        case 0x8252:
                        if (bFe || (dwDId == DB_18C452))
                              pCls = new CMyCls2;
                              break;
                  ...
                  ... 
                  }
            break; 
            case _FAMILY_2_:
            ...
            case _FAMILY_3_:
            ...  
            case _FAMILY_4_:
            ...
            ...
            break; 
      }
return pCls;
}

Here All CMyCls1, CMyCls2, CMyCls3, CMyCls4,... all are derived from a class named "CMyCls".

Any help very thankful to them. It is urgent.

Nice talking to you. Blush | :O
AnswerRe: Any better solution to solve this? Pin
S. Senthil Kumar30-Sep-05 0:39
S. Senthil Kumar30-Sep-05 0:39 
QuestionHow to Disable/Hide Mouse Cursor ? Pin
Amarelia29-Sep-05 22:36
Amarelia29-Sep-05 22:36 
AnswerRe: How to Disable/Hide Mouse Cursor ? Pin
mark novak30-Sep-05 2:26
mark novak30-Sep-05 2:26 
QuestionPlaying Video In Dialogs Pin
sweep12329-Sep-05 22:31
sweep12329-Sep-05 22:31 
QuestionDialog Communication Pin
fjlv200529-Sep-05 22:30
fjlv200529-Sep-05 22:30 
AnswerRe: Dialog Communication Pin
Cedric Moonen29-Sep-05 22:36
Cedric Moonen29-Sep-05 22:36 
GeneralRe: Dialog Communication Pin
fjlv200529-Sep-05 22:56
fjlv200529-Sep-05 22:56 
QuestionMFC reporting tools? Pin
bryan52329-Sep-05 22:02
bryan52329-Sep-05 22:02 
QuestionLogFile Pin
SachinSingla29-Sep-05 22:00
SachinSingla29-Sep-05 22:00 
AnswerRe: LogFile Pin
ThatsAlok29-Sep-05 22:27
ThatsAlok29-Sep-05 22:27 
AnswerRe: LogFile Pin
ThatsAlok29-Sep-05 22:28
ThatsAlok29-Sep-05 22:28 
QuestionAcquireCredentialsHandle returns SEC_E_INTERNAL_ERROR Pin
sunit529-Sep-05 21:32
sunit529-Sep-05 21:32 
QuestionGet pixel data from DirectX or OpenGL Pin
29-Sep-05 21:22
suss29-Sep-05 21:22 
AnswerRe: Get pixel data from DirectX or OpenGL Pin
Bartosz Bien30-Sep-05 1:04
Bartosz Bien30-Sep-05 1:04 
Questionwindows printer spool Pin
Marc Soleda29-Sep-05 20:55
Marc Soleda29-Sep-05 20:55 
QuestionWindows 98 DDK Pin
karmendra_js29-Sep-05 20:47
karmendra_js29-Sep-05 20:47 
AnswerRe: Windows 98 DDK Pin
tssp29-Sep-05 21:10
tssp29-Sep-05 21:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.