|
use Getwindowrect, ScreentoClient then use MoveWindow using the rect. if u've placed the text in a control. or use CDC::TextOut(x,y,string)..
eg:
int x=100,y=100;
{
this->GetWindowDC()->TextOut(x,y,"codeproject");
x+=10;
}
Regards,
V
|
|
|
|
|
Vivekuniq wrote:
GetWindowDC()->TextOut(x,y,"codeproject");
Nice, Using that you can Write even on title of Window , NICE
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Plz Give the code to draw colourful dialog boxes.
means , to change back ground color and fore ground.
Plz give GUI of dialog boxes.
Reply Urgently
Praveen Chowdam Kumar
|
|
|
|
|
parims wrote:
Plz Give the code to draw colourful dialog boxes.
means , to change back ground color and fore ground.
Plz give GUI of dialog boxes.
OK.
Handle the OnEraseBkgnd() like this:
.... OnEraseBkgnd(CDC* pDC)
{
CRect rect;
GetClientRect(&rect);
pDC->FillSolidRect(&rect,RGB(255,0,0));
return TRUE;
}
The events list for a dialog box does not normally display this message to be handled in VC6. You need to change the "Filter for messages.." combo box to "Window".
Now the background will be bright Red.
To change the foreground, do you mean Static text etc?
Then you will need to subclass the CStatic, and handle its painting yourself. You can find many CStatic samples here on CP.
this is this.
|
|
|
|
|
there's no need to be so hurrying, because if anyone knows the answer, or if anyone want to answer you, you will stay in the same state.
moreover, you seem so hurry that i doubt you googled your problem, or even searched CodeProject for that.
CodeProject[^]
Google[^]
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
my plotting application draws data in a window 400 pixels high 600 pxl wide.....x axis represents seconds(1 sec=2 pixel) how to scale the y-axis to plot larger values larger than 400,
thanks
|
|
|
|
|
Hello,
The following formula will help you to determine the amount of y - value amounts per pixel you need to plot your largest value:
ValuesPerPixel = Height / (MaxValue /* + spacing */)
You must wonder why to add a spacing. This is because you don't want too look that your graph goes out of the screen. You want to top to be clearly visible.
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi All
I am willing to take the back up of registry (Key, Subkeys & Data) to other place(it may be hard disk, CD\DVD, LAN or any other media). also restore it to any specified location.
How will I do this?
What is the path where registry entries are stored?
Please Reply.
Thanks & Regards.
|
|
|
|
|
rajeevktripathi wrote:
What is the path where registry entries are stored?
%windir%\system.dat
%windir%\user.dat
Your explorer may not show it by default unless you set to view hidden and system files through folder options-View
suhredayan There is no spoon.
|
|
|
|
|
suhredayan® wrote:
%windir%\system.dat
%windir%\user.dat
I can't find these files in my Computer.. my OS: Windows 2000 professional
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote:
I can't find these files in my Computer.. my OS: Windows 2000 professional
For win2000 it seems to be in a different way.
Hope this[^] link helps.
suhredayan There is no spoon.
-- modified at 8:25 Wednesday 14th September, 2005
|
|
|
|
|
Thanks for these replies......
Infact now I am able to read & enumerate all the sub keys and also data value.
Now the problem is that how could I save it to a file (as regedit editor shows) and again restore it to its original location?
Please reply.
Once agin thanks.
|
|
|
|
|
rajeevktripathi wrote:
Now the problem is that how could I save it to a file (as regedit editor shows) and again restore it to its original location?
Use RegSaveKey() and RegRestoreKey() for this.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Look in your C:\Documents and Settings\ folder.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
Look in your C:\Documents and Settings\ folder.
Is it ntuser.dat file
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks for these replies
Please tell me that how could I take bake up of registry and again restore it,
Please reply.
Thanks & Regards
|
|
|
|
|
ThatsAlok wrote:
Is it ntuser.dat file
Of course. What did you expect with Windows 2000 Pro? Those other .dat files you referenced are for Windows 9x and Me.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
Of course. What did you expect with Windows 2000 Pro?
thanks, Sir, could you provide me any link demonstarting the structure of registry stored in dat file.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Funny you should ask. I just read such a magazine article just a few weeks ago that went into painful detail how the registry was laid out. Unfortunately, I can't find that magazine. I've looked through all of my magazines and my browser history but I can't find it. That's so aggravating. If I stumble across it in the future, I'll let you know.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
f I stumble across it in the future, I'll let you know.
I will Wait
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am creating a service which tries to access some files on a remote computer.
But seems my service has not right to access the files.
Can anybody suggest a method to solve this problem or give me some sample to refer to?
thanks in advance~
|
|
|
|
|
By default any service is registered to run as a special user called "SYSTEM", but this user does not have access to network resource. So you can register your service to run as a different user when you create it using CreateService(). the following two parameters of the function will do the trick I guess.
LPCTSTR lpServiceStartName,
LPCTSTR lpPassword
Otherwise you can manually change the user name after its created also using SCM->"Your Service"->Properties->Log on->This Account.
suhredayan There is no spoon.
|
|
|
|
|
I developed one Schduler application ,
In which I used OnTimer() function to popup the messages to
a particular given time.
Cursor is blinking when the application is running.
When I move the cursor on to appli it is blinking .
Plz Give Solution very Urgently.
Praveen Chowdam Kumar
|
|
|
|
|
Can you show code of OnTimer and OnPaint with details?
|
|
|
|
|
n
CString sql,sDate;
/*CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CMyTabExampleApp *pApp = (CMyTabExampleApp *)AfxGetApp();
*/
CDatabase db;
db.OpenEx("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\mydabase.mdb;DSN=MyDsnName",CDatabase::noOdbcDialog);
CRecordset recset( &db);
CTime t;
CTime s=t.GetCurrentTime();
CString strDate,strTime;
strDate.Format("%d-%d-%d",s.GetDay(),s.GetMonth(),s.GetYear());
strTime.Format("%d:%d:%d",s.GetHour(),s.GetMinute(),s.GetSecond());
sql = "select TaskType, TaskDetails, StartDate,SnoozeTime from mytable where StartDate ='"+strDate+"' and SnoozeTime = '"+strTime+"'";
recset.Open(CRecordset::forwardOnly,sql,CRecordset::dynaset);
//MessageBox("READING DB");
CString tasktype,taskdetails;
while(!recset.IsEOF())
{
recset.GetFieldValue("TaskType",tasktype);
recset.GetFieldValue("TaskDetails",taskdetails);
recset.MoveNext();
MessageBox(tasktype + "\n\n"+ taskdetails);
if(tasktype=="APPLICATION")
{
CSnoozeAppli objappli;
objappli.sTaskDetails = taskdetails;
objappli.DoModal ();
}
else
{
CSnoozeMsg dlg;
dlg.sTaskDetails =taskdetails;
dlg.DoModal();
}
}
db.Close();
SetTimer(100,1000,NULL);
CDialog::OnTimer(nIDEvent);
Praveen
|
|
|
|