|
Great!
That did the job perfectly. And it's the problem of the user if he changes wrong values...
|
|
|
|
|
How SendMessge for a particular menu click
i.e I want the the menu click on a button click
|
|
|
|
|
|
I'm wondering which class use this control:
http://digilander.iol.it/ilbanca/fuffa/saveasie.jpg
Any help will be appreciated,
Bye.
|
|
|
|
|
It is probably what is normally refered to as the "Outlook shortcut bar"
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Thanks, this helped me much.
And it's not a so new control as I supposed
|
|
|
|
|
You could create something like that from scratch pretty easily actually. Just a standard formview (coloUred with OnCtlColor() ), with some custom-drawn flat style buttons added at runtime. Somebody has probably already done it though, so take a look around CP and related sites.
Simon
"The more I learn, the more I realize I don't know" - Colin Davies
Sonork ID 100.10024
|
|
|
|
|
Mmm... I'll give a try, thank you for the advice.
|
|
|
|
|
NP. Take a look here for a good button set class. It's a bit overkill for one style though. You'll something like;
CCustomButton::OnDraw()
{
if(bHover)
draw_with_border()
else
draw_without_border()
}
Just use a TRACKMOUSEEVENT structure to determine if the cursor is hovering, and change bHover appropriately.
Simon
"The more I learn, the more I realize I don't know" - Colin Davies
Sonork ID 100.10024
|
|
|
|
|
, CButtonST is too much complex for me, I'll try to work on your idea instead, sounds quite easy to implement, thanks again.
|
|
|
|
|
|
I notice that several apps do use of that, the download manager Reget Deluxe also uses it. It's very similiar to a large toolbar vertically aligned...
|
|
|
|
|
I told you about the outlook shortcut bar expecting that there would be 20 articles on them if you did a search. Took me a while to find one or two.
From CodeGuru
From CodeProject
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I try to compile this code...
CoInitialize(NULL);
HRESULT hr;
IActiveDesktop *pActiveDesktop;
//Create an instance of the Active Desktop
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (void**)&pActiveDesktop);
pActiveDesktop->SetWallpaper("C:\\Mina dokument\\Mina bilder\\eros15.gif", 0);
// Call the Release method
pActiveDesktop->Release();
CoUninitialize();
... but when compile:
--------------------Configuration: Wallpaper - Win32 Release--------------------
Compiling...
WallpaperDlg.cpp
c:\PROGRAM\MICROSOFT VISUAL STUDIO\MYPROJECTS\Wallpaper\WallpaperDlg.cpp(115) : error C2027: use of undefined type 'IActiveDesktop'
C:\Program\Microsoft Visual Studio\VC98\INCLUDE\COMDEF.H(507) : see declaration of 'IActiveDesktop'
c:\PROGRAM\MICROSOFT VISUAL STUDIO\MYPROJECTS\Wallpaper\WallpaperDlg.cpp(115) : error C2227: left of '->SetWallpaper' must point to class/struct/union
c:\PROGRAM\MICROSOFT VISUAL STUDIO\MYPROJECTS\Wallpaper\WallpaperDlg.cpp(118) : error C2027: use of undefined type 'IActiveDesktop'
C:\Program\Microsoft Visual Studio\VC98\INCLUDE\COMDEF.H(507) : see declaration of 'IActiveDesktop'
c:\PROGRAM\MICROSOFT VISUAL STUDIO\MYPROJECTS\Wallpaper\WallpaperDlg.cpp(118) : error C2227: left of '->Release' must point to class/struct/union
Error executing cl.exe.
Wallpaper.exe - 4 error(s), 0 warning(s)
Exactly WHAT is wrong!!!
The code is from MSDN Library so it should work....
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Did you include "Shlobj.h"?
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Well, first I did include:
#include <comdef.h>
#include <shlguid.h>
#include <shlobj.h>
because it says "undeclared identifier" to IActiveDesktop interface when only including #include <shlobj.h>.
So I did a search and looked after all files on my computer that had a string "IActiveDesktop" in, and included them... but now I get these errors which says undefined bla bla...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
|
ok, now it works.... almost!
I want to change the background, but the cde doesn't change the background:
void CWallpaperDlg::OnButton1()
{
CoInitialize(NULL);
HRESULT hr;
IActiveDesktop *pActiveDesktop;
//Create an instance of the Active Desktop
hr = CoCreateInstance(CLSID_ActiveDesktop, NULL, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (void**)&pActiveDesktop);
if(SUCCEEDED(hr))
{
pActiveDesktop->SetWallpaper((LPCWSTR)"C:\\Mina dokument\\Mina bilder\\eros15.gif", 0);
pActiveDesktop->ApplyChanges(AD_APPLY_ALL);
}
else
{
AfxMessageBox("Error o Error");
}
// Call the Release method
pActiveDesktop->Release();
CoUninitialize();
}
------------------------------------
<b><I><B>Rickard Andersson</I></B></b>, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
|
Hello,
Anybody knows how can I catch the Refresh Event using the BHO.
when the user press F5 or selects refresh from the broswer menu.
and I don't mean the DocumentComplete Event.
thanks,
|
|
|
|
|
Hi,
is it possible to change the size(thickness) of an edge drawn with a call
to the DrawEdge () function ?
I tried diferent methods, like changing the size of the border with the SystemParamterInfo
(), but it didn't work.
Maybe, selecting another pen ? How can i do that ?
Cheers,
Lion.
|
|
|
|
|
You can't. It's only used to draw simple pre-defined borders, and it doesn't use any pens. You could just use CDC::Rectangle() with a thick pen and a null brush.
Simon
"The more I learn, the more I realize I don't know" - Colin Davies
Sonork ID 100.10024
|
|
|
|
|
Anyone care to tell me what messages I should handle in the dialog when someone is sizing with the gripper on a status bar...???
Merci buckets!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I'm cloning notepad for windows, and i'm having trouble figuring out the Select all command. is there a message i can just send for that, and what is it, or is more complex code necessary?
|
|
|
|
|
::SendMessage(hWndEdit, EM_SETSEL, 0, -1);
The 0 is the start position, and the -1 is the end position. Because it is -1, this tells the window to select all of the text in the edit control.
|
|
|
|