|
|
Did you see Database section on the codeproject?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: Did you see Database section on the codeproject?
Yes, but I don't see the 'any database' section...
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]
|
|
|
|
|
Well this problem is of your monitor change it and try again if you have same please send your problem to our department!
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
satheesh.S wrote: How can i write a time data to any database...
Convert it to a number.
satheesh.S wrote: ...also retrieving ,
and cast time to CString and opposite also using c++.
Check out CTime and COleDateTime .
"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,
I need some help on drawing a line, i am able to draw vertical line on dialog box,
But whenever i have opened othe application on the dialog box, the line is getting erasing....
I am using below code snippet for drawing line..
dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(old_x1,old_y1);
dc.LineTo(old_x2,old_y2);
dc.MoveTo(start);
dc.LineTo(end);
Can any one help me regrading why the line is getting erasing..? as it is very urgent requirement for me..
|
|
|
|
|
Put those lines in the OnPaint method of the dialog.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Yes, I have written that code snippet in OnPaint function only...
|
|
|
|
|
Where do you use of this code? WM_PAINT
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I have written that code snippet in OnPaint function only...
|
|
|
|
|
Does your code like this?
void CTestDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<wparam>(dc.GetSafeHdc()), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CPaintDC dc(this); // device context for painting
dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(100,100);
dc.LineTo(100,200);
dc.MoveTo(200,205);
dc.LineTo(200,305);
CDialog::OnPaint();
}
}
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi Saadi,
Thanks for your help on this.., I am able to draw the constant line if i have opened other window on dialog box, but here in my application the line will move from left to right in between two sliders along with the slider positions.
while the line is moving, if i have opened any window on dialog box, the previous line is not getting erasing.
I thought of it is losting the previous line pixels information..
Can you please tell me how i have to achive this..?
thanks in advance..
|
|
|
|
|
Hi John
Well Im not Saadi (poet)[^].
Your answer is easy if you want to clear previous lines you can draw on it again for example you have this code:
dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(100,100);
dc.LineTo(100,200);
dc.MoveTo(200,205);
dc.LineTo(200,305);
if you use of this code again you clear previous line.
dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(100,100);
dc.LineTo(100,200);
dc.MoveTo(200,205);
dc.LineTo(200,305);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
in which function do you try to do this?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
In OnPaint function... , I have already done with google, but i don't get any correct help... So Could you please help me regarding this...?
|
|
|
|
|
did you debug to check if variables contain the same values as they did before other window was moved over your dialog.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
yes i have debugged, iam getting all the variables are in correct manner.
|
|
|
|
|
Windows is event driven (well, message driven...): drawing should happen inside the WM_PAINT message handler, that is CDialog::OnPaint method for an MFC application.
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 All,
I'm using CStdioFile to read a file line by line, I want to delete line 5,6,9 from the file.
Plz give me hint or soln..
thax 
|
|
|
|
|
You can either write the lines to another file without writing the lines you want to delete.
Then delete the original and rename the new file with the original name.
Or you could store all the required lines in memory and overwrite the original file.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
me sathish
first take the contents of the file using FILE* like c funtions
gradually turn to next line ,meanwhile to store a static value if the pointer goes to downwards if reached 456 write " " ie empty text there ...
ya
|
|
|
|
|
sathish / satheesh,
You need to reply to the original poster, not the helper. The original poster will be more interested in your assistance.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
me carlo
go straight forward until you reach the first crossroad with traffic lights, then turn left and straight forward to the next crossroad with traffic lights where you will take the left turn and then make a turn on first available street on your right. Go straight forward down the street and at the end, on your right you'll see the hotel.
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]
|
|
|
|
|
Makes perfect sense to me, although I question why you opted to turn down that one street.
"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
|
|
|
|
|
is there an easy way to hide/show nodes in a mfc ctreectrl?
i need to create a function that does this, but all i could come with is deleting and inserting a node to hide and show it.
but this would be a problem especially since i have to know the order of the nodes.
thanks
|
|
|
|