|
Try asking at: CLI/C++[^]
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
It shows a handle to a managed object and its different of a pointer.
|
|
|
|
|
Hi all,
How can I (with the use of C++) change the system volume? Like configuring a slide bar and as the bar changes the volume changes ... somelike that. What functions can I use?
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
USE Windows SDK functions
MMRESULT waveOutSetVolume(
HWAVEOUT hwo,
DWORD dwVolume
);
MMRESULT waveOutGetVolume(
HWAVEOUT hwo,
LPDWORD pdwVolume
);
Use NULL in to the HWAVEOUT hwo parameter.
|
|
|
|
|
|
hi,
I want to scroll window when someone press tab on text box. my problem is i have dynamically generated textboxes in a window and window size is fixed. so when there are more then 10 text boxes i am giving a scroll bar and allows user to scroll through the textboxes to enter the values. i want to allow users to press tab and go through all text box. so when user is at last visible text box and press enter, scroll bar should automatically scroll one textbox down.
how can i archive this ?? please help.
|
|
|
|
|
If you make your text boxes of a class you have derived from CEdit, then you can handle the WM_SETFOCUS message to know when a new edit box has gained focus after the user pressed tab.
Since you now know which edit got the focus, you can use GetWindowRect() (followed by ScreenToClient() on the window that holds the edit boxes), and compare this to your window's client rect - *after* the current scroll position has been used to offset the top and bottom of the window's rect. This will tell you if the new edit control is visible; if it is not, you can determine which way to scroll to bring it visible. This can be achieved by calling SetScrollPos() on the scroll bar.
I'm assuming you are comfortable with moving the edit controls to simulate being scrolled?
|
|
|
|
|
|
I need to use this pointer 'IID_ITextStoreAnchor' in my app. but I get error:
"error LNK2001: unresolved external symbol _IID_ITextStoreAnchor"!
I tried to find CLSID and IID GUIDs (for 'CoCreateInstance')but couldn't do so!
???
Thanks!
|
|
|
|
|
|
I solved this.
Linking with oleacc.lib !
|
|
|
|
|
Hi ALL,
I am using ListCtrl on dialogBox in which I want to catch select item event. i.e. When ever user select any item in the listctrl i want to do some other action.So if any body have solution to this then plz forward it.
Atool
|
|
|
|
|
Atulmahajan wrote: I want to catch select item event.
Handle LVN_ITEMCHANGED.
|
|
|
|
|
Hi Nibbu
This event is related to CListView class. I want to capture select item event of List Control.Though I tried with LVN_ITEMCHANGED event, but this event does not capture.Plz give me some detail solution.
Thanks in Advance
Atul
|
|
|
|
|
Atulmahajan wrote: This event is related to CListView class.
Not true.
Read this[^].
|
|
|
|
|
Thanks for ur Response,
I had tried LVN_ITEMCHANGED event. I write following code in MASSAGE MAP
as
BEGIN_MESSAGE_MAP(CSelectBusCategory, CPropertyPage) // Line 1
//{{AFX_MSG_MAP(CSelectBusCategory) // Line 2
LVN_ITEMCHANGED(IDC_PREVIEWLISTCTRL, OnSelectItemFromList) // Line 3
//}}AFX_MSG_MAP Line 4
END_MESSAGE_MAP() // Line 5
I also write definition for it as
void
CSelectBusCategory::OnSelectItemFromList(NMHDR* pNMHDR, LRESULT* pResult)
{
MessageBox(" Hiii");
}
When I compile this code, I got error in between
BEGIN_MESSAGE_MAP and END_MESSAGE_MAP(). These are
1)term does not evaluate to a function (Line 3)
2)syntax error : ';' (Line 5)
3)missing function header (old-style formal list?) (Line 5)
4)syntax error : missing ';' before '}' (Line 5)
5)syntax error : missing ';' before '}' (Line 5)
I could not find the reason why these errors are occure though the syntax are correct.I have solution then plz forward it.
Thanks in Advance
Atul
|
|
|
|
|
Atulmahajan wrote: LVN_ITEMCHANGED(IDC_PREVIEWLISTCTRL, OnSelectItemFromList) // Line 3
The proper way of handling a notification message is likewise
ON_NOTIFY(LVN_ITEMCHANGED, IDC_LISTID, OnListSelectionChanged)
|
|
|
|
|
Thanks Nibbu,
I can capture the select item event. Now I want to get the item text so for this I write following code in message function but returns me blank string. The code is as
CString strJPEGFileName = " ";
int nItem,nSubItem;
strJPEGFileName = mWebPagePrvListCtrl.GetItemText(nItem,nSubItem);
Is there any method to retrive text data of selected item.
Thanks in Advance
Atul
|
|
|
|
|
Atulmahajan wrote: I can capture the select item event. Now I want to get the item text so for this I write following code in message function but returns me blank string. The code is as
CString strJPEGFileName = " ";
int nItem,nSubItem;
strJPEGFileName = mWebPagePrvListCtrl.GetItemText(nItem,nSubItem);
Here is an example...
void CDlg::OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
CString csText = m_clstAnyList.GetItemText( pNMListView->iItem, pNMListView->iSubItem );
}
|
|
|
|
|
Hi Nibu
Thanks for reply..
I use same code in my application though it return me blank string. The code is as
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
CString strJPEGFileName = mWebPagePrvListCtrl.GetItemText(pNMListView->iItem,pNMListView->iSubItem);
plz give me solution to this.
Thanks in Advance
Atul
|
|
|
|
|
I am using VS2005 for VC++ application, and my solution contains many projects. I added project to source control using VS2005 "Add projects to source control" menu. It added all *.h & cpp files. But some other files having named "*.vcproj.vspscc" also got added to source control. Why? what is use of this file?
Also what all files from VS2005 project & solution to be added to VSS? I mean which files excluded from Adding to VSS, for a smooth working of group of people in a solution/project
Thanks
Anil
|
|
|
|
|
For Visual Studio 2005, you need to add these files to the source control (and of course, all your .cpp and .h files):
- .sln file: contains the information about the different projects that are in the solution. So, if someone adds or remove a project from the solution, it should be 'saved' for others also.
- .vcproj files: contains all the settings for each projects (you will have one vcproj file for each project). This contain for example the files that are in your project (so if someone adds a new file, it should be reflected), contains also the project properties (all the option that you can configure by clicking 'Project' -> 'Properties').
All the other files are not needed and will be automatically recreated.
|
|
|
|
|
Thanks very much
|
|
|
|
|
Actually , I want to deal with chracter & strings and my problem is....
1) I have an edit control and I just put some text into them when i clicked on next it will go into a single linked list again & again it will take some data
2) When I close my dialog , all the linked list data will store into file
and vise versa for retrieving at the "end of file".
If someone help me then it is benefial for me.
Thank you
Manoj Srivastava
Software Developer New Delhi
|
|
|
|
|
Where did you get struck?
- NS -
|
|
|
|