|
IDC_WAIT represent only hourglass,
the answer above suggested IDC_APPSTRING, which did what i wanted...
thanks anyways
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
hi,
i want the code snippet for the action of progress bar control in a dialog box.its urgent,
thnx in advance,
zari
|
|
|
|
|
You can see two examples of CProgressCtrl class on MSDN
|
|
|
|
|
Using MFC?
Here's one way...
Add a progress control to the dialog resource.
Add a CProgressCtrl object to the dialog class:
CProgressCtrl m_StatusProgress;
In the dialog class OnInitDialog() function set up the progress control:
m_StatusProgress.SetRange32(0,100);
m_StatusProgress.SetPos(0);
As progress progresses (haha) calculate the percent done and notify the progress control:
m_StatusProgress.SetPos(percentdone);
|
|
|
|
|
Hi all,
i have 2 dialogs, dlg1 & dlg2 in both of them i use the same code:
BOOL CDlg1::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;
return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
BOOL CDlg2::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;
return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
problem is that i see the hourglass when mouse is over dlg1, but i don't see the hourglass when mouse is over dlg2????
what am i missing? should i implement an other message?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Use CWaitCursor object in OnMouseMove function of both dialog.
|
|
|
|
|
well, i just took you advise and altered it abit:
i used OnMouseMove, and set the cursor myself according to the condition and it worked
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
You say it doesnt call OnSetCursor on CDlg2,right?
|
|
|
|
|
the method OnSetCursor is being called on both dialogs, but the problem is that i can see the hourglass on dialog1 when mouse is over it, but i see only an arrow (not hourglass) on dialog2 when mouse is over it....
?
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I have created a tree control in which the whole explorer tree will be displayed.And also i have added code to drag and drop the folders and files.My problem is when i select the item i am able to drag.But it is not dropping at the selected place.How can i drop the folder at the required place.
Thanks.
|
|
|
|
|
|
Thanks.But if i drag and drop the folders in the tree control they should be also be copied into the explorer at the same time.But dropping of folders is not working properly.(My application displays the explorer in the form of a tree ,so that if we click on the tree we will be opening the folder and files what we require).
Thanks
|
|
|
|
|
Do you need to SHFileOperation
|
|
|
|
|
I created a SDI application which is containing tree control displaying FOlders and files of a System.Now i want ot add functionality drag and drop from GUI to Explorer and Explorer to GUI.When i dragged from explorer to tree, the dragged files and folders to be added where i droped(for ex: if i dropped on USB drive the respected files and folders added to USB drive)
Any ideas?
|
|
|
|
|
|
hello Sir,
i have created a driver which i wish to load n unload dynamically as a non-administrator. but i cannot open the Service manger to create the service as non-administrator. how do i solve this problem?
windows OS drivers get loaded even as non-administrator.. how is it done?
how to load drivers statically then??
please help...
|
|
|
|
|
|
what is the Error Code it is returning...can you send the code snippet
|
|
|
|
|
I have a MDI Project
With a MainFrm (1)
There i open Child-Windows of type CMDIChildWnd (2)
A View of element as type CFormView (3)
And the content of the View is a Dialog (made with the Ressource Designer) (4)
If i start the applic and hit a key on the ChildWindow. Which element does get the OnKeyDown Event?
2 & 3 does it not get.
It's logic that the "highest" Element receive the message -> 4: The Dialog
But i "linked" myself the Dialog to the CFormView ...
I saw that it's possible to create directly the CFormView from out the Designer with "Add Class"
Now i don't have a reaction if i hit a key on the Childform
Is it absolute necessairy to create the CFormView with the Designer?
In my CFormView i have
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);<br />
<br />
BEGIN_MESSAGE_MAP(TheViewClass, CFormView)<br />
. <br />
.<br />
.<br />
ON_WM_KEYDOWN()<br />
END_MESSAGE_MAP()<br />
<br />
void TheViewClass::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)<br />
{<br />
CFormView::OnKeyDown(nChar, nRepCnt, nFlags);
}
Is it the right procedure to make ChildForms ?
Big thanks
|
|
|
|
|
The event goes to the elemenet that has the focus.
Check differences between onchar and onkeydown events....
|
|
|
|
|
Ok i see, that seems logic
So i need to have in each class, that has the focus, a Message-Handler for KeyDown with the corresponding afx_msg On_KeyDown
If i want catch a KeyDown on an CEdit Textbox, i need to derive a class from CEdit that
has a OnKeyDown ...
correct?
Can i say this->getParent()->getParent() to access the MainForm ?
Many thanks !
All these questions aren't in MFC Books, so it's hard to find a resolution by myself
|
|
|
|
|
Normal Dlls are language dependent or Not ?
can we use C dll in C++ and viceversa ?
I read that Com Dlls Are Language independent And Normal Dlls Are Not.
Is it True ?
|
|
|
|
|
COM are just a specific kind of dll's that follow some rules so that they can be used in different languages. So in brief, if you take some special considerations, your C dll can be used in C++, VB and other languages.
|
|
|
|
|
With Out Following COM specifications Can i use My C Dll in C++ or VB ?
|
|
|
|
|
Yes but you have to take care about calling conventions for example (and don't know exactly everything that you need to take care of). Simply search on google and you'll find quite a lot of article
|
|
|
|