|
Hey, i want to change the background of a checkbox. Can somebody help me with that?
Thank you.
|
|
|
|
|
put the followin in OnCtlColor
if(nCtlColor==CTLCOLOR_STATIC )
{
pDC->SetBkColor(RGB(255,0,0));
}
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Thanks, it works.... but it changes color only under the text... is there a way to change the backgorund color of the control as well because right now i have a small gray border around my checkbox.
|
|
|
|
|
hey, here's what i came up with for filling the backgorund.
i have the following in OnCtlColor
//**********
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(nCtlColor==CTLCOLOR_STATIC )
{
CBrush br;
CRect rc;
hbr = CreateSolidBrush( RGB( 255, 255, 255 ) );
m_1_sub_folders.ScreenToClient(rc);
br.Attach(hbr);
pDC->SetBkColor( RGB(255,255,255));
pDC->FillRect(rc,&br);
br.Detach();
}
// TODO: Return a different brush if the default is not desired
return hbr;
//**********
it works, but is there some other way to do it?
Thank you.
|
|
|
|
|
Hey Guys
I have a shell extension DLL i have written and i get this error:-
RegSvr32: LoadLibrary(".\ReleaseMinDependency\RCAS.dll") failed.
GetLastError returns 0x0000001f.
when i compile and it trys to register the DLL has anyone got any ideas what this is. It used to work till i installed the new platform SDK. Unfortunately i need the new platform sdk for it to.
Cheers
Peter
|
|
|
|
|
Your DLL is compiling in ReleaseMinDependrncy mode. In the Buid menu select the build type to either Release or Debug.
|
|
|
|
|
I only have ReleaseMinSize and MinDependency options as well as unicode versions of the above no plain release option. Also the same error occurs for all the release ones. If i compile in debug mode though i get this error
Linking...
Creating library Debug/Software to Sign and Verify Files.lib and object Debug/Software to Sign and Verify Files.exp
Software to Sign and Verify Files.exp : warning LNK4070: /OUT:RCAS.DLL directive in .EXP differs from output filename "Debug/Software to Sign and Verify Files.dll"; ignoring directive
CertificateSelection.obj : error LNK2001: unresolved external symbol _CryptUIDlgViewContext@24
Debug/Software to Sign and Verify Files.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
if this helps to solve the problem at all.
Cheers
Peter
|
|
|
|
|
I fixed the last error with the debugi just hadn't included a libary in the link properties. So the dbug version now compiles but i still get the.
Performing registration
RegSvr32: LoadLibrary(".\Debug\Software to Sign and Verify Files.dll") failed.
GetLastError returns 0x0000001f.
error
Peter
|
|
|
|
|
Another thing is that this code will compile and register with no problems under XP its only on other O/S's it has problems registering under.
|
|
|
|
|
Okay i found out why it wouldn't register. It was because i have a feature in the program that is not supported under 9x platforms. But i have this under a function that detects the OS version before it runs it so how can i get it in the program and still get it to register under the 9x OS's.
Cheers
Peter
|
|
|
|
|
I have a question that it can only display the tip which length is less than 64 on the icon which I use
Shell_NotifyIcon to add into the tray.How to diaplay the tip which length is more than 64 in vc.
|
|
|
|
|
The NOTIFYICONDATA struct's szTip member is declared as char szTip[64];
So you can't do much with the NOTIFYICONDATA
But in the handler for WM_MOUSEMOVE in the Application-defined message handler, you can try and show a bigger tooltip using CToolTipCtrl
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I try to send a WM_CLOSE message to KaZa application. But it just minimize the app. Hm... it's something with that they have done so it doesn't close the app before user clicks on the menu item ( that closes the app ).
Unuseful words those last.... but is there a way to close/terminate an app with some other code??
My code looks like this:
HWND wnd = ::FindWindow(classname, NULL);
if( wnd != NULL )
{
::SendMessage(wnd, WM_CLOSE, NULL, NULL);
}
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
They have probably overridden WM_CLOSE and got it to do something else [like minimizing for instance]
I am not at all sure about this, but try out WM_QUIT and WM_DESTROY
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hello, the codegurus around the world.;)
We can check how the message will be dealt with on the target window
by SPY++.
When you send WM_CLOSE message to the target window,
you can check how this WM_CLOSE will be dealt with on the process
of the message with WPARM and LPARAM.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
Any ideas?
ie. "4476976c"-hex is approximately 986.366-float
|
|
|
|
|
I know I'm doing something unnecessary here, but it is sunday morning after all...
float a = 986.366;
float *b = &a;
for(int i = 0; i < sizeof(float); ++i )
{
printf("%2x", *((unsigned char*)b+i));
}
|
|
|
|
|
In Windows 2000 if you create an app and then erase the title and then press Ctrl+Alt+Del and look for your app you can't see it. But in Window 98 you'll see the app if it is running when you press Ctrl+Alt+Del. I guess Windows 98 takes the name from the exe!?
So, I don't want my app title in the Ctrl+Alt+Del window!! How to erase it?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Try with
WS_EX_TOOLWINDOW
From MSDN:
"A tool window does not appear in the task bar or in the window that appears when the user presses ALT+TAB."
|
|
|
|
|
I want to be able to drag a hyperlink from a webpage and drop it onto my listview control so that the control can add the url text to the list.
I was hoping that I could just use the same kind of code as for dropping files onto a list view control but I can't seem to get it to work.
Can somebody point me in the right direction. MSDN doesn't seem to have much on doing this, although I'm probably just using the wrong keywords.
Michael
|
|
|
|
|
Get my utility ClipSpy from the Clipboard section here, which will show you the clipboard formats used when you drag a link. With IE6, the URL is in plain text in a format called "UniformResourceLocator".
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Hi all,
Please tell me, how can i make better user interface for users in my database applications ...
Can you tell something about it ...
Thanks for helps !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Thank you Michael
If you found other links, please tell me ...
My E-mail: hadi_rezaie@hotmail.com
Thanks again !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Trying to add strings to a simple List Box, based upon posted tutorial for ClistBox.
The member varible I have set up with Class Wiz is:
mc_dirlist2
When I attempt to add a string to the box with:
mc_dirlist2[0].AddString( "test data" );
I get error:
error C2039: 'AddString' : is not a member of 'HWND__'
Any help would be appreciated!
|
|
|
|