|
Is it possible to develop a GraphicsPath object from a Region object?
If possible plz give detail process.
|
|
|
|
|
hi ,
i want to edit a file with non ".cpp" extenstion on vs2003. the editor displays the contents as a plain text file( no Intellisence and color scheme). is any way i can configure the editor to treat thi file as cpp source code without changing its file extension ?
Thanks & Regards
|
|
|
|
|
Set the Language as "C/C++" in the "Source File Properties". You will get it by right clicking the editor and select the "Properties".
|
|
|
|
|
NS17 wrote: right clicking the editor and select the "Properties".
the editor does not contains a "Properties" option on context menu.
i tried "view->properties" but property panel contains nothing.
iam using VisualStudio2003, doing a console application project.
thanks
|
|
|
|
|
nitin3 wrote: iam using VisualStudio2003
I am sorry, I said about VC6. I am not so sure about how to do it in VC7.
|
|
|
|
|
Tools | Options --> Projects and Solutions --> Visual C++ Project Settings --> C/C++ File Extensions.
Maxwell Chen
|
|
|
|
|
Isn't it in VC 2005? He is using VC 2003.
|
|
|
|
|
NS17 wrote: Isn't it in VC 2005? He is using VC 2003.
I only have VC2005 right now. I think that VC2003 and VC2005's IDEs are very much similar.
Maxwell Chen
|
|
|
|
|
Hmm, ".cpp" should be handled by default by Visual Studio. Are you sure you have installed the C++ component of Visual Studio?
You can always try running the VS installer and doing a repair...
Just my two cents.
Florin Crisan
|
|
|
|
|
Actually his source file has NOT cpp extension...
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.
[my articles]
|
|
|
|
|
You're right
Florin Crisan
|
|
|
|
|
Hello,
Is there away to implement a preprocessor macro that would generate a build date in the style of UNIX timestamp (like 20080103 etc.). It would be helpful to print this kind of timestamp into program's About box or include it into program's version number. I know there is __DATE__, but this outputs a different format.
Cheers
|
|
|
|
|
HenriH wrote: I know there is __DATE__, but this outputs a different format.
__DATE__ is what you need. Re-arranging string format won't be such a difficult task.
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.
[my articles]
|
|
|
|
|
--------------------------------------------------------------------------------
I use the function SetupCommitFileQueue to copy files.
When I use it, "Copy files..." window is displayed .
I don't want this window to be displayed.
How can I do it?
Thanks
Ashish
|
|
|
|
|
Hi
iam doing Chat application with out language pack installation .In this when i paste chinese characters in rtf .
And sending from rtf to Html chinese characters r converting pair of 8-bit codepoints. i need help how to convert pair of 8-bit codepoints to decimal value ...plz tell...
#sanroop#
|
|
|
|
|
You post the same yesterday. I already answered asking you for more details. Could you please be so kind to elaborate a bit?
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.
[my articles]
|
|
|
|
|
I'm trying to restrict my dialog window from being moved outside the visible screen area.
I'm doing this using this method:
void CWindowsDVRDlg::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
{
CSkinDialog::OnWindowPosChanged(lpwndpos);
CRect rc;
GetWindowRect (&rc);
if (EnsureRectangleOnDisplay(rc)){
SetWindowPos(NULL, rc.left, rc.top, 0,0, SWP_NOSIZE | SWP_NOZORDER);
}
else{
SendMessage(DM_REPOSITION);
}
RedrawWindow(NULL,NULL,RDW_INVALIDATE);
}
The code works but its flaw is that it's still painting the dialog window outside the visible screen area just before it is repositioned inside the screen (by SendMessage(DM_REPOSITION)). Flickering is the result of this.
Can anyone help me with this? You're help would be much appreciated.
|
|
|
|
|
Use OnWindowPosChanging instead.
|
|
|
|
|
Thanx!
I tried using OnWindowPosChanging() beforehand but the problem is, it seems it cannot process the SendMessage(DM_REPOSITION) at all which is what I need to implement.
Any other ideas on preventing the program from painting windows outside the screen (results in flickering) while using OnWindowPosChanged() and SendMessage(DM_REPOSITION)?
|
|
|
|
|
You can stop painting in the OnPaint method.
Or (better) you can invalidate (if it is under your control) only the inside-screen area.
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.
[my articles]
|
|
|
|
|
demxine wrote: Any other ideas on preventing the program from painting windows outside the screen (results in flickering) while using OnWindowPosChanged() and SendMessage(DM_REPOSITION)?
I dont understand the need of this... If you are targeting to restrict the window movement, OnWindowPosChanging is enough. You only need to update the WINDOWPOS structure values passed by it. No need of DM_REPOSITION.
Is my understanding correct?
|
|
|
|
|
Can you post a specific piece of code on how to do this:
(If you are targeting to restrict the window movement, OnWindowPosChanging is enough. You only need to update the WINDOWPOS structure values passed by it. No need of DM_REPOSITION)
Actually, I have no idea how to make it work other than using SendMessage(DM_REPOSITION)in restricting window movement only to the visible screen. Could you help me please.
|
|
|
|
|
Sorry for the delay...
demxine wrote: Can you post a specific piece of code on how to do this:
Try this...
void CDlgTestDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
CDialog::OnWindowPosChanging(lpwndpos);
if( lpwndpos->x < 0 ) lpwndpos->x = 0;
if( lpwndpos->y < 0 ) lpwndpos->y = 0;
int nScrW = GetSystemMetrics( SM_CXMAXIMIZED );
int nScrH = GetSystemMetrics( SM_CYMAXIMIZED );
if(( lpwndpos->x + lpwndpos->cx ) > nScrW ) lpwndpos->x = nScrW - lpwndpos->cx;
if(( lpwndpos->y + lpwndpos->cy ) > nScrH ) lpwndpos->y = nScrH - lpwndpos->cy;
}
|
|
|
|
|
Hey, it works! Thank you so much for your help. Cheers! ^_^
|
|
|
|
|
demxine wrote: Thank you so much
You are welcome...
|
|
|
|