|
Sorry but i use internet in school and we had a holiday from Saturday to Wednesday so i could not send any messages to you (or even to read them).
But now i can so thanks for all!
Vis
|
|
|
|
|
|
Sorry, but i could not even read your messages because i was on holiday for a few days and i hadn't got any computer or else to use the net.
But now i have so i say thanks for you all: Thanx!
Vis
|
|
|
|
|
I have SDI, when I resize it or non Active.. all will be clear as new document. Help me,how to save it???
|
|
|
|
|
What do u mean all will be clear ?
Do u mean that ur view is getting erased ?
|
|
|
|
|
Draw dot, and type text... more
|
|
|
|
|
Hi,
I´m running Ms Word Automated, when I run my program I show that word document inside my framework, the problem comes when the user wants to load a document, I would like that the user could be able to load the doc in the same window that is open ( not what Ms Word makes open a new Word Window, for the new opened file ).
How can I do that ?, Thanks in advance, Greetings
Braulio
|
|
|
|
|
Where is the user selecting the new document from ?
Is it from your own File->Open
or from the Explorer ?
If it is from the explorer it is using file association and you cannot change
that behaviour only for that session.
Try to provide the user an option to open a document from
you own file menu,.
|
|
|
|
|
Is from my own menu, but If I try to show the standard open dialog it fails ( and If I try to open the document, then it creates a new window for the new Word instance).
Can you help me a bit more ?, Thanks a lot, greetings
Braulio
|
|
|
|
|
Look at this example, it shows what u want.
http://www.codeproject.com/com/xoffice.asp
|
|
|
|
|
The problem with that sample is that it load the template when it creates the new doc, but what I need is to let the user load in the same window, later another document
m_ctrl = new CXOfficeCntrItem(this,path);
|
|
|
|
|
I am writing an application that the user will have to log into using their network password. I woudl like to be able to send their username and password to a server and validate it. If anyone could help me with this, I would appreciate it. Thanks
T
|
|
|
|
|
Well you could try to validate the user
by logging into the server.
BOOL LogonUser(
LPTSTR lpszUsername, // user name
LPTSTR lpszDomain, // domain or server
LPTSTR lpszPassword, // password
DWORD dwLogonType, // type of logon operation
DWORD dwLogonProvider, // logon provider
PHANDLE phToken // receive tokens handle
);
|
|
|
|
|
I think that function LogonUser() could help you.
|
|
|
|
|
The problem with LogonUser() is, it requires WinNT/2000. What happens if this app is intended to use from 95/98??
Some time back I did 'change password' thing. In that I loaded 'NetApi32.DLL' and got the func ptr for 'NetUserChangePassword' and used it to change the password for user under any domain. There are some more 'NetUser*' functions available in the dll. I am sure inthat, there will be a 'login' kind of function in 'NetApi32.Dll'.
The advantage of this way is the app can be run on any Windows machine.
|
|
|
|
|
NetUserChangePassword
is not for Win 9X Systems
the foll. is from the MSDN.
Requirements
Windows NT/2000 or later: Requires Windows NT 3.1 or later.
Windows 95/98/Me: Unsupported.
Header: Declared in Lmaccess.h; include Lm.h.
Library: Use Netapi32.lib.
|
|
|
|
|
OOPS!! I am sorry. You are right.
I recollect it now (I just opened the my old project code in soursafe
).
While changing the passwords, what I did was: For Win 9x I loaded Mpr.Dll and used some functions like PwdSetPasswordStatus, PwdChangePassword to change the network password. For other OSs I loaded NetApi32.Dll.
bye bye.
|
|
|
|
|
Srini Kella wrote:
I woudl like to be able to send their username and password to a server and validate it.
I understood you would like to validate user at the server
I guess your server is not running Win9x, so that scenario could work.
|
|
|
|
|
I'm learning MFC trough internet so I don't have a book. But I haven't found any tutorial on how to make a simple "open file" dialog. Where can I find one? Thanks
|
|
|
|
|
Just take a look here:
http://msdn.microsoft.com/library/en-us/vcmfc98/html/_mfc_cfiledialog.3a3a.cfiledialog.asp
http://msdn.microsoft.com/library/en-us/vcmfc98/html/_mfc_cfiledialog.3a3a.domodal.asp
Best regards,
Vladimir
|
|
|
|
|
I'm using CSTScreenBuffer class to load image and get bitmap handle, and I'm
manipulating bits to display Images on windows-CE based paltform( pocket PC2002).
It just works fine while i'm using small sized JPG images (around50-60KB)
, but it has problem with big sized JPG images.
i can't get any valid bitmap handle at all. handle is always NULL!!!
i tried so many ways to solve this problem all weeks.
can anybody give me any clue for this trouble!!!
Of course, i used VOImage class for my project. But it has low speed and quality...
And one more question - can i use memory-mapped related functions to read
JPG image file? i tried, but it failed. ((->>jpeg_read_header(&cinfo, TRUE);))
here's my source code
//*********************************************************************8
HBITMAP CPhotoListCtrl::LoadJPG(CString strFilePath)
{
CSTScreenBuffer sts;
FILE * pFile;
JSAMPARRAY pBuffer;
int nRowSize;
ByteArray imageData(320*240*3);
struct jpeg_error_mgr jerr;
struct jpeg_decompress_struct cinfo;
if ((pFile = _tfopen(strFilePath, _T("rb"))) == NULL) {
CString strError;
strError.Format(_T("Can't open file '%s'"), strFilePath);
AfxMessageBox(strError);
return 0;
}
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, pFile);
jpeg_read_header(&cinfo, TRUE);
jpeg_start_decompress(&cinfo);
nRowSize = cinfo.output_width * cinfo.output_components;
pBuffer = (*cinfo.mem->alloc_sarray)
((j_common_ptr) &cinfo, JPOOL_IMAGE, nRowSize, 1);
while (cinfo.output_scanline < cinfo.output_height) {
jpeg_read_scanlines(&cinfo, pBuffer, 1);
imageData.Append(pBuffer[0], nRowSize);
}
//************************************************************
HBITMAP hBitmap = sts.CreateBitmapByRGBArray(imageData.GetData(), cinfo.output_width, cinfo.output_height);
//***********************************************************
// ======>>> hBitmap is NULL !!!!
jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
fclose(pFile);
return hBitmap;
}
//*********************************************************************
|
|
|
|
|
Anyone got the function to do this? Its a pain in the arse!
Cheers.
Pete
|
|
|
|
|
time_t mktime(struct tm* ptr);
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
|
There's probably a simple explaination..
On my spin button when I press the down arrow it increments the integer value in an edit box and when I press the top arrow it decrements it. How do I fix it so that up means up and down means down!
Thanks.
|
|
|
|