|
i am a new programer in mfc.now i met a problem.I want to draw objects such as line ,rectagle,stroke etc. and need these objects can be resize,move,rotate in interactive mode which means using track handles of interation with mouse.I can realize resize and move with CRectTacker and it works well.But the CRectTracker do not support rotate.Now i want to rotated these objcets. i can draw rotated objects in "GDI+" ,but not in the realtime mode.if someone have realize it , i will thanks for your helping in advance.Please give me some advice.i could not find some topics about this.
|
|
|
|
|
See here[^] and here.[^]
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
i have realize it,but i want to realize the rotation of objects like lines ,curves in microsoft office .
i want to realize the rotated the objects not only resize and move.
|
|
|
|
|
I assume MFC.
Setup a timer in the OnInitDialog() updated each second (or more or less accurate, depending on how accurate the current time must be).
SetTimer(100,1000,NULL);
In the timer handler, Update the editbox with the current time:
void CBuilderDlg::OnTimer(UINT nIDEvent)
{
if(nIDEvent==100)
{
CTime t1;
t1=CTime::GetCurrentTime();
m_Editbox.SetWindowText(t1.Format("%H:%M:%S"));
}
else if (nIDEvent==1)
{
m_SplDlg.CloseIt();
KillTimer(1);
}
CDialog::OnTimer(nIDEvent);
}
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
|
Hi,
How do I get the serialnumber of the attached monitor ?
I use WMI to do some inventory management stuff and WMI will tell several things about the monitor, but apparentlig not the serial number.
Any ideas ?
jh
|
|
|
|
|
dt-jh wrote: How do I get the serialnumber of the attached monitor ?
Where is this serial number displayed?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'll try to be a little more precise. The serialnumber isn't as such displayed on the monitor screen ( if thats what You mean ). It's more a question to get the monitor to tell its serial number. I have perviously seen a program, that could do that. So some interaction between the monitor an the CPU unit may be possible. At least - it seems - some monitors are capable of doing that. Perhaps in conjunction with "non standard" videoports. For instance the new digital porttypes.
Anyway, thanks for taking the time to answer.
Regards.
jh
|
|
|
|
|
dt-jh wrote: The serialnumber isn't as such displayed on the monitor screen ( if thats what You mean ).
No. What I was getting at was if you know the monitor to have a serial number (i.e., have actually seen it displayed somewhere), then we can surely find a way of retrieving it.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Oh - now i get it. ( I hope )
Yes, we run a "professional" inventory management tool in the company. That's the program, that can do the job. I'll try to get som more information for You/us.
Regards
jh
|
|
|
|
|
Does this inventory program work on all of your monitors or just a select few?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think the monitor device only receives signals from the computer but is not able to send data back. Therefore I am afraid you will not be able to determine monitor’s information programmatically.
However you can get some information about video controller using Win32_VideoController WMI class.
|
|
|
|
|
Until recently I was of the same opinion as You. Big was my surprise when I saw a program that could do that. Please se my reply to David Crow for further details.
And, also thank's to You for taking the time to answer.
Regards.
jh
|
|
|
|
|
How can I insert data from a flat file like .txt file into SqlServer database.
|
|
|
|
|
Read the file data into a string and place it into the database firing some query for inserting data.
What problem are you having . Reading the file or inserting data in the database?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can always use SQL Server's DTS utility. Or use the SQL command Bulk Insert
onwards and upwards...
|
|
|
|
|
Hi
I was using sendmesage function to a window in my DLL which is attached to other application using windows hook, mainly to get text from a control.
sendmessage(hwnd,WM_GETTEXT,(wparam)100,(lparam)sztext); To my surprise sendmessage was not able to retrieve text in sztext.
could the problem lies in the creator of application who has not properly written code in WM_GETTEXT case. I think he/she may not have written appropriate code to provide proper response when send message function with WM_GETTEXT is called.
Am I wrong in analysing
please reply if u have encountered a problem like this before
thanks
|
|
|
|
|
It's hard to say. Here[^] is an interesting article on WM_GETTEXT and GetWindowText .
Steve
|
|
|
|
|
Thanks link was highly usefull.
|
|
|
|
|
Was it a password edit box ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
No it was dialog box.
I dont have to write program to retrive passwords, it is already written by others.I can find some here
|
|
|
|
|
Javagal Srinath wrote: I dont have to write program to retrive passwords, it is already written by others.I can find some here
No offense meant, it is only that edit boxes with password option set react differently to the WM_GETTEXT message as when it is not set.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Javagal Srinath wrote: sendmessage(hwnd,WM_GETTEXT,(wparam)100,(lparam)sztext);
Is hwnd a valid window handle?
Javagal Srinath wrote: To my surprise sendmessage was not able to retrieve text in sztext.
How was sztext declared?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hwnd was a window handle returned when a notification that a new window is created was recieved to my filter function cbtproc. The hook code was HCBT_CREATEWND
I think sztext was properly declared
May be we can not send "sendmessage(hwnd,WM_GETTEXT,(wparam)100,(lparam)sztext);" to retrieve text to all type of window.
|
|
|
|
|
how can I iterate file pointer within a file consisting list of file.
that is, when ever it iterates i get next list file using vc++(mfc)
kamalesh
|
|
|
|