|
I had a old application developed in VC++6.0, with intraction with SAP RFC
and Iona Orbix(CORBA), Now we are migrating to VS 2005., and at this moment we are wondering to replace corba with now latest technilogy(ie.NET/ or ..), which out make chages in the much of the code.
Please advice efficient posibe ways and the respective adventage/disadvantages.
Thanks in advance.
|
|
|
|
|
You can have a look at ICE. Here[^] is a comparison between ICE and Corba. I never used ICE myself so I can't say anything about it, but I think it's worth a look.
|
|
|
|
|
i didn't want you solve my project.becuase i'mnot good at english i explain more . and i enter all the source. i want you guid me not solve it.
you speak with me very bad.
i was new and you should not speak with me in this way.
but thanks for your guid.
|
|
|
|
|
|
?? Ok first thing is that this is not a emotional center, if u r having a Q's (only valid Q's) u can ask for hint or short solution, u r giving huge code n asking how to acheive the o/p u r expecting.. definatly u must hav done something wrong...anyway never mind bad things if u want to be a best programmer...
|
|
|
|
|
In your original question you didn't specify what was the error and why you weren't able to overcome it. In other words, posting code is always good but you should also tell us what is the error or the obstacle in your way.
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
[My articles]
|
|
|
|
|
|
Hamid. wrote: I can read your thoughts!
So you've the CPMRU's battery pack full charged, havent you?
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
[My articles]
|
|
|
|
|
i didn't want you solve my project.becuase i'mnot good at english i explain more . and i enter all the source. i want you guid me not solve it.
you speak with me very bad.
i was new and you shoudent speak with me in this way.
but thanks for your guid.
|
|
|
|
|
|
arad.moradi wrote: you speak with me very bad.
In your two posts, no one spoke badly to you or at you. You might start by reading here for posting guidelines.
There are quite a few here in the VC++/MFC forum that will gladly help given that you do your part as well.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
(feels like a "Stack Overflow" question)
In my quest to put all warnings as errors and clean up the code,
How do you manage and deal with unused parameters in functions and methods ?
There are times when we could refactor the method to completely remove the parameter if it's never used (for example in legacy code)
Other instances, for example handler for windows messages where the parameters are not used :
LRESULT MyHandler( WPARAM wParam, LPARAM lParam );
do you keep the parameters and put them in comments
LRESULT MyHandler( WPARAM , LPARAM );
or remove the parameters :
LRESULT MyHandler( WPARAM , LPARAM );
or use a macro to mark the parameters as unused ?
#ifdef _DEBUG
#define UNUSED(x)
#else
#define UNUSED(x) x
#endif
LRESULT MyClass::MyHandler( WPARAM wParam, LPARAM lParam )
{
UNUSED( wParam );
UNUSED( lParam );
}
or simply ignore the warning in the projets's settings ?
Thanks.
Max.
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: do you keep the parameters and put them in comments
LRESULT MyHandler( WPARAM /*wParam*/, LPARAM /*lParam*/ );
That one usually, but sometimes this one:
Maximilien wrote: remove the parameters :
LRESULT MyHandler( WPARAM , LPARAM );
Maximilien wrote: simply ignore the warning in the projets's settings
I try not to do global warning ignores - I tend to use #pragma warning (disable) when absolutely necessary (usually the warnings which make me feel like saying "well, duh, tell me something I didn't already know" to the compiler).
|
|
|
|
|
Could use overloaded wrapper methods to cope with old/new invocations? e.g. If adding a new parameter for tweaked functionality of a complex legacy method you don't want to mess with - other than the tweak ...
void legacyFunction(int originalParam, bool newFlag)
{
}
void legacyFunction(int originalParam)
{
legacyFunction(originalParam, false);
}
|
|
|
|
|
Maximilien wrote: or remove the parameters :
LRESULT MyHandler( WPARAM , LPARAM );
I tend to go this route.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Maximilien wrote: LRESULT MyHandler( WPARAM /*wParam*/, LPARAM /*lParam*/ );
I use/see this more often.. and some times
Maximilien wrote: LRESULT MyHandler( WPARAM , LPARAM );
Maximilien wrote: or use a macro to mark the parameters as unused ?
I have some times used/seen macro UNREFERENCED_PARAMETER which i think is already defined
So i think you don't need to define a new one..
Well this is just my opinion and the things i came across maintaining applications.
Regards,
Sandip.
|
|
|
|
|
dear sir/madam!
i have created dialog based application in MFC. and created COLORREF Array like this..
p_Cam1_Process_View_Array = new COLORREF*[IMAGE_HEIGHT];
for(int j=0; j<IMAGE_HEIGHT; j++)
p_Cam1_Process_View_Array[j] = new COLORREF[IMAGE_WIDTH];
for(int t_Y=0; t_Y < IMAGE_HEIGHT; t_Y++)
{
for(int t_X=0; t_X < IMAGE_WIDTH; t_X++)
{
p_Cam1_Process_View_Array[t_Y][t_X]=RGB(100,0,12);
}
}
how to display this array in to static Box.
i wrote the below coding but its getting off the application
BOOL CDlg_view_arrayDlg::Fn_Show_Processed_Image()
{
int t_Red, t_Green, t_Blue, t_X=0, t_Y=0, t_K=0;
CString ak;
try
{
CClientDC dc(&m_Processed_Image);
RECT t_Rect;
int t_Width=0, t_Height=0, w=0, h=0, k=0;
BITMAP t_bitmap;
HDC t_hmainmemdc=0;
HBITMAP t_hmainbitmap=0;
int t_Padding=((t_Width*3)%4==0)?0:4-((t_Width*3)%4);
BYTE *t_Byte;
w=t_Width*3+t_Padding;
h=t_Width;
BITMAPINFO *bm;
bm = (BITMAPINFO*) new BYTE[sizeof(BITMAPINFO)];
bm->bmiHeader.biBitCount=24;
bm->bmiHeader.biCompression=BI_RGB;
bm->bmiHeader.biHeight=IMAGE_HEIGHT;
bm->bmiHeader.biPlanes=1;
bm->bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
bm->bmiHeader.biWidth=IMAGE_WIDTH;
t_Byte = new BYTE[w*h];
GetDIBits(t_hmainmemdc,t_hmainbitmap,0,h,t_Byte,bm,DIB_RGB_COLORS);
k=0;
for(int i=IMAGE_HEIGHT-1; i>0; i--)
{
for(int j=0; j<IMAGE_WIDTH; j++)
{
t_Blue = GetBValue(p_Cam1_Process_View_Array[i][j]);
*(t_Byte+k) = t_Blue;
k++;
t_Green = GetGValue(p_Cam1_Process_View_Array[i][j]);
*(t_Byte+k) = t_Green;
k++;
t_Red = GetRValue(p_Cam1_Process_View_Array[i][j]);
*(t_Byte+k) = t_Red;
k++;
}
k=k+t_Padding;
}
SetDIBitsToDevice(t_hmainmemdc,0,0,t_Width,t_Height,0,0,0,t_Height,t_Byte,bm,DIB_RGB_COLORS);
delete t_Byte;
//To set the scroll position;
BitBlt(dc.m_hDC , 0,0, t_Width, t_Height, t_hmainmemdc,0,0, SRCCOPY);
GetClientRect(&t_Rect);
if (t_Width>(t_Rect.right-t_Rect.left))
{
SetScrollRange(SB_HORZ,0,t_Width-(t_Rect.right-t_Rect.left),TRUE);
}
else
SetScrollRange(SB_HORZ,0,0,TRUE);
if (t_Height>(t_Rect.bottom-t_Rect.top))
{
SetScrollRange(SB_VERT,0,t_Height-(t_Rect.bottom-t_Rect.top),TRUE);
}
else
SetScrollRange(SB_VERT,0,0,TRUE);
CancelDC(dc.m_hDC);
return 0;
}
catch(...)
{
ak.Format("Red %d, Green %d Blue %d", t_Red, t_Green, t_Blue);
MessageBox(ak);
}
}
please let me know as possible.
thanks in advance.
AK
|
|
|
|
|
I honestly advise you to search (in internet) and study some basic bitmap (bmp) management before you code this...
- ns ami -
|
|
|
|
|
Shouldn't the following line(s) of code make Reichman come out in Red ????
RichWindow = GetDlgItem(hwndDlg,IDC_RICHEDIT21);
memset( &cf, 0, sizeof cf );
cf.cbSize = sizeof cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = RGB(255,0,0);
cr.cpMin = 1;
cr.cpMax = 7;
SendMessage(RichWindow, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendMessage(RichWindow, EM_EXSETSEL,0,&cr); // Set the Seelction
Strcpy(&stor_buffer[0],"Reichman is a great guy and a great programmer");
mysettext.flags = ST_DEFAULT;
mysettext.codepage = CP_ACP;
SendMessage(RichWindow,WM_SETTEXT,&mysettext,(LPSTR) &stor_buffer[0]);
|
|
|
|
|
Shouldn't you use WM_SETTEXT first and THEN do the formatting?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
You want EM_SETTEXTEX rather than WM_SETTEXT ...
|
|
|
|
|
Just looked that up ??? thankx
While I was on MSDN I noticed you can DC (Device Context API's) with rich edit
Dont know if thier is confilict with thse two concepts
What If I try TextOut ??????
|
|
|
|
|
how to conver TCHAR to const char*? I searchd a lot...but i didnt get satisfied answer?
|
|
|
|
|
TCHAR is a macro for either char or wchar_t depending on whether UNICODE has been defined.
So which one is it?
«_Superman_»
|
|
|
|
|
|