|
Hi, guys!
Could somebody please help!!!
I got such piece of code:
CMyMenu : public CMenu<br />
{<br />
public:<br />
virtual void DrawItem(LPDRAWITEMSTRUCT) {some code;}<br />
virtual void MeasureItem(LPMEASUREITEMSTRUCT){some code;}<br />
};<br />
<br />
<br />
CMainFrame::OnCreate()<br />
{<br />
...<br />
<br />
m_MyMenu.LoadFrame(IDR_MAINFRAME);
<br />
m_MyMenu.GetSubMenu(0)->ModifyMenu(0, MF_BYPOSITION | MF_OWNERDRAW, (UINT)(HMENU)m_MyMenu, _T("R-r-r"));<br />
<br />
SetMenu(&m_MyMenu);<br />
}
And I got "R-r-r" instead of "&File", with CMyMenu::DrawItem() called just fine. But "R-r-r" is truncated, as CMyMenu::MeasureItem() is not called for it.
Why?
Thanks
|
|
|
|
|
Because the function's signature should be:
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
For some reason, everytime i go to "Start Without Debugging", it tells me that my project configurations are out of date. Even after a complete rebuild? Has anyone else ever had this issue? Even after it rebuilds and runs, it tells me that the configuration is out of date, without a single source change? What gives?
Ryan Baillargeon
|
|
|
|
|
I have had that happen to me before, although probably not to the extent that you might have. One thing I did notice was that for some reason, if I had certain project files open, it would always say the files were out of date. Perhaps you could try closing all visible files(not the project itself), and try again. If that's not it, then I really don't know what is.
<NOTE:This message in no means reflects the actuall thoughts, concerns, or opinions of the author, the president, or the rat living in your walls. Please do not take it seriously, jokingly, lovingly, or at all.>
"Don't tell me I'm smart, I might actually believe you!"
"I once knew a guy who said he was a coder...The FBI arrested him two days later."
|
|
|
|
|
Damn, that didnt work...
- could it be that theres a file in the build configuration that is changing post build? therefore necessitating a new build every time?
Ryan Baillargeon
|
|
|
|
|
The only thing that comes to mind is that the dates of your source files are set ahead of your computer's current time. So when they're compiled, the object files are getting a date older than the source files and it gives the illusion of being out-of-date.
This might actually not be your fault. Perhaps someone else in your team checked the files in with a future date (by mistake) and now they have that same date on your own computer.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
THANK YOU! that was annoying. My Fault, I did it. Last Friday I was checking the calendar and for about 5 minutes my computers time was set to 24th of december. I guess I saved a couple files during that time. BAH HAHA..
The funny thing is the problem would have fixed itself by next week, but i would have been annoyed as hell until then. THANK YOU AGAIN. Im always sweating the simple stuff.
Ryan Baillargeon
|
|
|
|
|
Bah! Now why didn't I think of that?
*Runs off screaming, bashing his head into the walls - Bystanders report hearing the words, "I'm so stupid", repeated over and over.*
<NOTE:This message in no means reflects the actuall thoughts, concerns, or opinions of the author, the president, or the rat living in your walls. Please do not take it seriously, jokingly, lovingly, or at all.>
"Don't tell me I'm smart, I might actually believe you!"
"I once knew a guy who said he was a coder...The FBI arrested him two days later."
|
|
|
|
|
Ahhh. I always forget about that when tinkering with the system clock. It's pretty annoying to have to recompile all the time because one file is out of date somehow.
Todd Smith
|
|
|
|
|
Ok, I'm creating an Installation using MS Install Shield Wizard. My installation has 3 components. I need to know how to see if a certain component is being installed, so that I can place a shortcut on the desktop, and in the startmenu-programs folder, only if that component is being installed. The two components I need to check are named "CFW Source files" and "CFW Server files", the third component is not important for this, because it only contains system dll files. What I'm trying to do, is if the user installs only the source files, then I want to create a shortcut to the project file(circle.dsw). And if the user installs the server files, I want to create a shortcut to the program file(CFW.exe). What I don't want to do, is create either of those shortcuts, if those files are not being installed. I already know how to create the shortcuts. I just need to know how to make them depending upon which component was installed.
"Don't tell me I'm smart, I might actually believe you!"
|
|
|
|
|
I assume you're InstallShield, I suggest looking at their documentation, and support pages and forums. I'm sorry, I'm haven't been InstallShield for a few months now, and it's one of those product that are easy to forget!
InstallShield Forum[^]
and
www.InstallSite.org[^]
There are quite a few nice people there also.
Max.
|
|
|
|
|
Hmm, thanks, I'll check them out, not that I'm gonna leave here for anything. CodeProject it da BOMB!
<NOTE:This message in no means reflects the actuall thoughts, concerns, or opinions of the author, the president, or the rat living in your walls. Please do not take it seriously, jokingly, lovingly, or at all.>
"Don't tell me I'm smart, I might actually believe you!"
"I once knew a guy who said he was a coder...The FBI arrested him two days later."
|
|
|
|
|
We currently use FlushFileBuffers to ensure that writes to our data protection log file are successful. I suggested we use the FILE_FLAG_WRITE_THROUGH flag in the call to CreateFile() to achieve the same result and increase performance but it didn't work. In a simple test of writing out 10000 512byte records we did gain (50secs down to 40secs). However if you run the same test and kill the power half way through a block of garbage is written to the end of the file. The documentation for the FILE_FLAG_WRITE_THROUGH flag implies it is designed to provide better data integrity but in practice it is quite the opposite. Can anybody suggest where the problem may lie or have any experience in optimising file access?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
I am getting the warning that the performance counter DLL is not aligned on an 8-byte boundary. I originally thought the warning was being caused by our code, but even the Microsoft sample codes, ScribbleMouse and HWInputMon written by Jeffrey Richter (MSJ Aug 1998), are giving the same warnings when I recompiled them.
I checked the allocation size in the case of the ScribbleMouse, and at 160 bytes, seems to be properly aligned.
Does anyone know of a solution to this, or how to resolve the problem. I have looked at the KB Q262335 referred to below, and have tried various options without luck.
HOWTO: Align Performance Data of a Performance Extension DLL on an 8-Byte Boundary
SUMMARY
When the performance data buffer returned by a performance extension DLL is not aligned on an 8-byte boundary, the performance library (PERFLIB) part of ADVAPI32.dll will report a warning 1016 to the Application Log in Event Viewer. This article explains how the developer of a performance extension DLL can align the performance data on an 8-byte boundary.
Gaulles
http://www.gaulles.com
|
|
|
|
|
In the version information for my app there's stuff like
CompanyName
FileDescription
FileVersion
InternalName
...
SpecialBuild
When my app starts I want to see what the value of SpecialBuild is. Can anybody give any guidance?
Thanks
Chris
|
|
|
|
|
Look for articles on the API routine "VerQueryValue". It isn't easy, but it isn't hard. Just a little goofy.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
See GetFileVersionInfo API function or try this[^]
Pavel
Sonork 100.15206
|
|
|
|
|
Heresy! Codeguru? Heresy!
--
Only in a world this sh*tty could you even try to say these were innocent people and keep a straight face.
|
|
|
|
|
Type "Version Information" in the index tab in MSDN and you will find functions such as GetFileVersionInfo.
Cheers,
Fredrik
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
I have been trying to find code that will allow me to make an application that can use an exsisting application to enter in data.
For exmaple:
Based on a clients .ini configuration it will pull their client data like
[vpn]
user=0u812
with their information it will add it into the other application password field box so that the application can be automated.
If anyone can point me in the direction that would help in this matter.
I am not even sure what the commands would be, so I am a little lost in this area.
|
|
|
|
|
There are several solution. A quick solution is file-mapping. A robust solution is COM.
Kuphryn
|
|
|
|
|
Do you by any chance have any links that would help teach me on how to write something like that?
I have been losing my mind on this.
|
|
|
|
|
Code Project has a section for COM.
http://www.codeproject.com/com/
Depending on the natural of your application, COM may be overkill. One reason is the fact that COM programming is highly extensive both design and implementation.
As for file-mapping, consider these Win32 API.
CreateFile()
CreateFileMapping()
MapViewOfFile()
http://www.flipcode.com/tutorials/tut_filemapping.shtml
Kuphryn
|
|
|
|
|
Ahh o.k. great.
now for the next part.
o.k. I have my app load the ini data
[user]
info=this is a test
and want it to paste that information into a different application like
notepad
so that when my app lauched it would paste "this is a test" into the notepad text box.
any cool links to do that.
I am not sure what to search for hwnd?
|
|
|
|
|
ahhh never mind. I found it in the com. LOL
thank you very much for your help!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|