|
if MyServer.exe is currently running, it won't be able to overwrite its own exe
What you'll need to do is something like this
in MyServer.exe
Check internet for update
if update available
{
download update package
launch Updater.exe
quit MyServer.exe (saving everything gracefully)
}
---
in Updater.exe
Wait for MyServer.exe to shut down
Depack update package
Launch updated Myserver.exe
quit Updater.exe
---
You might want to set this update process so that it can be scheduled at a quiet time for your server. E.g. if it's main traffic is from 9am - 5pm, then make it try to update at 5am
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
Now I do something about barcode, some barcode uses Fonts, some uses draw lines.
this post is not related to barcode, but it is caused from barcode.
a vertical line can be printed by 2 methods:
1. by font (such as character '|')
2. by drawing (such as LineTo())
as I tested, vertical line is printed much clearer by font than drawing for both laser and inkjet printers, do you know why?
important: do you know how to draw a line imitating vert line of font, which is much clearer than nomal LineTo()?
|
|
|
|
|
hi,
I am looking for way, how to copy text from Windows aplication to
MS-DOS. I just need to get simple text into DOS(window) -such Notepad
There is of course no clipboard support - I thought about simulate key strokes, but is it possible without writing device driver.
Any idea will help
Thanx
viliam
|
|
|
|
|
From within Windows right click on the MS-DOS icon and select "Properties". Select the "Options" tab. Tick the "QuickEdit mode" and "Insert mode" tick boxes. Press OK. Now you can right click in a DOS box to paste or select text with the left mouse button and right click to copy.
Steve
|
|
|
|
|
this works well but if I need to run program in fullscreen mode
it doesn't. Is there any trick to handle fullscreen?
(without taking it into windows and back)
viliam
|
|
|
|
|
I don't know how to make it work in fullscreen mode apart from by switching to windowed mode with ATL-ENTER, performing the operation then switching back.
Steve
|
|
|
|
|
I don't understand what you are trying to do. If you want to display text in a console application, why don't you use
cout<<"Text to be displayed";
Now, I don't understand what you mean by 'how to copy text from Windows aplication to MS-DOS'...
Could you be more specific ?
|
|
|
|
|
I have Win32 program with text data and I need to export
this text into dos applicatin
(I am not developer of this DOS program, I just want to save time
necessary to retype it from my program into DOS program)
Something like RE: above (with mouse)
but better programmely and in fullscreen mode as well.
viliam
|
|
|
|
|
Hi all,
I have an basic MDI application with a view class derived from CView. The view class has a string member(CString m_strTime) to get the system time in its constructor. I am displaying the sting in OnDraw. Now consider that I have opened three child windows.
I have a menu "Update" -> "Reset Time". I want to update all the child windows with the latest time. I am updating the latest time in Application class's member "strAppTime".
Pls look at the code:
CMyView::CMyView()<br />
{<br />
CTime t = CTime::GetCurrentTime();<br />
m_strTime = t.Format("%A, %B %d, %Y - %H:%M:%S") ;<br />
}<br />
<br />
<br />
CMyView::OnDraw(..)<br />
{<br />
CString strTime ;<br />
<br />
strTime = ((CMyApp*)AfxGetApp()) ->m_strAppTime ;<br />
<br />
if(strTime != "")<br />
pDC->TextOut(0, 0, strTime) ;<br />
else<br />
pDC->TextOut(0, 0, m_strTime) ;<br />
}<br />
<br />
<br />
void CMainFrame::ResetTime() <br />
{<br />
CMDIChildWnd *pChildWnd = MDIGetActive() ;<br />
if(!pChildWnd)<br />
return ;<br />
<br />
CTime t = CTime::GetCurrentTime();<br />
((CMyApp*)AfxGetApp()) ->m_strAppTime = <br />
t.Format("%A, %B %d, %Y - %H:%M:%S") ;<br />
<br />
pChildWnd->GetActiveDocument()->UpdateAllViews(NULL) ;<br />
<br />
}
It updates only the active child window. How to make possible for all the children. If I use MDIGetActive() and MDINext(), it changes the window order, as you know. It reflects clearly in Cascade arrangement.
Kindly suggest me a solution.
Thanks in advance,
Sarvan AL
|
|
|
|
|
You can create a Registered Message and send this message to all child windows using SendMessageToDescendants .
Make sure you send it to all immediate child windows only.
Have a message map entry in each child window for this message. Do updation there.
Nibu thomas
Software Developer
|
|
|
|
|
Hi Nibu,
Great. I never thought of this function.
Thanks a lot for your fruitful suggestion.
Sarvan AL
|
|
|
|
|
Hello,
I'm trying to add some text to a picture, drawing with the CxImage DLL.
The picture will be draw, but the text doesn't.
This is the code:
CPaintDC dc(this);
CRect rcDraw;
GetClientRect(&rcDraw);
CString text = "Test";
COLORREF color = 0x00FFAFFF;
// Draw Image
m_pImage->Draw(dc.GetSafeHdc(), rcDraw);
m_pImage->DrawString(textdc.GetSafeHdc(),0,0,text,m_pImage->RGBtoRGBQUAD(color),"Arial",1,400,0,0,true);
What's my fault???
Thank you for answers!!
Greatings
RiHaus
|
|
|
|
|
i m new to activeX controls.i had used datagrid in VC++. data grid contains more rows than visible ones. i send message to grid for updating a particular row.if this row is not visible in the grid then error : invalid row number is displayed.
so now can anybody tell me the way so that i can make that particular row visible.
i need immediate help on this. plzzzzzzzz help me
--------------------------------
jiteen tilekar
|
|
|
|
|
Your question is not very clear. Why are you sending a message to the grid control ? I think it offers some functions that allows you to show or hide rows (I'm not sure).
helpcode wrote: if this row is not visible in the grid then error : invalid row number is displayed.
What is the exact error ? I suppose this is a runtime error (something that happens when you execute your prog, not during compilation). Do you get a message box showing an error message ? Can you post the EXACT error message ?
I guess you try to access a row that is not in the control: the rows are zero-indexed, which means that the first rows is 0 and the last one is RowCount-1 (you probably try to access the row at RowCount)
|
|
|
|
|
the error messagebox is :
Invalid Row Number
this error is not at runtime or design time.but rather i think is it a limitation of DBGrid control?? here from combo if i select row number 20 and grid is displaying only 10 rows at present then this error displayed
But after scrolling manually rows if now grid is displaying rows from suppose 15 to 25 or a range in which row num 20 is there ,then it works fine.
now u can guess i have access to only those rows which r displayed in grid at that time....
jiteen
|
|
|
|
|
helpcode wrote: this error is not at runtime or design time
Yes, this is a runtime error: you get an error message when something happens during the execution of your program.
helpcode wrote: here from combo if i select row number 20 and grid is displaying only 10 rows at present then this error display
That is logical ! If there are only 10 rows in the grid and you try to access an inexistant row, you will get an error. That seems perfeclty logical to me. You cannot access something that doesn't exists. Or what ? How many rows do you have in your grid ?
Post the code of: 1) the creation of your grid and when you add rows to it and 2) the code which is giving you the error.
|
|
|
|
|
this event i have written on combo selection.
m_msdGrid : obj. of DBGrid control's CMsDGridCtrl class
i got error on this line: m_msdGrid.SetRow(i);
all the rows r present in the grid.
eg if u wanna to see this docu. u will scroll it. but at first only some aprt is visible.u need to scroll to see rest of it. same case is there.all the rows r there in the grid.but for seeing 20 th row u need to scroll down.
i need auto scrolling so that even if i selected any row from the combo control the grid should be scrolled to that row until that row becomes visible in the grid view.
void CProppage::OnIdSelected()
{
CString strGridID;
m_cmbReaderID.GetLBText(m_cmbReaderID.GetCurSel(), m_strReaderID);
if(m_strReaderID.IsEmpty())
return;
long lReader = atol(m_strReaderID);
m_msdGrid.SetCol(0);
for(int i = 0; i
|
|
|
|
|
hi,
I have derived a class ListCtrlEx from CListCtrl and exported that class in a dll. The ListCtrlEx containes some member variables of CRect and CString.
Now in a standard MFC dialog based application, I have created a class which is derived from ListCtrlEx. Then when compiling I am getting some warning saying..
"warning C4251: 'm_MinBtnRect' : class 'CRect' needs to have dll-interface to be used by clients of class ListCtrlEx"
What is problem.. How can fix this warning( i don't want to use #pragma disable )
Thanks in advance
nave
|
|
|
|
|
|
Hi,
I have one menu as PanelMenu in Doc/View and it contains some popup menus...I have to delete the main menu as well as pop up menu..
I used DeleteMenu command but it deletes only the PopUp menu.
I have to delete the main menu itself.
Wat can i do?
-- modified at 1:27 Thursday 27th April, 2006
|
|
|
|
|
Anu_Bala wrote: I have to delete the main menu as well as pop up menu..
Anu_Bala wrote: I have to delete the main menu itself.
What about SetMenu(NULL) ;
Nibu thomas
Software Developer
|
|
|
|
|
Hi all!!
Does there anyone know what's the difference between CDialog and CView?
I would appreciate your reply!!
|
|
|
|
|
See MSDN CView and CDialog
it's perfect.
|
|
|
|
|
Questions for you genius coders out there:
1) Are the iterators for maps produced random? I need to be able to call random_shuffle, and I want to make sure I can with this type of container.
2) Is there a way to insert to the front of a map, even if the key I want to insert isn't lexiographically the first key listed? (i.e. if I call begin, then I want to see it first)
3) Can I store dynamically created objects in a map?
Thanks very much in advance!
-- modified at 0:03 Thursday 27th April, 2006
|
|
|
|
|
1) They are bidirectional iterators, not random access.
2) No.
3) Yes - store a pointer to the object.
Calling random_shuffle makes no sense for a map .
Steve
|
|
|
|