|
What was the error, Mazy?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish - Native CPian wrote:
What was the error, Mazy?
I made mistake in use of SetWindowText() .I think I use it in a way something like this:
GetDlgCtrlItem(GetDlgID())->SetWindowText("");
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
We all make mistakes I guess
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi,
For a group of menu item, use the
ON_UPDATE_COMMAND_UI_RANGE( id1, id2, memberFxn )
to update the menuitem status.
But how to declare the memberFxn, try the
void CMainFrame::OnUpdateMyMenuItem(UINT nID, CCmdUI* pCmdUI)
{
...
}
and
void CMainFrame::OnUpdateMyMenuItem(CCmdUI* pCmdUI, UINT nID)
{
...
}
Both cannot work. (They will Cause Access voilation Error).
Can someone help me? Thanks in advance.
Best Regards,
Wayne King
|
|
|
|
|
It should be
void CMainFrame::OnUpdateMyMenuItem(CCmdUI* pCmdUI); The extra nID is not needed, as this information can be retrieved from the CCmdUI object itself.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Could anyone tell me how to link a 16-Bits DLL in Visual C++ 6 using MFC? I need load a old DLL. I read about convert it to 32-Bits DLL, and seem very dificult, Is it absolutly necesary to do it?
Thanks in advance!
|
|
|
|
|
If you've got the source code, I'd strongly recommend you rebuild for 32-bit. Otherwise, your only choice is to construct a so called thunk DLL that does the translation between 16- and 32-bit worlds. Thunks are a complex subject, and you might need to get some assistance to do one.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to expand one tree's item (like IE) by sending message or by some other way, while I don't know which item it is but its full path(eg: c:\test)
How can I do this?
Thank you!
|
|
|
|
|
Compare against the Tree Items label and expand the mathing
item by calling CTreeCtrl::Expand.
|
|
|
|
|
Prem:
but there is a problem if two or more labels have the same name and if the there is many layers in the tree the search speed will very slow.
thanks anyway.
|
|
|
|
|
Hi,
I would like to get the value of Macros for Build Commands and Properties (e.g. VCInstallDir, VSInstallDir, etc.) for VC.NET from within a VC++ program.
Is that possible? If so, can you please say how.
Regards,
Saayan
|
|
|
|
|
I try to expose an interface using its own coclass in an MFC application with added ATL support.
Unfortunately, it doesn't seem to work in VB. The interface is visible, but it cannot be instantiate.
Do you know what is to be done?
rechi
|
|
|
|
|
There are several possibles here - whats the error being thrown up? (Provide details of your interface too, including details of retval etc.)
Dylan Kenneally
London, UK
|
|
|
|
|
In VB looks like this:
dim ob as TheLibrary.TheInterface
...
set ob = new TheLibrary.TheInterface 'fails here!
In VC++ is just an ordinary interface with coclass associate. Nothing special or suspect.
rechi
|
|
|
|
|
That is strange
Have you tried to access your object through VC++ code? The reason I ask is that this may prove to be more helpful in finding the problem: as you have to do everything yourself, you'll be able to see at exactly what stage the problem occurs.
Dylan Kenneally
London, UK
|
|
|
|
|
Why do VC++/Windows have this differation?
Using VC++, can I just add Windows Cotrols into SDI and MDI by dragging the control itself from the control panel? I have known it can be done to Dialog form.
My quesitons may be making you a bits confused. Forgive me, Please.
DJ
|
|
|
|
|
Dialog Based apps have the entire application out into a dialog, though there might be sub-dialogs.
SDI and MDI are document oriented apps usually. You can save/open stuff. In SDI only one document is open at a time as in Notepad. In MDI you can have multiple documents as in VS.NET.
Now we have a funny kind of SDI/MDI mix in Office 2K/XP where the documents open in separate windows like Multiple SDIs all part of a single huge MDI
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish - Native CPian wrote:
Now we have a funny kind of SDI/MDI mix in Office 2K/XP where the documents open in separate windows like Multiple SDIs all part of a single huge MDI
That is part of Microsofts new "Document-centric" model, where the whole philosophy is geared towards the users document rather than the application that they are running. So they want people to refer to the "Word document", or "Powerpoint presentation" rather than the Word application.
BTW, this model is called multi-threaded SDI.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks for the info, Kilowatt!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
DJ
|
|
|
|
|
Hi,
In a dialog-based application, I need show all
the cd-room drivers with a list control in a computer.
The names of all cd-drive should be inserted into the list-control. When a cd-driver is selected,
it should operate the contents of the cd-room.
How should i do this?
Thanks in advance!
chen
|
|
|
|
|
Hi!
You may use GetDriveType() function to determine drive type.
To get all drives, use GetLogicalDriveStrings() or GetLogicalDrives.
Later, just use FindFirstFile(), FindNextFile(), FindClose() to obtain all file system objects.
Mukkie
|
|
|
|
|
i asked a question refering to why my cin stopped working after the program had looped, my answer was cin.flush();
I applied that line to my code, and the program didnt reconize it,... if this is the way to reinitialize a cin for it works everytime the loop goes through, then why wont it work? is there a required header?
painless see?
thanks!
~SilverShalkin
|
|
|
|
|
I'm sorry, it's cout that requires the .flush();
The reason is that one needs to be cleared before you use the other.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Try with cin.clear() , which should reset cin in case you had a formatting error.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|