|
What is the message sent to the windows when the resolution is changed?
rechi
|
|
|
|
|
|
I am making my own class derived from CEdit, I want to be able to change the background colour of the control to something other than white. I have tried using:
pDC->SetBkColor(RGB(0,0,255));
in the OnCtrlColor but it does not work. I have tried the articles here and on codeguru, but none of the seem to work properly.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
You also have to return a brush with your new background
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
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.
|
|
|
|