|
Abyss wrote: pWnd->SendMessage(PBM_SETRANGE32, (WPARAM)nLower, (LPARAM)nUpper);
Why not call SetRange32() directly?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Here is a small algo that might help you in implementing .
int iTotalSize = FindTheTotalSizeOfRecords();
CProgressCtrl DlgCtrl;<br />
DlgCtrl.Create(WS_CHILD|WS_VISIBLE, CRect(10,10,200,30), pParentWnd, 1);<br />
DlgCtrl.SetRange(1,100);<br />
while (RecordPresent)<br />
{<br />
int iTillNow = FindTillReadnow() ;
int iPos = iTillNow/iTotalSize;<br />
DlgCtrl.SetPos(iPos);<br />
}
Regards,
FarPointer
|
|
|
|
|
I have to write a module in VC++ which will enumerate all controls(including menus, buttons etc) present in a Window and launch each control programatically e.g for a submenu item i have to launch it using only it's shortcut key.
I have successfully been able to enumerate all submenu items within each menu e.g WordPad. i get each submenu string using GetMenuString() and it's id using GetMenuItemID().
The problem is how do i enumerate the other controls present e.g in the Wordpad window e.g we have the 'New', 'Open' buttons, and a no. of drop down combo boxes etc. i want to be able to enumerate all of these controls and get their id/ hwnd / string name and programatically launch each window associated with e.g. the 'New' button etc.
How do i do this?
This is a test application to enumerate all Menu/submenus and all controls present in a window and launch each submenu window or controls window one after the other using their short cut keys if the menu has one.
Kindly suggest me a way to do, if a sample code exists kindly update.
Awaiting a response.
Sincerely
Giftsana
|
|
|
|
|
Try this:
for(CWnd* pChild = GetTopWindow(); pChild; pChild = pChild->GetNextWindow()) {<br />
if(!pChild->IsKindOf(RUNTIME_CLASS(CListCtrl))) continue;<br />
}
Hope this helps
Abyss
|
|
|
|
|
Hello
Thank you, let me try it.
Thanks
Giftsana
|
|
|
|
|
Try this
EnumChildWindows
Regards,
FarPointer
|
|
|
|
|
Sure, will try with EnumChildWindows()
Thank You.
Sincerely
Giftsana
|
|
|
|
|
I'm trying to create an OLE link to a file using WinAPI method OleCreateLinkToFile. By this my document will contain a link to a file on the disk. This works fine for Excel XLS files.
However for some reason this method embeds other type of documents. If I try to link PDF file to my document it is embedded - what I do not want, because it increases my document size. Note I do not have PDF reader installed.
Do you have any idea how to solve this situation? Is it possible to force the link creation? If not, is it possible to detect such situation so I'll rather ignore such files from linking?
Thanks, Abyss
|
|
|
|
|
Sir,
I am in need of some good help books on how to use InstallShield for VC++6 can pls help me by giving me info
about any book or article.
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
There are none. If I remember correctly, InstallShield used
Visual Basic.
Two other comments:
* Installshield is really complicated and expensive.
* The site jrsoftware.org has a fantastic and free installation
program called Inno Setup. Its easy to learn, easy to use,
has great functionality and is free.
I spent weeks spinning my wheels trying to learn InstallShield
and eventually I learned enough to put together a compile, but
it always took me 15+ minutes to put together a new compile.
I hope this helps.
|
|
|
|
|
I have added a new interface in a library to provide new functionality.
The syntax is
library
{
... previous code...
[uuid(..), hidden]
dispinterface mynewinterface
properties:
method:
[id(1)] void MyNewMethod(void);
}
coclass
{
dispinterface mynewinterface
}
};
I use this method and it works fine. But now I want to a make a check whether the funcionality exists or not and that is possible i guess by checking whether the interface i.e. mynewinterface exists or not. How can I do it?
Any help.
I am using VS. NET
Best Regards
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
hi,
i have taken an MDI application,on menu command i am deleting the existing view and replace with a new view , the new view consists of OCX control,i am creating the OCX Control in OnInitialUpdate() function, instead in OnCreate().How to invoke OnIntialUpdate function in ChildFrame when we create the view.
Thanks in before
|
|
|
|
|
hi all,
i have bit confused how to access a controls values from one form to another form. for example if i have a Comobox in Form and after navigate to the Next Form i have to extract all the values of the comboBox of First Form to the Next Form where i have navigated.
For Example this can be done in vb (visual Basic) as.
for(i =0 i< form1.combox1.getCount() i++)
form2.combobox1.AddString(form1.combobox1.getString(i))
end for
//How can we achieve his in VC++ i am getting very confused with this approach. no where there is any perticular solution. please help me out.
thanks
uday.
uday kiran
|
|
|
|
|
Hi kiran janaswamy ,
whats type form?
|
|
|
|
|
The same problem is with me. For me it is a dialog based application. I want to access value of one dialog control of 1st form and diplay it in another form.
How to do that?
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Example if CssDlg is Main window (CDialog)
and in this dialog is radiobutton Now in another dialog use
CssDlg* m_Main2 = (CssDlg *) GetParent();
m_Main2->m_Radio3.SetWindowText("test");
-- modified at 4:06 Thursday 13th April, 2006
|
|
|
|
|
it is correct for accessing one value.
but if i want to access bulk of values like list box contain lots of list items what abt that.
thanks,
uday.
uday kiran
|
|
|
|
|
thanks i got how to access controls from one form to another.
thanks,
uday.
uday kiran
|
|
|
|
|
CFrameWnd* pFrame = (CFrameWnd*)AfxGetApp()->m_pMainWnd;
//Example for MainFrame CMainFrame* m_Main = (CMainFrame *) pFrame->GetActiveFrame();
//m_Main->yourfunctionsi nmain
//Example for CAnswerView* m_Main = (CAnswerView*) pFrame->GetActiveView();
//m_Main->yourfunctionsin view
|
|
|
|
|
When the first form is losing focus, store the values from the combobox in the parent. When the second form is getting focus, access those values from the parent.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi all,
I am trying to derive a listctrl (only report view) with alternate row colors from CListCtrl. But I am confused how to implement this in OnPaint, OnEraseBkgnd or DrawItem...
Can anybody suggest me a good solution or any useful link?
Thank you.
- NS -
|
|
|
|
|
You can use "Custom Draw" to do this I think.
Steve
|
|
|
|
|
I tried... but only the rows those have content can be chnaged. I want to change all the rows to be changed, even if the listctrl is not fully filled.
- NS -
|
|
|
|
|
|
Thank you for the replay...
I could manage it by writing codes in OnEraseBkgnd as well as DrawItem.
- NS -
|
|
|
|