|
It works if I put the handler in the frame window class, although I do not quite understand why.
What I am trying to do, is to encapsulate the menu item handler in my derived toolbar class. I handle the WM_RBUTTONDOWN message in the toolbar class to display the menu.
How do I do everything from the toolbar class?
Cheers,
/Fredrik
Do you Sonork? I do! 100.11430:PhatBoy
|
|
|
|
|
Fredrik Skoog wrote:
It works if I put the handler in the frame window class, although I do not quite understand why
Because, by default, if you do not setup an ON_COMMAND* handler for a command, it will be disabled. You also might want to look into how command routing works, so as to understand the order that is used when searching for a Command Handler.
Peace!
-=- James.
|
|
|
|
|
Why the functions GetWindowsDirectory(), GetSystemDirectory() and GetTempPath() failed on Windows XP? The returned folders are 'c:\abc', 'c:\abc\system\123' and 'c:\abc\temppath\123'
|
|
|
|
|
Gosh!!
That is sure funny!
I am sorry, I can't help you there as I havent used XP yet.
But couldnt resist posting this one as I am laughing so hard my stomach muscles hurt
Nish
p.s. do those directories exist? or are they just fantastically made u?
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Of course they don't exist...
|
|
|
|
|
Then there is something wrong with your code or perhaps some virus has totally messed up your machine
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Looks like the children-version of XP
For kids just learning the aplhabet and counting until 20
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
I tried this eagerly anticipating the results, but was disapointed to find my Windows XP installation does not share yours sense of humor:
E:\WINDOWS
E:\WINDOWS\System32
E:\DOCUME~1\Joshua\LOCALS~1\Temp\
Post the code you used, or the smallest possible snippit that illustrates the effect you're getting, pls.
farewell goodnight last one out turn out the lightsSmashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
The code is listed below. I think there are no tricks to use these functions. If you wish I may send you a jpg screen shot of Microsoft Visual C++ 6.0 (Service Pack 5) in a debug session showing the value of variable 'szdir' after call GetSystemDirectory()...
I am sure I am not crazy...
I am using "Microsoft Windows XP Professional( Build 2600 )", with AVG 6.0 Anti-Virus System resident (Virus Database 174, Release Date 2/1/2002)
CString sWindowsFolder,
sSystemFolder,
sTempFolder;
char szDir[ MAX_PATH ];
GetSystemDirectory( szDir, sizeof( szDir ) );
sSystemFolder = szDir;
GetWindowsDirectory( szDir, sizeof( szDir ) );
sWindowsFolder = szDir;
GetTempPath( sizeof( szDir ), szDir );
sTempFolder = szDir;
|
|
|
|
|
What are the return values for the functions? Do they return the correct length, or do they return 0.
Michael
|
|
|
|
|
The return value when "szdir = c:\abc\SYSTEMDIR\123" is 20, the correct length. The function didn't fail...
|
|
|
|
|
I found the real cause of the problem...
I am executing the 'Application Verifier 2.3' included in "Microsoft Windows XP Application Compatibility Toolkit 2.0" distributed by Microsoft at "http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/685/msdncompositedoc.xml".
The 'Application Verifier' is configured to verify my app.
When I removed my app from 'Application Verifier' the problem disappeared...
If anyone wish to check this 'dead-brain' situation...
Thanks for all funny replies.
|
|
|
|
|
Please tell me how to transfer files from a nds through the internet via the ldap protocol. I am able to get the attributes from an objekt but i can't transfer entries from a filesystem (for example .exe or .doc files). Please help me!
|
|
|
|
|
In Unix we normally have the possibility of analysing the memory dump file (Coredump) when our program bugs out, and we often find the errors this way by using the GBD
I have noticed that in XP (as opposite to Win2k) this file is dump is very often caught and you can choose to send this to Microsoft or look at it..
My question is.. Do you know of any tools that can help us analyse this file..I do not think the VC.Compiler has any "import" options for this like the GDB..
Thanks in anvance for any comments...
Wbr
Lars
Lars Pehrsson
|
|
|
|
|
Check out WINTELLECT NEWS November 2001 by John Robbins.
http://wintellect.com/resources/newsletters/nov2001.asp
And two MSJ BugSlayer Articles:
http://wintellect.com/resources/redirect.asp?url=http://www.microsoft.com/msj/defaultframe.asp?page=/msj/1299/Bugslayer/Bugslayer1299.htm
http://wintellect.com/resources/redirect.asp?url=http://www.microsoft.com/msj/0100/bugslayer/bugslayer0100.asp
|
|
|
|
|
Hello all,
After almost completion of my MDI appl, I figure out that the hot-key CTRL-F6 (switching between windows) is not working anymore (might never have worked ). I haven't change anything in the accelerator resources (it's actually still there). In a default MDI-project of VC++6.0 it does work.
It might have something to do with having a tab-control bar I've included (as part of MainFrm). The doc/view are also splitted, but that should be at another level.
Have any of you any idea's how I can pin-point where it's going wrong? By the way: what messages are sent?
Thanks in advance,
EiSl
|
|
|
|
|
Hi ,
Guys need some info abt property pages.I need to develop an application with tabs.But the problem is that i don't know the number of tabs at design time.So am planning to use property sheet.But am not sure whether we can dynamically generate property pages and if i can do that then can i add few controls and caption to it also(dynamically).Am using VC++ 5.0 .
Thanks
vandana
|
|
|
|
|
vandanakaul wrote:
But the problem is that i don't know the number of tabs at design time.
If you do know the maximum number of tabs/pages that will ever need to be created, you can do that easily. For example, if your application is a shareware application that will only show the last two Pages (Tabs) if it is registered, you can simply not call "AddPage(...)" for the last two pages if the app is not registered. It is easy to dynamically change the number of Pages/tabs in the Property Sheet.
Dynamically building a dialog template sounds a bit like overkill to me. Are you sure that is what you need to do? If so, someone else is gonna have to help you with that!
A possible solution is to have a "Generic" page that you can just change the caption, control text, show/hide controls, etc., and add that customized Page to the Property Sheet as needed.
Peace!
-=- James.
|
|
|
|
|
Hi,
Thanks for the reply but i guess i need to generate dialogs templete also dynamically.Since don't know the inital count of tabs i can not have dialog templetes made at design time.Do u know any better option except property pages .
Cheers
Vandana
|
|
|
|
|
vandanakaul wrote:
Thanks for the reply but i guess i need to generate dialogs templete also dynamically.Since don't know the inital count of tabs i can not have dialog templetes made at design time.
Is it not required that you have one unique dialog template per page/tab.
For example, if your app had a "Tools" feature that the user could add tools to at runtime, you could add multiple copies of the same dialog template, one for each added tool. And since the tools would all have some common items (Path, parameters, etc.), you could use a generic dialog template.
Without knowing exactly what you are trying to use the other "dynamic" pages for, I can only be of limited assistance.
Peace!
-=- James.
|
|
|
|
|
Hi ,
Seems i will get the solution this time .Let me explain it a bit more.Can u just open the Options dialog in VC (TOOLs->Option) .I want something like this.Say "n" number of tabs with different caption(that of course labelled at runtime) .The look and feel of all Tabs (Dialog templates )will be same,that is they will all have the same controls and at same place.They will only differ in data .
Now can u help
Cheers
Vandana
|
|
|
|
|
vandanakaul wrote:
The look and feel of all Tabs (Dialog templates )will be same,that is they will all have the same controls and at same place.They will only differ in data .
That is exactly what I suggested as a solution previously:
>> A possible solution is to have a "Generic" page that you can just
>>change the caption, control text, show/hide controls, etc., and
>>add that customized Page to the Property Sheet as needed
This is very easy to do. Do you need help in implementing something like this? All you need to do is construct/configure each of your 'n' pages (by creating an instance of the dialog class for each one), and call the Property Sheet's AddPage(...) method to add them in.
Peace!
-=- James.
|
|
|
|
|
Hi,
How do i do it.Can u put in a sample for this.That will be great.Thanks for all your help and time
cheers
vandana
|
|
|
|
|
Hi All,
Does following declaration part is legal:
struct SSingleData
{
CString csName;
CString csValue;
};
struct SDataRecord
{
CString csID;
CArray <ssingledata, ssingledata=""> DataArray;
};
CArray <sdatarecord, sdatarecord=""> m_SearchDataArray;
If yes then why I'm getting compilation error message at followint statment
m_SearchDataArray.Add(mySingleRecord);
mySingleRecord is type of SDataRecord
And Error is "error C2440: 'type cast' : cannot convert from 'struct SDataRecord' to 'struct SDataRecord'
No copy constructor available for struct 'SDataRecord'"
Thanks for Taking Time to write in.
Do I need to introduce constructor, where and how?
If my approach is wrong then please give me implementaion suggession for this problem.
--Sumit
|
|
|
|