|
good idea
[insert witty comment here]
bdiamond
|
|
|
|
|
|
thanks!!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi everyone
Is there a way to get the x and y coordinates of a CMenu item? For example, let's say 3 first items from my menu are :
File Edit View
how can I retrieve the x coordinate of the item "View"?
thanks
|
|
|
|
|
See GetMenuItemRect()
How do I print my voice mail?
|
|
|
|
|
Hockey,
??GetMenuItemRect()??
I can't find any function that goes by that name! I got GetMenuItemCount, GetMenuItemID, and GetMenuItemInfo, but no GetMenuItemRect
Where can I find it?
thanks
|
|
|
|
|
|
Sorry to both of you,
I just realize I forgot to mention that I'm working with Windows CE (Microsoft embedded Visual C++). That function is not available on Windows CE .. So is there another way to do it?
thanks
|
|
|
|
|
|
I have recently found out (today) how to put an icon on a button. But the icon is 16 x 16 and it's bigger on my button that it usually is when viewed anywhere else, like in Windows Explorer, so it looks like crap. Is there a way, without bit-blitting that I can make the icon size to fit the button if I make the button smaller?
[insert witty comment here]
bdiamond
|
|
|
|
|
Find a class here on CP that does what you want
or
DrawIconEx()
How do I print my voice mail?
|
|
|
|
|
That isn't enough info to go on, can you post how you load the icon (LoadIcon, LoadImage, or something else?), how are you getting the icon on the button (using a class from CP, somewhere else, or is it your own code?).
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
this is the code I'm using:
m_cmdAddLink.SetIcon(theApp.LoadIcon(IDI_ADDFILE));
where m_cmdAddLink is the CButton variable for the command button
[insert witty comment here]
bdiamond
|
|
|
|
|
|
That worked perfectly. Thanks!!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi,
I have a bug related to mouse messages in my mfc app. I have lbuttondown and rbuttondown handlers for my cscrollview, and the scroll wheel on a mouse seems to be automatically hooked up to the scroll position of the view, so everything works fine when using a regular mouse.
When using a notebook touchpad the lbuttondown and rbuttondown handlers work as expected, but I get a problem when both BOTH left and mouse buttons are pressed simultaneously. This causes neither the lbuttondown nor rbuttondown messages to be sent, nor does it send the mbuttondown message. But it is obviously sending some sort of message to the program because the cursor changes to an icon similar (but not identical) to the one that appears when you use the scroll wheel on a normal mouse. Unfortunately the program immediately crashes when both buttons are pressed simultaneously on a notebook touchpad. This behaviour doesn't occur if you press both buttons simultaneously on a normal mouse.
Does anybody know what message handler I should be using the capture the problem behaviour?
Thanks for any help!
Mick
|
|
|
|
|
I have a CListCtrl object with LVS_EX_SUBITEMIMAGES included in extended style. This will let me include images inside subitems.
The subitem images are displayed fine
I don't want images inside the first column, but it does display image 0. After setting that id to -1 the list doesn't display an image but it keeps a space inside the first column as wide as the images.
What can I do to prevent this?
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Hello,
I need a hint how to copy files from virtual folders.
My digital camera is connected as virtual folder in 'my computer' -> 'control panel' -> 'scanners and cameras'.
It is not difficult to gain access to that camera by using iterative IShellFolder commands. GetDisplayName generates a full path like:
'::{GUID of my computer}\::{GUID of control panel}\::{GUID of scanners and camera\devid:{GUID of camera}\0003:\0003\Root\Ext0\DCIM\100Ricoh\picture1234.jpg'
SHOperation fails when passing this path.
Any help is appreciated.
Thanks in advance!
Sebastian
|
|
|
|
|
After I connect my camera to the computer, the drivers create a drive letter for it. In this case, it's always E:, so I can copy files all day long from drive E:.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
you are right, some cameras create volumes.
Any helpful comments?
|
|
|
|
|
sieppl wrote:
Any helpful comments?
No, I was just offering a suggestion that you obviously already considered.
Perhaps you could use CreateFile() , specifying the driver or device name as the first parameter. In the registry, try looking in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_040a&Pid_0571\KCKCL35220205\Device Parameters key for your camera's symbolic name. Note the values in red will be different on your machine. For example:
HANDLE hFile = CreateFile("\\\\.\\USB#Vid_040a&Pid_0571#KCKCL35220205#{a5dcbf10-6530-11d2-901f-00c04fb951ed}\\PIPE01", ...);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
okay thanks. i'll try that.
|
|
|
|
|
Hello All,
I have a program that is doing something and stop doing whatever he's doing and look at something else every 10 mins ( whatever the time is)
so I used OnTimer. No problem for certain times but at one point I got following error message.
Unhandled exception at 0x7c28ef6a in SMPServer.exe: 0xC0000005: Access violation reading location 0x00000020.
here the code that I wrote.
Why do I get the error after calling the DoSomething() for several times and died at next time DoSomething() gets call again? I tried killing Timer in DoSomething() and the result is the same. DoSomethings() gets called several times (probably 3 or 4 times) and die at next time. Am I missing something or am I using timer in wrong way?
<br />
int m_nTimer;<br />
const int TimerID = 1;<br />
const int Timeout = 5000;<br />
<br />
BEGIN_MESSAGE_MAP(CSMPServerDlg, CDialog)<br />
...<br />
...<br />
ON_WM_TIMER() <br />
..<br />
..<br />
END_MESSAGE_MAP<br />
<br />
void CMyDlg::DoSomething()<br />
{<br />
....<br />
m_nTimer = SetTimer(TimerID, Timeout, NULL);<br />
.....<br />
}<br />
<br />
void CMyDlg::OnTimer(UINT nIDEvent) <br />
{<br />
CDialog::OnTimer(nIDEvent);<br />
KillTimer(m_nTimer); <br />
if (nIDEvent == TimerID)<br />
{<br />
isStillTalking = false;<br />
PostMessage(WWPrinting); <br />
} <br />
}<br />
|
|
|
|
|
Remember that timers are a limited global resource. I forget the exact number that can be in existence at any one time but it wasn't very many.
Contrary to some documentation, the timer ID, not the SetTimer() return value, must be used when killing the timer.
Just curious but why do you continually call SetTimer() and KillTimer() ? Wouldn't it be sufficient to call each just once?
Also, the call to the base class implementation of OnTimer() is not necessary if nIDEvent is your timer.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi!
I wonder how I could use STL with visual C++ 6.0? I have used STL together with Dev C++(Cygwin) and it works fine. But when I try to run under Visual C++ it generates alot of errors. Any suggestions on how to solve this? Do i need some upgrades?
regards
M_A
|
|
|
|