|
TPN wrote:
Oh, "Scheduled Task" tool of Windows is based on AT, isn't it?
I don't know.
TPN wrote:
If not, is that tool equivalent AT?
I'd say they are very similar.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
ultimatly every program (even the part of OS) do the same thing as you expect.
they also check for the date and time frquently and compare the current time
is Windows Sheduler can help you?
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
But using a timer is not an exactly way, by ex : Starting a task when a new day starts. We can not check date/time every 1/1000s, it wastes the computer resources.
I don't know how to do, but it's very important for me.
Thanks you.
|
|
|
|
|
Hi!
I realy need to download thr Photoshop SDK .. propearly 6.. because 7 is not for free... there can i download it???
I need to make a plugin for PS ... maybe i need another info about it.. maybe not the SDK? so if not, wat?
help me please
|
|
|
|
|
I have an MFC dislog app. The dialog has nothing on it since everything is being drawn my GDI+. My nothing I mean no menu bar or anything just a blank dialog.
I am trying to capture virtual key presses such as VK_LEFT, VK_DOWN etc. Several odd things are happening.
If you create a simple MFC dialog app with the wizard it will have two default buttons, On and OK. Using the wizard you add a message handler for OnKeyDown(). Now if you try to capture any keypresses the app just sound a "bonk" sound and does nothing. If you delete two default buttons then the OnKeyDown will capture keypress like 'A' and 'a' but still not pressed like VK_LEFT.
Ugh...
Can anyone shed some light on the subject?
Thanks,
Steve
|
|
|
|
|
For virtual keys like VK_LEFT try ON_WM_SYSKEYDOWN() and OnSysKeyDown().
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
How to check if file existe (not by trying to open it, fail : not existe or not)
How to get the temporary file name which is not coincide with existing files.
|
|
|
|
|
Hi,
1. Check File exists
CFileFind chkFileExistence;
if(chkFileExistence.FindFile(strFileName))
{
//File exists
}else{
//File does not exists
}
2. Creating Temporary File Name
You can use different methods to create a temporary file
name. My suggestion, try to create a file name with
Date & Time.
Hope this helps.
regards
~Hari~
|
|
|
|
|
Any more question : How to check if file existe in VB?
Thank you for your fast reply.
|
|
|
|
|
to check if a file exist you can use the shell function
BOOL PathFileExists(
LPCTSTR pszPath
);
it takes the file path and return 1 if it exist and 0 if not
for temporary files, there is the function
UINT GetTempFileName(
LPCTSTR lpPathName,
LPCTSTR lpPrefixString,
UINT uUnique,
LPTSTR lpTempFileName
);
which can be used to generate temporary file names.
The temporary path is formed like this
lpPathName+'\'+lpPrefixString+[uUnique as hexadecimal] + ".tmp"
and returned in the lpTempFileName for e.g if the path is c:\ and the unique integer is 10 and the prefix is "fil" the result will be c:\fil000A.tmp .
The uUnique parameter should have a unique integer value but if you passed 0 the system will assign this unique value.
|
|
|
|
|
Thanks so much. That is all I need.
|
|
|
|
|
TPN wrote:
How to check if file existe (not by trying to open it, fail : not existe or not)
You can use _access() or CFile::GetStatus().
TPN wrote:
How to get the temporary file name which is not coincide with existing files.
Use GetTempFileName().
|
|
|
|
|
Here's how you check if file exists :
CFileFind fileCheckExistance;
CString strPath = "C:\\Test\\myfile.exe";
if ( fileCheckExistance.FindFile( strPath ) )
AfxMessageBox("File exists !");
else
AfxMessageBox("File doesnt exist.");
|
|
|
|
|
thanks to see my question
I hope to use MFC to browse remote directory
my ideal is write one server, one client
when client ask server`s directory
i let server transfer local "BROWSEINFO" to client
and client use it borwse directory function to read
server`s "BROWSEINFO"
but i can`t use socket to transfer "BROWSEINFO" ?
i don`t know what type "BROWSEINFO" is.
or what I think is total worng?
thanks~
Chai-Yuan, Young
chai_yuan@msn.com
|
|
|
|
|
hello i am newbies
i want how to configurate(creat,....) a thread to launche a function that i want to be executed in one part of time?
|
|
|
|
|
Hello...I have a form with some edit controls. there are two modes (1 and 2). In mode 1 some controls should be available for editing, and a button visible and available; and other controls should be unavailable for editing and another button not visible.
Changing to mode 2 invert the availability.
My problem is that I do not know if this is possible to do it at runtime. If this is possible, how do I do it?
I know where to put the code to enable and unenable the controls, but I would like to know what are the visual c++ statements to do this.
Can anyone give me a hand?
Thanks
Eric Manuel Rosales Pena Alfaro
PhD student
Unversity of Essex
Wivenhoe Park
Colchester, CO4 3SQ
Essex, Uk
email: emrosa@essex.ac.uk
tel: +44-01206-87311
|
|
|
|
|
Here are some essential control functions.
EnableWindow()
ShowWindow()
MoveWindow()
SetWindowPos()
Kuphryn
|
|
|
|
|
Hi
I created an MDI application and divided the document into 2 rows, whereby the upper row is divided again into 2 colums (similiar to the irc-client mIRC).
The second row is of type CEditView , the right column of type CListView . That's how I created the splitter windows:
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
CRect cr;
GetClientRect(&cr);
if(!m_mainSplitter.CreateStatic(this, 2, 1))
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR);
return FALSE;
}
if(!m_mainSplitter.CreateView(1, 0, RUNTIME_CLASS(CEditView), CSize(cr.Width(), cr.Height()-iEditHeight), pContext))
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR);
return FALSE;
}
if(!m_secSplitter.CreateStatic(&m_mainSplitter, 1,2,WS_CHILD | WS_VISIBLE | WS_BORDER, m_mainSplitter.IdFromRowCol(0, 0)))
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR);
return FALSE;
}
if(!m_secSplitter.CreateView(0, 0, RUNTIME_CLASS(CFoxIRCView), CSize(cr.Width()-150, cr.Height()-iEditHeight), pContext))
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR);
return FALSE;
}
if(!m_secSplitter.CreateView(0, 1, RUNTIME_CLASS(CListView), CSize(150, cr.Height()-iEditHeight), pContext))
{
MessageBox( "Error setting up splitter frames!", "Init Error!", MB_OK | MB_ICONERROR);
return FALSE;
}
m_mainSplitter.SetRowInfo(0, cr.Height()-iEditHeight, 0);
m_secSplitter.SetColumnInfo(0,cr.Width()-iListWidth,0);
m_secSplitter.SetColumnInfo(1,iListWidth,0);
m_pOutputView = (CFoxIRCView*)m_secSplitter.GetPane(0,0);
m_pNicklistView = (CListView*)m_secSplitter.GetPane(0,1);
m_pCommandView = (CEditView*)m_mainSplitter.GetPane(1,0);
CRichEditCtrl& m_ctlOutput = m_pOutputView->GetRichEditCtrl();
CListCtrl& m_ctlNicklist = m_pNicklistView->GetListCtrl();
CEdit& m_ctlCommand = m_pCommandView->GetEditCtrl();
...
}
But whenever I hit Ctrl+X/C/V inside the EditView or the ListView my app crashes in viewrich.cpp in line 1870 :
COleClientItem* CRichEditDoc::GetPrimarySelectedItem(CView* pView)
{
ASSERT(pView->IsKindOf(RUNTIME_CLASS(CRichEditView)));
return ((CRichEditView*)pView)->GetSelectedItem();
}
Where's the error?
Thanks in advance
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
the basic problem is MFC command routing not going down into the individual views inside mdichildframe, so either fix that
CFrameWnd::OnCmdMsg()
ie cut, paste ,copy is not being handled by each individual view but by either the document or the app.
|
|
|
|
|
in addition
firstly unless you absolutely need COleDocument and CRichEditControl ditch them and go with CDocument and CEditView derived classes. If you need CRichEditView
then you need to be creating one instead of the CEditView.
secondly derive a CSplitterWnd class and override SetActivePane() which will
set the active view and allow command message routing down into the view.
void CIndicatingSplitterWnd::SetActivePane(int row, int col, CWnd* pWnd)
{
// set the focus to the pane
CWnd* pPane = pWnd == NULL ? GetPane(row, col) : pWnd;
if (pPane->IsKindOf(RUNTIME_CLASS(CView)))
{
CFrameWnd* pFrameWnd = GetParentFrame();
ASSERT_VALID(pFrameWnd);
pFrameWnd->SetActiveView((CView*)pPane);
}
else
{
TRACE0("Warning: Next pane is not a view - calling SetFocus.\n");
pPane->SetFocus();
}
}
|
|
|
|
|
and finally
/////////////////////////////////////////////////////////////////////////////
CWnd* CIndicatingSplitterWnd::GetActivePane()
{
// return active view, NULL when no active view
ASSERT_VALID(this);
// attempt to use active view of frame window
CWnd* poActivePane = NULL;
CFrameWnd* pFrameWnd = GetParentFrame();
ASSERT_VALID(pFrameWnd);
poActivePane = pFrameWnd->GetActiveView();
// failing that, use the current focus
if (poActivePane == NULL)
{
poActivePane = GetFocus();
}
// walk it up
if (poActivePane != NULL)
{
while ( (poActivePane->GetParent() != NULL) && (poActivePane->GetParent() != this) )
{
poActivePane = poActivePane->GetParent();
}
}
// make sure the pane is a child pane of the splitter
if (poActivePane != NULL )
{
if (poActivePane->GetParent() != this)
{
poActivePane = NULL;
}
}
return poActivePane;
}
|
|
|
|
|
Thank you VERY much, I will try that later
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I don't know what the proper terminology for it but I am trying to understand why the little popup window that you get when you are dealing with pointers or strctures, sometimes works and sometimes doesn't. Say you have a setup like this:
struct MyStruct {
int iData;
}
MyStruct mystruct;
then when you type
mystruct. <- here you will get the nice little pop up window..
Anyone knows why it doesn't work sometimes and why it does work?? Help please.. I like that little pop up.. I am using VC6.0 with service pack 5.
I am specially having hard time with double pointers and for my first pointers I get that nice little pop up but not for the second one...
|
|
|
|
|
This intellisense problem is a well known bug in VS6.0+ - think - and this is a guess only - it has something to do with includes. Not sure.
Michael Mogensen.
|
|
|
|
|
I don't know if this was the case in VS6 (since I haven't used it in a while), but I have noticed that VS.Net refuses to give the popup if you have a syntax issue preceding the code you are currently typing. I wouldn't really call that a bug though. Now that I've noticed that it happens, when the box doesn't popup I start looking for a missing brace or semi-colon, etc. Kind of helpful in a way.
I know it doesn't really help you with your problem, but just something to look out for.
--Dean
|
|
|
|