|
|
Hi,
Is it possible to checkin and checkout files in Visual source safe using batch files ???
If yes, can someone provide me with a few sample batch files.
Thanx
Saleem
|
|
|
|
|
Yes.
No.
Try
SS HELP -YAdmin,
at the command line.
|
|
|
|
|
Ouch! Someone's having a bad day...
You can perform one SS action at a time, such as GET, set working folder, set current project, checkin, checkout etc.
Generally you need to specify a username/password (although the password is often blank on many systems), as well as the action you want to do.
SS PROJECT $/Tools/RoleRepl -Yusername,pwd
will set your current project.
SS WorkFold -Yusername,pwd
will set the current directory as your working folder for the current project.
SS Get master.dsp -Yusername,pwd
will get latest file (you can use * for all items)
SS Checkout master.dsp -Yusername,pwd
will perform a checkout (again, you can use wildcards)
SS Checkin master.dsp -Yusername,pwd
will perform a checkin.
That should be enough to get you started
Steve S
|
|
|
|
|
Hi,
There is very interest situation if I use function for hiding scroll bars
(CWnd::ShowScrollBars) for window where OpenGL is rendering:
void CBridgeProfView::SetFitToViewPort()
{
ShowScrollBar(SB_BOTH,false);
....
....
....
Invalidate();
}
Function ::SwapBuffers(HDC hdc) does not work when first redrawing happens despite returning true.But next redrawings work as usual...
Only one computer(Windows XP) in our office suffers from it ....
What it might be?
Alex Kekukh
|
|
|
|
|
If this is a computer-specific issue, I would first doubt driver compatibility or proper installation. Perhaps the display settings are wrong ?
Try updating all OpenGL drivers and possibly the DirectX ones (Yeah, they should not be interrelated, but mysteriously, they are).
If this doesn't help, then you could try first setting the ShowScrollBar to false, then calling Invalidate to force a redraw, then draw your stuff. This may cause flicker, however. Another approach is to handle the WM_PAINT call so that the base class painting is handled first, if you're using MFC. If not, then paint the window area, scrollbars and other stuff first, and as a final thing, bitblt the OpenGL scene.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Antti Keskinen wrote:
Try updating all OpenGL drivers and possibly the DirectX ones (Yeah, they should not be interrelated, but mysteriously, they are).
Because some (old and cheap) cards used to implement openGL drivers using directX (under windows). But it has been a while since I saw such an openGL driver.
|
|
|
|
|
This way allows to avoid wrong drawing,but it waste one more redrawing...
void CBridgeProfView::SetFitToViewPort()
{
ShowScrollBar(SB_BOTH,false);
....
....
....
SendMessage(WM_PAINT,0,0);
Invalidate();
}
Alex Kekukh
|
|
|
|
|
I have tried to look at having tooltips on my tree ctrl items but I have problems. One is that if my item text is longer than the tree control width it nicely shows the whole text in a tooltip like window so maybe I should not have a tooltip now. What I like now is to have option to right click on an item then get a tooltip displayed.
Can any one help with this?
Thank you
|
|
|
|
|
Go into Classwizard and implement a function for the NM_RCLICK message. You can then call GetSelectedItem() to get your item, and then other functions like GetItemData() and GetItemText . To display your item's text in a tooltip, look here[^]
"Oh, I'm sick of doing Japanese stuff! In jail we had to be in this dumb kabuki play about the 47 Ronin, and I wanted to be Oshi, but they made me Ori!"
|
|
|
|
|
That works now
Now when I right-click on my item it is not selected. I have to left click first which selects it. Then I must right-click on it to get the right item. How must right clicking select an item as though it is left clicking?
|
|
|
|
|
I have a question concerning the declaration of an operator. I'd like to define a "+" operator. Looks below this:
const CTimeCode CTimeCode:perator+ (const CTimeCode &TimeCode1, const CTimeCode &TimeCode2)
{
CTimeCode &TimeCodeResult;
TimeCodeResult.m_lTimeCode = TimeCode1.m_lTimeCode + TimeCode2.m_lTimeCode;
}
with those constructors :
CTimeCode::CTimeCode(int iFormat, long lTimeCode)
{
m_iFormat = iFormat;
if ((m_iFormat != 25) || (m_iFormat != 30))
m_iFormat = 25;
m_lTimeCode = lTimeCode;
}
CTimeCode::CTimeCode(int iFormat, CString csTimeCode)
{
m_iFormat = iFormat;
if ((m_iFormat != 25) || (m_iFormat != 30))
m_iFormat = 25;
m_lTimeCode = GetLongTimeCode(csTimeCode);
}
CTimeCode::CTimeCode(int iFormat, int iH, int iM, int iS, int iF)
{
m_iFormat = iFormat;
if ((m_iFormat != 25) || (m_iFormat != 30))
m_iFormat = 25;
m_lTimeCode = GetLongTimeCode(iH,iM,iS,iF);
}
I have a problem at compilation... :
"binary 'operator +' has too many parameters"
That comes perhaps from a syntax error... Any idea about this ?
|
|
|
|
|
When you make a binary operator a member of the class, it only takes one parameter. The left-side parameter is this .
class CTimeCode
{
public:
CTimeCode operator+ ( const CTimeCode rhs ) const
{
CTimeCode ret;
ret.m_lTimeCode = m_lTimeCode + rhs.m_lTimeCode;
return ret;
}
};
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Anonymous wrote:
const CTimeCode CTimeCode:perator+ (const CTimeCode &TimeCode1, const CTimeCode &TimeCode2)
{
CTimeCode &TimeCodeResult;
TimeCodeResult.m_lTimeCode = TimeCode1.m_lTimeCode + TimeCode2.m_lTimeCode;
}
You just need one parameter wich is the second operand of the +. The first operand is this class (you can access it using the this keyword).
So change your function to this:
const CTimeCode CTimeCode:operator+ (const CTimeCode &TimeCode)<br />
{<br />
CTimeCode &TimeCodeResult;<br />
TimeCodeResult.m_lTimeCode = this.m_lTimeCode + TimeCode.m_lTimeCode;<br />
<br />
return TimeCodeResult;<br />
}
|
|
|
|
|
Huum ok, yes the this is not an obligation (sorry, little bit tired today ). Of course, you can access directly your class members...
|
|
|
|
|
And how to initialize "CTimeCode &TimeCodeResult" ?
|
|
|
|
|
Don't you have a default constructor ??
|
|
|
|
|
you also forgot to return a value from you operator+()
TOXCCT >>> GEII power
|
|
|
|
|
Generally I would implement:
class CTimeCode
{
CTimeCode& operator+=( const CTimeCode& rhs )
{
m_lTimeCode += rhs.m_lTimeCode;
return *this;
}
};
CTimeCode operator+( const CTimeCode& lhs, const CTimeCode& rhs )
{
CTimeCode ret( lhs );
ret += rhs;
return ret;
} Using a global- or namespace-scope operator+ allows conversions to happen on both operands (say, if you have a conversion operator or a single-operand constructor) whereas a class member only allows conversion on the right-hand operand.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
i'm really tired of manual converting which make me doubt whether am i a man or a machine.
thx
|
|
|
|
|
|
Hi,
I have SDI app that load files through CWinApp::OnFileOpen.
When the file dialog opens it is in the last opened directory. Normally this is the wrong directory.
When My program starts and File open is selected I want it to open in my default directory.
How can I set this without overriding OnFileOpen and using a CFileDialog
Thanks
---
|
|
|
|
|
You could override CDocManager::DoPromptFileName , but bear in mind that CDocManager is an undocumented class and could change.
Note that Windows itself is providing this default behaviour, which users may have come to expect from their other applications. See the documentation for the OPENFILENAME structure's lpstrInitialDir member (MSDN Library[^]).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Mike Dimmick wrote:
You could override CDocManager::DoPromptFileName
Yep thats what I have done,
and that works fine (as long as CDocManager doesnt change)
Thanks
---
|
|
|
|
|
Anybody been able to get CLSID_WebBrowser to work without having to use MFC and ATL but instead with CoCreateInstance? Mainly, the problem I see is that Navigate or Navigate2 seems to fail.
My code looks something like this:
//hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_SERVER, IID_IWebBrowser2, (void**)&Browser);
hr = CoCreateInstance(CLSID_WebBrowser, NULL ,CLSCTX_INPROC, IID_IWebBrowser2, (void**)&Browser);
CLSID_InternetExplorer seems to work fine but the only problem is I cannot query IHTMLElementRender which is a problem because I want to do a SaveToDC. I can query IHTMLElement perfectly fine though. Here's some more code I have on that.
if (FAILED(hr) || (HtmlElement == NULL))
{
printf("Error: IHTMLDocument2::get_body failed\n");
return FALSE;
}
hr = HtmlElement->QueryInterface(IID_IHTMLElementRender, (void**)&HtmlRender);
if (FAILED(hr) || (HtmlRender == NULL))
{
printf("Error: Unable to QueryInterface for IID_IHTMLElementReader\n");
return FALSE;
}
Has anybody else had this problem? I've checked all over the web and have found little for using CoCreateInstance in conjunction with IHTMLElementRender.
Thanks,
Nathan
Nathan
|
|
|
|