|
I worked it out. i used the ON_WM_CTLCOLOR_REFLECT function and instead of delcaring the variables for the colours in that function, i did it in the constructor, and it worked.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
if(pWnd->GetDlgCtrlID()==IDC_EDIT1)
{
pDC->SetBkColor(RGB(100,100,100));
hbr = CreateSolidBrush(RGB(100,100,100));
}
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I tried what you have said and it works, but only if the code is in the dialogs .cpp file. The problem is that I am going to put my class in a dll file so i dont need to re-write it for each app. When i put that in the CEdit derived class, and made the edit ctrl have a member variable for my class, it did not work.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
Hi, pals!
I copy some codes from a book dealing with registry table.
But I meet with the following errors when compiling. The compiler
says, CRegKey is an undeclared identifier. Here is the following
codes, how to fix the trouble?
CRegKey reg;
char KeyName[]="Software\\Microsoft\\Internet Explorer\\Extensions\\{06926B30-424E-4f1c-8EE3-543CD96573DC}";
TCHAR PathName[MAX_PATH];
TCHAR IconPathName[MAX_PATH];
TCHAR HotIconPathName[MAX_PATH];
GetModuleFileName(0,PathName,MAX_PATH);
strcpy(IconPathName,PathName);
strcpy(HotIconPathName,PathName);
strcat(HotIconPathName,",131");
strcat(IconPathName,",129");
reg.Create(HKEY_LOCAL_MACHINE,KeyName);
reg.SetValue("{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}","CLSID");
reg.SetValue("Yes","Default Visible");
reg.SetValue("VC Knowledge Base","ButtonText");
reg.SetValue(IconPathName,"Icon");
reg.SetValue(HotIconPathName,"HotIcon");
reg.SetValue("http://www.vckbase.com/","Exec");
Best regards,
George Ma
|
|
|
|
|
You forgot to #include the required header file.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
//shy
|
|
|
|
|
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi, Nish!
I think you are the most experienced person in the field of VisualC I have ever known after seeing the posts of yours.
So, can you help me to resolve the trouble,
"How to get the content of current webpage in IE?" above this post? The trouble has puzzled me for three days.
Best regards,
George Ma
|
|
|
|
|
George Ma wrote:
So, can you help me to resolve the trouble,
"How to get the content of current webpage in IE?" above this post? The trouble has puzzled me for three days.
I am really sorry George. But I haven't done any IE programming
I hope someone else will be able to help you out!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
How can I lock windows NT Workstation using Win32 functions? ( similar to CTL-ALT-DEL and then 'Lock WorkStation' )
Kaustuv Basu
India
|
|
|
|
|
LockWorkStation. Only supported on NT5+.
|
|
|
|
|
Yes. NT5 ( starting Win2K) supports LockWorkStation. But how to do the same in NT4? Something to do with winlogon.exe & GINA(.dll) ?
How do I programmatically lock the workstation in NT4 ?
Kaustuv Basu
India
|
|
|
|
|
Hi, pals!
I try to download MSI installer from,
http://www.codeproject.com/atl/rbcwindowimpl.asp
but failed, how can I get a copy of it?
If you can mail it to me, please mail a copy to
george@mails.gscas.ac.cn
Best regards,
George Ma
|
|
|
|
|
http://www.microsoft.com/msdownload/platformsdk/instmsi.htm
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks, Nish pal!
I have got it from the M$.
Best regards,
George Ma
|
|
|
|
|
When I run command "RegSvr32 RBDeskBand", Windows says,
the command is not found.
How to resolve the trouble?
Best regards,
George Ma
|
|
|
|
|
George Ma wrote:
When I run command "RegSvr32 RBDeskBand", Windows says,
the command is not found.
How to resolve the trouble?
Hmmmm. See if you have a file called regsvr32.exe in C:\WINDOWS\system32\ or whatever your system folder is.
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks, Nish pal!
I search it but failed to find a file whose name
is "regsrv32.exe". How to resolve the trouble?
I am using Windows Me.
Best regards,
George Ma
|
|
|
|
|
George Ma wrote:
I search it but failed to find a file whose name
is "regsrv32.exe". How to resolve the trouble
I hope you or someone else didn't delete it accidentally!!!
Anyway you can copy the file from a friend who is using ME
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks, Nish pal!
Do you know when the file is installed to
my computer? When installing Windows Me or
when installing VC?
Best regards,
George Ma
|
|
|
|
|
George Ma wrote:
Do you know when the file is installed to
my computer? When installing Windows Me or
when installing VC?
It's part of the OS, in your case, Windows ME
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
When I run command "RegSvr32 RBDeskBand", Windows says,
the command is not found.
How to resolve the trouble?
The information about RBDeskBand is from,
http://www.codeproject.com/atl/rbdeskband.asp
Best regards,
George Ma
|
|
|
|
|
Hi again!
Uhm... Apparently I'm not the only one not knowing how to directly access image data in a CImgEdit control. (see former thread)
OK, so I thought of another method to do my task of en-/decrypting image data... I can easily copy the the TIFF image into clipboard and get it back from there as a bitmap...
The (so-highly-recommended-to-take-a-look-first :p ) MSDN library told me to use CBitmap::GetBitmapBits and CBitmap::SetBitmapBits to access bitmap image data. As I recognized that this doesn't work and SetBitmapBits just results in a beautifully-but-solely-filled-with-black-pixels bitmap I even found a notice at MSDN (after hard search of course!) that these functions are obsolete and should not be used!
The final hint: I should try GetDIBits/SetDIBits to access the bitmap bits. Nice idea... But I'm too dumb to get it work
So, can anyone give me structured information what I have to do in order to use these methods on a bitmap stored in a CBitmap object? All information I found in this and other forums and even (or better 'as expected') MSDN just confused me more than it helped.
Many thanks in advance!
Best regards,
Andreas Dilling
|
|
|
|
|
Hi,
How to realize the following c code by using MessageBox with same functions.
fprintf(stderr, "Add. Info 0x%08lx ", val);
fprintf(stderr, "%s\n", sense[i].desc);
fprintf(stderr, " %02ld:%02ld:%02ld ", val / 75 / 60, val / 75 % 60, val % 75);
Thanks in advance!
chen
|
|
|
|
|
CString s;
s.Format("Add. Info 0x%08lx",val);
MessageBox(s);
s.Format("%s", sense[i].desc);
MessageBox(s);
s.Format(" %02ld:%02ld:%02ld ", val / 75 / 60, val / 75 % 60, val % 75);
MessageBox(s);
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|