|
Schlaubi wrote:
Does that mean the single line of text is put into the first line
Yes.
Schlaubi wrote:
In the former case, the problem could be that when setting the text only the background of the new inserted lines of text gets redrawn.
aha, hm... aiight!
Schlaubi wrote:
You possibly could solve that by drawing the whole client background when handling WM_CTLCOLORSTATIC, f.i. by use of FillRect.
In either case, calling UpdateWindow or RedrawWindow after setting the text could help
I'll try it out!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Thanks for your help, I've found out what was wrong in my code now.
Can I abreact now?
F***ing Damnit!!!!
But it's thanks to Bogdan Rechi and his example project he sent to me!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
(I posted this at the wrong forum before!)
Hi,
I'm writing a program that is supposed to detect the configuration of outlook express (installed in the machine where the application is run). When I say configuration I mean the pop and smtp servers, at least. Now, reading the registry I can get that info, but the registry keys vary according to the user (right?), because different user profiles (windows 2000) can have different outllo express configurations. What I really need is to detect the configuration for the user that is executing the application.
For Example, my reg key for this is in:
HKEY_USERS\S-1-5-21-3046562155-3082545408-3971354878-2339\Software\Microsoft\Internet Account Manager\Accounts\00000001
Now, what is this number: "S-1-5-21-3046562155-3082545408-3971354878-2339"? I don't think it's going to be the same in different machines, therefore I don't seem to be able to detect what I want using the registry.
Any ideas?
Thanks!
-- narada
|
|
|
|
|
That big string you see in the registry is a unique user identifer; so you're right it will be different from machine to machine and user to user. Instead, use the key: HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts to get this information. You'll need to traverse all the sub-trees under this tree because OE could have multiple accounts configured.
Ron Ward
|
|
|
|
|
Thanks so much! It's working!
-- narada
|
|
|
|
|
Hi,
Maybe somebody had an experience? How to serialize an image, any format.
|
|
|
|
|
there are probably ten different articles on CodeProject that give you ten different ways to do this.
look in the "Bitmap and palettes" section.
-c
WWT2D?
|
|
|
|
|
but no clue there on how to pass an image to stream operator(>> | <<)
|
|
|
|
|
I am playing emf files around the rectangle using for loops.First I am playing two hor then two ver.How to increase the speed of the playing?
|
|
|
|
|
Hi,
I've written a DLL which modifies some of the Registry Entries. I've used RegOpenKeyEx method for opening and RegCloseKey for closing the registry keys. When I run this code many times in a loop it shows a memory leak and the virtual byte count increases in the performance monitor. I've taken all precautions to check for any key remaining open. I've tried a similar code in a EXE code and it works fine without any byte increase. Can somebody help me in this regard.
Thanks and Regards,
Abhishek.
I hope this code would give you some idea.
**************************************************
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
BOOL _cdecl CheckClient::Run(TCHAR *szEventLogMessage, TCHAR *szAlarmMessage)
{
long lRetValue = 0;
HKEY hkey = NULL;
TCHAR szRegPath[100] = {0};
_tcscpy(szRegPath, _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList"));
lRetValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE,szRegPath,0,KEY_AL
L_ACCESS,&hkey);
if (lRetValue == ERROR_SUCCESS)
{
long lRetVal = 0;
_tcscpy(szEventLogMessage, _T("Executed this code"));
lRetVal = RegCloseKey(hkey);
if (lRetVal == ERROR_SUCCESS)
{
_tcscat(szEventLogMessage, _T("Success in closing the key"));
}
hkey = NULL;
}
hkey = NULL;
if (_tcscmp(szEventLogMessage,_T("")) == 0)
_tcscpy(szEventLogMessage, _T("The method has been executed first time."));
else
_tcscat(szEventLogMessage, _T("The method has been executed second time."));
return TRUE;
}
__________________
|
|
|
|
|
The function seems not to leak. Can you post the code of the loop where you're calling CheckClient::Run ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi,
i am new to MFC,can any one suggest me a tutorial site?
thanks in advance
|
|
|
|
|
|
Thanks for the Information given.
Now one more Problem,I have created a MFC Dll(Mydll),the Class Name is CMyClass with a function Function1().How can i use the dll in the asp page?i want to use the above function.will be waiting for ur reply
|
|
|
|
|
I don't know much hardly anything about ASP, but I would guess you can make the class in your DLL a COM object to take advantage of it from ASP. You will need to find an MFC sample about COM.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Hi,
I am working on the application wherein i have to download the file from the URL mentioned.
But the problem is I have to support the resume operations for broken downloads...using mfc.
How do i do this using mfc. Please give me your inputs.
TIA,
Snowy
|
|
|
|
|
Once you have instance of an CHttpFile object and an instance of a CFile object, you can make a calls similar to the following:
DWORD dwStartAt = oLocalFile.SeekToEnd();
pHttpFile->Seek(dwStartAt, CFile::begin);
Then you can begin the loop of pHttpFile->Read and oLocalFile.Write calls.
Let me know if you need a larger code sample.
Ron Ward
|
|
|
|
|
I read the article named "The Cryptography API, or How to Keep a Secret", written by Robert Coleridge. He told that in order to compile the sample of this article I only need MS Visual C++ version 4.2 or later and Windows NT 4.0 or later. In fact, I cannot compile it with MS Visual C++ 6.0. I use MS Windows 2000 professional.
I'm also failed in building my own application using Cryptographic API. In spite of including wincrypt.h , I still catch the undefined compile errors.
In order compile my application, do I have to add any macro in my code or download any service pack for my Visual Studio?
|
|
|
|
|
vuduo wrote:
In order compile my application, do I have to add any macro in my code or download any service pack for my Visual Studio?
Try this one:
#define _WIN32_WINNT 0x0500
This should do the trick.
--
karl
|
|
|
|
|
Hi
I have a CTreeCtrl in a window which is the child window of another window (main window).
When I deselect (with SelectItem(NULL)) my selection when my CTreeCtrl window has the focus, the result is as expected.
However when I deselect my selection when the main window has the focus, my CTreeCtrl clears selection but sets the selection to the first visible item as soon as the window with the CTreeCtrl gets the focus again. Is this intended or a Windows bug? This is very annoying and I can't find a workaround
Anyone knows how to deal with this?
By the way I set the option "Show selection always", so my problem isn't linked to that
|
|
|
|
|
hello @all,
i have:
char r1[1000];
how can i delete the char r1???
thanks you
sunny
|
|
|
|
|
you can't "delete" something that you didn't create with "new".
-c
WWT2D?
|
|
|
|
|
If you mean clearing out the array do this: r1[0] = '\0'; (All clear!)
|
|
|
|
|
georgiek50 wrote:
If you mean clearing out the array do this: r1[0] = '\0'; (All clear!)
This assumes you are using r1 as a character string rather than an array of bytes.
If you want to "clear out" an array, try:
memset(r1,0,1000);
|
|
|
|
|
Even though it is an array of byte wouldn't \0 take care of everything? which brings me to ask another question. If I declared an array of bytes say array[100] but then only needed to fill the first fifty. Do I need a NULL character like in a string? If yes how would I set it. If no, why not?
|
|
|
|