|
UKM_Student wrote: The sign i was talking about isn't the '...',but rather the ' ' sign...
That's called a character constant.
UKM_Student wrote: Re:Trial and error part, my tutor said the program was too short...
Too short for what? Why add code just for the sake of adding it?
A different approach on it might have looked like:
for (char Letter1 = 'A'; Letter1 <= 'Z'; Letter1++)
cout << Letter1 << endl;
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Lol, 'coz if i were to have the same program with one of my classmates,the lecturer might think that we copied each other so.... yeah
|
|
|
|
|
True, technically, but the odds of that happening with a five line program are slim at best. Now if you turned in 100 lines of identical code, then you'd have issues.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hah ok, thanks for your help.
|
|
|
|
|
I'd like to implement a control that will be used to build up a list of recipients for an email. It will ideally behave in a similar manner to Outlook 2007 (as that's the product we sell as an email client).
The window class for the Outlook 2007 control is a RichEdit20WPT but that doesn't seem to match any of the rich edit class names in the SDK headers. Can anyone tell me if this is a standard control or not?
Do any of the standard rich edit controls provide the necessary features to get a control to behave like the Outlook 2007 controls?
|
|
|
|
|
Hi Steve,
I dont see anything about RichEdit20WPT in the MSDN about Rich Edit Controls[^]. If the naming convention is any clue then it is most likely an extended RichEdit20W control used exclusively in Microsoft Office.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi
Can anyone tell how to compare systemtime.
SYSTEMTIME t1;
SYSTEMTIME t2;
GetSystemTime(&t1);
GetSystemTime(&t2);
Is this a good approach
t1==t2
Thanks
|
|
|
|
|
VVVimal wrote: Is this a good approach
t1==t2
Depends on your needs (i.e. be specific!).
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]
|
|
|
|
|
|
Hi
CImage image;
image.Load (_T(read.tif"));
//x1 = 8108, y1 =68 , x2 = 8116,y2 = 82
CRect rect(x1,y1,x2,y2);
CDC *pDC=CDC::FromHandle(image.GetDC());
pDC->Draw3dRect(rect,RGB(255, 0, 0), RGB(0, 255, 0));
image.Save(_T("D:/2009ga.jpg"));
when i try to draw the rectangle in image ...
showing error msg like Expression : m_hDC == 0..but not drwing the rectangle in image..why
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
modified on Tuesday, September 15, 2009 4:49 AM
|
|
|
|
|
Why don't you have a look at the SimpleImage [^] sample code?
Alternatively: why don't you use a debugger?
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]
|
|
|
|
|
thanks ..i hope it ll help me ...
how to debugger in Visual studio ..already i am working in C# .net ....i think its same procedure ...?
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
The following code snippet (inside the OnPaint handler) works on my system:
CPaintDC dc(this);
CImage img;
img.Load(_T("foo.jpg"));
CDC * pdc = CDC::FromHandle( img.GetDC() );
CRect rc(0,0,100,100);
pdc->Draw3dRect(&rc, RGB(0,255,0), RGB(255,0,0));
dc.BitBlt(0,0, 400, 400, pdc, 0, 0, SRCCOPY);
img.ReleaseDC();
(Consider it as it si, just a silly example: for instance reloading the image at every OnPaint call is foolish).
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 want to dynamically create the controls on dialog box.
this dialog box may contain multiple list controls, check boxes, radio buttons, drop down boxes etc.
number of each controls depend on the some condition.
so can we do this if yes, how do i do this?
how do i handle the events related to the controls?
sunnyram
|
|
|
|
|
sunnyram wrote: so can we do this if yes, how do i do this?
Yes, of course. You've to use, for instance, CreateWindowEx [^] function.
sunnyram wrote: how do i handle the events related to the controls?
MSDN has a lot of examples about, see, for instance, the Using Buttons [^] topic.
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]
|
|
|
|
|
Thanks, i will try suggested thing.
sunnyram
|
|
|
|
|
If it's only a handful, why not create them all at design time, and then show/hide them accordingly (ie, some condition)? Much, much easier than creating them at runtime.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
As it is a requirement we can not do this.
sunnyram
|
|
|
|
|
My program crashes on a client's pc (with XP) on this 3 lines (on any other pc it correcly runs):
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->SetForegroundWindow();
m_pMainWnd->UpdateWindow();
They are default instruction in the initialization function (InitInstance ) of a MFC program.
My antivirus (COMODO) tells a warning on UpdateWindow because when run trys to install a global hook on "atioglxx.dll" (It looks a dll from my ATI video board). If I do not permit this the program stops, else runs perfectly.
I'm quite sure that some setting of the antivirus of the client is locking this function! Or that his video-board isn't so compatible with this function.
Why this hook? Is it important? can I avoid this to let the program run on every pc?
Any other solution?
Of course there is the easy way (but not the real solution) to tell to the user to disable the antivirus (I think it is Norton)
Thanks
Russell
|
|
|
|
|
Russell' wrote: Is it important? can I avoid this to let the program run on every pc?
Have you tried?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All
I am try to get values from Mysql database.I am using pRecordset class for get data from Mysql.But it's generate error while the data type is Decimal.
strContent = (char *) (_bstr_t) pRecordset->Fields->GetItem((_bstr_t)"Price")->Value;
Table is
create table test(A TINYINT(100), B SMALLINT(100), C MEDIUMINT(100), D INT(100), E BIGINT(100), F FLOAT(100,10),
G DOUBLE(100,10), H DECIMAL(65,20));
insert into test(A,B,C,D,E,F,G,H)values(65,645,365,31311,87655498,46546547.650909090,475735375734573.0000,5323423424.00004343434300000);
|
|
|
|
|
Error is
IDispatch error #3105
Plz help me
|
|
|
|
|
Have you tried:
A)
create table test(A TINYINT(100), B SMALLINT(100), C MEDIUMINT(100), D INT(100), E BIGINT(100), F FLOAT(100,10), G DOUBLE(100,10), H DOUBLE(65,20));
insert into test(A,B,C,D,E,F,G,H)values(65,645,365,31311,87655498,46546547.650909090,475735375734573.0000,5323423424.00004343434300000);
B)
create table test(A TINYINT(100), B SMALLINT(100), C MEDIUMINT(100), D INT(100), E BIGINT(100), F FLOAT(100,10), G DOUBLE(100,10), H DECIMAL(65,20));
insert into test(A,B,C,D,E,F,G,H)values(65,645,365,31311,87655498,46546547.650909090,475735375734573.0000,5.5);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi Experts,
When I declare a Object of the class, How it store into memory i.e which memory segment it used?
|
|
|
|
|
MPTP wrote: which memory segment it used?
I presume you are trying to distinguish whether it is stored on the heap or the stack. If you create an object via new() then it goes to the heap. If it is a local variable it goes on the stack.
|
|
|
|
|