|
I am very new to mfc and i have a basic question, can anyone tell me how to get the local drives like C:, D:, E:,.....etc inside the tree control in mfc...
Thanks in Advance;)
With Regards
raja
Raja Bose
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
is there compiler options for compiling executable to use both processors in double core architecture under VC2003
9ine
|
|
|
|
|
nope, design your program to be multithreaded...
|
|
|
|
|
Are you wanting the compiler to use both processors to compile your program, or are you wanting your program, when running, to use both processors?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
|
While the previous posters are correct, there is a code generation option that you need to select to enable multi-threading and link with the correct run-time libraries.
|
|
|
|
|
Dear all,
I want to make a windows service in vc++ 6.0 so that i don't have to double-click the executable at every bootup. probably, it is feasible in VC.NET but i want to do the same in vc 6.0
To be clear, for eg. I want to make a timer that would start automatically when windows starts up; runs in background and alerts at every 5 seconds. I would want to be able to control its behaiour from windows services or msconfig.
please help me
prajwol
|
|
|
|
|
prajwolkumar wrote: I want to make a windows service in vc++ 6.0 so that i don't have to double-click the executable at every bootup.
You do not have to create a service to get this functionality. You can add a "regular" program to the following registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Do events return values or are they always void in nature?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
An event is something that happens. You can have functions that respond to those events, however.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
If you mean "events" as a callback interface in COM, this is no different from other interfaces, i.e. all methods return a HRESULT.
If you mean "events" as an ActiveX source interface, the function can return any type that is compatible with automation and can be represented within a VARIANT.
If you mean "event" as a message, since windows is event-driven, all message handlers return a LRESULT.
Have I missed some interpretation of "event"?
Hope this helps
--
Roger
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
Roger Stoltz wrote: If you mean "events" as a callback interface in COM, this is no different from other interfaces, i.e. all methods return a HRESULT.
Exactly what I mean. Can you tell me what is the VARIANT equivalent of HRESULT and also the VARIANT equivalent of BSTR ?
Thanks...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Regarding HRESULT:
You won't need it since HRESULT is usually only needed as a return type for methods defined in interfaces that are not dispatch interfaces, i.e. doesn't inherit from IDispatch.
HRESULT cannot be represented within a VARIANT, there's no need.
Regarding VARIANT:
This is a union used to represent different data types such as short, BSTR and many more. Look it up in MSDN.
To be able to know which data type it represents, there is a member in the VARAINT struct called "vt" which is a bitfield.
Regarding BSTR in VARIANTs:
The easiest way to do this is to use the MFC implementation of the VARIANT structure/union, COleVariant. One its constructors takes an LPCTSTR as argument which will make the internal VARIANT hold a BSTR.
If you like to use the raw VARIANT type, you set the "vt" member equal to VT_BSTR and set the pbstr member equal to the return value of CString::AllocSysString().
Hope this helps
--
Roger
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
Hi,
I want know how to add contents to Help Document .
Can anyone please tell me how to add pictures and documentation notes to project Help File [F1] under different topics.
Regards,
Parichay B.P
|
|
|
|
|
hi,
i want to display a message when i doubleclick the RichEditBox control.there is a message called NM_DBLCLK but iam unable to use that.please help me.
sathish
|
|
|
|
|
|
Hi........
it show error login failure.
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
i didnt yet use crystal report.
i download the demo code and run.
where i fill this , how i know which table field r used for filling report?
i change only
crReportDocument.SetDatabaseLogon("sa", "sa", "user","analysis")
help me plz
with regards
sumi
reply soon
|
|
|
|
|
COleDateTime is an MFC class so you can not use it in an IDL file. Use a DATE* instead.
Steve
|
|
|
|
|
Hello
Recently I have been disturbed by the window message "WM_GETTEXT" and the function GetWindowText(). By sending message "WM_GETTEXT" I can get the content of the edit control in the other process while failed by using "GetWindowText".
I can not find any difference between sending "WM_GETTEXT" and using "GetWindowText()".
Can you tell me why
wanglei
|
|
|
|
|
MFC objects (at least CWnd objects) cannot be used across separate threads, that's why it doesn't work.
|
|
|
|
|
While GetWindowText() does send a WM_GETTEXT message, it does so only if the window belongs to the current process. If the window belongs to a different process and has a caption, GetWindowText() retrieves the window caption text. If the window does not have a caption, the return value is a null string. This is all spelled out in the documentation.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Consider a MFC MDI prog,
when you maximize a childframe,you will see three icons(minimize,maximize and close) on the right side of the menu.I Want to know,how to draw icon on the right side of menu except menu bar?
besides,how can I make the three icon not visiable?
|
|
|
|
|
WillTian wrote: how can I make the three icon not visiable?
Change the style in
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
or
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
Es:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
if( !CMDIFrameWnd::PreCreateWindow(cs) )<br />
return FALSE;<br />
cs.style = WS_OVERLAPPED | WS_CAPTION | FWS_ADDTOTITLE<br />
| WS_THICKFRAME | WS_SYSMENU;<br />
<br />
return TRUE;<br />
}
cuts minimize and maximize buttons.
Sorry but I don't know how to add more buttons or how cut the close button.
|
|
|
|
|
thanks,reset cs.style WS_CAPTION cut the close button
drawing a button is also an easy job,use CWnd::Create() to do so,but I don't know how to draw on the right side of menu,I can't retrive the RECT position.
Neither MainFrame nor ChildFrame contains the menu area.
CMenu is derived from CObject but CWnd.
|
|
|
|