|
Is that what the getch; return 0; lines would usually be used for.
|
|
|
|
|
Yes.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Hello,
I need to modify the last write date of files after it has been changed wrong. Is it possible to change this attribute on a file? how?
thanks
/Fred
|
|
|
|
|
When people normally ask this question it's because they have changed a file and don't want anybody to know... this the case?
<centre>
"Never tell people how to do things. Tell them what to do, and they will surprise you with their ingenuity." - General George S. Patton Jr.
|
|
|
|
|
The reason i ask is because im getting files via FTP, this sets the time "LastWriteTime" of the local file to the current time. In my app i need to use the lastwritetime to compare local files to files in the FTP server. Since FtpGetFile seems to always change this time for the local file, this comparsions isn't usable.
If it's possible to configure FtpGetFile to not change this time it'd be nice but as far as i know that isn't possible(correct me if im wrong).
However, the comparsion could work if i can change the date of the local file right after it has been fetched from the FTP.
|
|
|
|
|
Check CFileStatus
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
You could also check the SetFileTime(...) function, just in cause you are not using MFC...
Peace!
-=- James.
|
|
|
|
|
I want to change a modeless dialog's behavior, in order to make possible
to put it behind the parent window.
How should i change its styles?
rechi
|
|
|
|
|
If the idea is to hide it, why not just hide it (by removing it's WS_VISIBLE style)?
Peace!
-=- James.
|
|
|
|
|
The idea is not to hide it, but to keep it behind the parent.
rechi
|
|
|
|
|
Hi,
I'm using Borlands Make.exe version 3.6 to generate some programs using make files. This doesn't work in Win2k, however. It keeps babling about
"
Fatal: Command arguments too long
NMAKE : fatal error U1077: 'n:\tools\make' : return code '0x1'
"
I don't know why it does that. It only does it under Win2k. Does anyone have a good idea.
It also appeared to work on a Win2k that was upgraded from an NT, though we've only done this on one machine.
Best regards
Lars VJ
|
|
|
|
|
OK, SOMEONE HELP ME!!!! I can't get the IP button to work using Win32 Application in a dialog. Everything works fine until I add the IPButton, calander to the dialog. The program executes and complies fine but I can't see anything? I know it's the Internet Explorer 4 Common Controls but I don't think I am linking right or my service patch 5 did not work? Can someone simply test this because if it works on someone's machine I am going to reinstall. This is just pissing me off..
t
Thanks
Grant Cooper
|
|
|
|
|
I believe that you must call InitCommonControlsEx() first
Nish
One little CD gone,
Then two CDs gone,
Then 5 more gone,
For a total 7 gones,
If I was a CD R,
I'd wanna cry,
Cause I'd be just a goner,
For a nasty CD burner.
[funny how frustration wakes up the poet in me]
|
|
|
|
|
Thank You So Much It worked. You are a god!!! I can now get rid of that string crap I had. Thank you. Ummmm god, I have alot more questions.
Add: comctl32.lib to your lib
#include <commctrl.h> // add this to your header
INITCOMMONCONTROLSEX iccex = { sizeof(INITCOMMONCONTROLSEX), ICC_INTERNET_CLASSES };
// Init the common controls.
InitCommonControlsEx ( &iccex );
Grant Cooper
|
|
|
|
|
Hi,
I haver several PropertyPages, I want that when the user presses the apply button, then to update the data in the COM object ( the normal behaviour)...
... But IPropertyPageImpl seems to work in another way, each time I change to another page, the "apply" method is called, then I cannot make difference between one "apply" of page changed or that the user has pressed the "apply" button ...
Is there anyway to check that ?, Thanks in advance, Greetings
Braulio
|
|
|
|
|
hi all,
i used CWinthread created a worker for monitoring a port. in that thread, i need to connect to database.
so, i hope to connect the database at that class and execute sql in the worker thread. but, i can't do so. seems that the worker thread can't access that object. here is the code, pls give me some ideas!!!
CDatabase db;
class CAN
{
CWinThread abc;
static int workerthread;
//static CDatabase db;
}
i tried both setting the CDatabase as global or static. both are not able to access by workerthread.
do you have any idea letting workerthread using out thread's object?
thanks,
jim
|
|
|
|
|
*.h
--------------------------------------
class CAutoObList : public CObject
{
public:
CAutoObList()
{
size = 10;
p = new int[size];
for(int i=0; i<size; i++)
="" p[i]="i;
" }
="" ~cautooblist()
="" {
="" if(="" p="" !="NULL" )
="" delete="" []p;=""
="" int="" size;
="" *p;
="" void="" output()
="" for(int="" i="0;" i<size;="" trace2("%d:="" %d\n",i,p[i]);
="" }
};
class="" a
{
public:
="" cwinthread="" *pthread;
="" a()
="" pthread="NULL;
" ~a()
="" if="" (pthread="" pthread-="">SuspendThread();
delete pThread;
pThread = NULL;
}
}
void testThread();
};
*.cpp
--------------------------------------------------------
CAutoObList autoList;
UINT CAutoObListThread(LPVOID object)
{
// A *pA = ((A*) object);
for(;;)
{
autoList.Output();
Sleep( 2000 );
}
return 0;
}
void A::testThread()
{
if( pThread == NULL )
pThread = AfxBeginThread(CAutoObListThread, this,THREAD_PRIORITY_HIGHEST);
}
output:
-----------------
0: 0
1: 1
...
9: 9
hope can help!
|
|
|
|
|
Hi,
i always disliked the behaviour of Edit controls and edit controls in combo boxes when pressing the RETURN key.
I just wrote a program using WTL and tried to derive a new class from CEdit and handling the WM_KEYDOWN message myself to suppress the sending of the RETURN key event to the controls parent. All key presses are sent to my handler EXCEPT the RETURN and the ESC key.
What do i have to do in order to make this thing work ???
Thanx in advance !
Erich Führer
|
|
|
|
|
check "want return" in controls properties, as far as i know, and then u can type enter in multiline edits
|
|
|
|
|
or u have to add PreTranslateMessage() and the catch VK_RETURN
|
|
|
|
|
Yup,
i already got that far. The problem i have is that i cannot override the PreTranslateMessage function that easily within the Windows Template Library. It sits within a class called CMessageLoop and i have the fear that i have to derive a class from that and build a whole new CEdit class from that setup. I am just interested if there is an easier way to do that
Erich Führer
|
|
|
|
|
sorry, i didnt get that far
|
|
|
|
|
When a edit control isn't multi-line or the ES_WANTRETURN style isn't set, then the edit control won't respond with DLGC_WANTALLKEYS to the WS_GETDLGCODE message from the dialog box.
Try overriding WS_GETDLGCODE to add DLGC_WANTALLKEY.
But, I really have to question why you want to change this behaviour. For your own personal application, do what you want. But for an application that is to be distributed or sold, it is a HUGE mistake to change the expected UI just because you don't like it. People will just report this as a bug.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi All,
I'm considering undertaking a little project of my own, and came up with a idea for what I wish to do but currently cannot.
The idea is to simply create a program that gets the video stream from my digital video camera. At the moment I have several programs that can display what is incoming over firewire, including capturing programs and even Explorer in Windows XP.
The problem with all of these is that they are in a pissy little window that cant be made any bigger or maximized.
The program I want to make will simply allow the video stream to be displayed in a resizable window, or maximized to take the full screen. I might add functionality to capture to avi files but first things first that's what I want to acheive. Just a program to watch the video!!!
So if anyone could point me to any information on how to program with the 1394 interface or what I should look at to write this program. I'm pretty new to window programming so this is quite ambitious for me, and so far I have only done a little bit of programming with MFC, but I've got a fair bit of spare time so i'll give anything a go!
Thanks for any advice!
-Mark
|
|
|
|
|
Hello.
I have a doc/view program. The view was derived from CEditView. It however, would not display text when I open a text file with text in it.
For example:
Source file:
---
a
b
c
---
When I open that file up, the program copies the text into a CStringArray object. I can change any line by adding or removing text. However, the program will not display the text in view. The only way to get it to display the text is if I type in the text manually.
The view was derived from CEditView. CEditView allows access to the CEditCtrl. Nonetheless, I cannot find a way to *insert* a CString into the CEditCtrl inside of CEditView. Furthermore, I tried drawing the text, but view still would not display anything.
Is it possible to add text or display text in the CEditView without having to manual type it in? CEditCtrl returns a CEdit reference object. There is a function, GetLine(line, string) to get text from a specific line. However, there are no functions to set the text at a specific line.
Thanks,
Kuphryn
|
|
|
|