|
Hi all,
Please anyone can tell me what can i use for painting property pages of Property sheet.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
OnPaint()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I m try this but its not done, after some time run the application when i change one property page to another than the blank form show for some time after this controls are visible.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Probably you are doing some operations which are taking long time.
Due to this OnPaint is not getting processed. Try to put the operations that are taking long time in thread.
Regards,
Sandip.
|
|
|
|
|
HI,
Did you used OnPaint() in all the pages?
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hi All
my last post is this
I am developing a module of software in which I have to find out the source and destination paths of files and folders when they are being copied from one location to another.<br /> but i think some change in requirement after got some many reply.
Now My question is
AnyBody Copy or past in particullar drive like C:\. then make copy these file in some different directory like D:\. Is it possibel.if yes then how?
Plz help me
|
|
|
|
|
ICopyHook[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i am new so i am asking one more question ICopyHook
is working in MFC.
|
|
|
|
|
yes, it's an interface that exposes some methods.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i got some artical from code project but it is showing error.So plz help me to solve that error
1>d:\program files\microsoft visual studio 8\vc\atlmfc\include\atlcom.h(1792) : error C2259: 'ATL::CComObject<Base>' : cannot <br />
<br />
|
|
|
|
|
I already said this to you once. ICopyHook is not going to help you. You need a file system filter driver for your needs. Now, I'll wait for you to come tomorrow and post the SAME THING again.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Sir plz try to understand my problem..I follow member advice.
I know you told me that use file system filter driver. But i havn't found any example of file system filter driver.So i find alternative option.If you have any example of file system filter driver then plz give me
|
|
|
|
|
Drivers are an advanced subject. Perhaps you should work your way up to that level.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
This function makes two assumptions: 1) the shell is used for the copy operation, 2) only folders or printer objects will be copied. The OP clearly wants to copy files too, and he may want to do such using more than just the shell.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I think you are interested in getting some notifications when some changes happens in the file system.
Just have a look at the pair of win32 APIs FindFirstChangeNotification and FindNextNotification.
A sample program is available at http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx[^]
cheers
Varghese Paul
|
|
|
|
|
Thx's for responce i try to run this example but i am geting any out put.Can you test it..
|
|
|
|
|
MsmVc wrote: AnyBody Copy or past in particullar drive like C:\. then make copy these file in some different directory like D:\.
Are you wanting this second copy to take the place of the first copy, or do you want it to happen in addition to?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi all,
I have one query. I am able to run any .exe using createProcess() by giving the complete path of exe as first parameter.
If I want to run diskmgmt.msc then I click on Start->run-> "type here diskmgmt.msc". Now I want to execute this disk management by using createprocess method.
Please suggest me that how can I do this?
Thanks.
|
|
|
|
|
Madan Chauhan wrote: If I want to run diskmgmt.msc then I click on Start->run-> "type here diskmgmt.msc". Now I want to execute this disk management by using createprocess method.
The process for running msc files is C:\WINDOWS\system32\mmc.exe .
So for e.g. you wanna run an msc file called perfmon.msc then you've got to pass it on as a command line argument...
C:\WINDOWS\system32\mmc.exe perfmon.msc
So for disk management msc file we'll go like this...
C:\WINDOWS\system32\mmc.exe diskmgmt.msc
Another option is to use ShellExecuteEx without worrying about which exe should be used for opening a file. The Shell will decide. But limitations being that you cannot wait on the process handle.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
mmc.exe (Microsoft Management Console) is the host executable that actually runs when you open diskmgmt.msc . So spawn mmc.exe by using CreateProcess() . For instance,
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
ZeroMemory( &pi, sizeof(pi) );
CreateProcess( NULL,
_T("mmc.exe diskmgmt.msc"),
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi );
Well, If you just want to open the DiskManagementConsole, then ShellExecute() can do it more easily.
ShellExecute( 0, _T("open"), _T("diskmgmt.msc"), 0, 0, SW_SHOW );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
ptr_Electron wrote: Application crashes even before window is displayed, I found it is @ the below statement. But onlye in the release build, fine with the debug build
Why repost? Asking in the same thread will get you more polite answers?
BTW adding debug information to your release builds will help, then check in debugger to see which variable is NULL.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hello,
I am trying to change the Back Ground color of highlight when a text is selected in Rich edit control to Yellow color.
The problem is it does not leave the default Black color and mixes the Yellow with Black to generate a Highlight of Blue instead of yellow.
Mentioned below is the code:
void CEditSubClass::OnChange()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CEdit::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
CString strText;
int nLengthofString , i;
this->GetWindowText(strText);
nLengthofString = this->GetWindowTextLength();
//get pointer to htmlsourcebar
CMainFrame* pWnd = (CMainFrame*)(AfxGetMainWnd());
ASSERT_VALID(pWnd);
CHtmlSourceView* pHtmlView = pWnd->GetHtmlSourceBar();
CString m_txtHtmlViewSourceUpper;
//populate the FINDTEXTEX structure
FINDTEXTEX ft;
ft.chrg.cpMin = 0;
ft.chrg.cpMax = -1;
ft.lpstrText = (LPSTR) LPCTSTR(strText);
//find text
i = pHtmlView->m_ctlHtmlViewSource.FindText(FR_DOWN,&ft);
COLORREF crBkYellow = RGB(255,255,0);
CHARFORMAT2 fmt;
::memset(&fmt,0,sizeof(fmt));
fmt.cbSize = sizeof(fmt);
fmt.dwMask = CFM_BACKCOLOR;
fmt.dwEffects = 0;
fmt.crBackColor = crBkYellow;
long lResult = ::SendMessage(pHtmlView->m_ctlHtmlViewSource.GetSafeHwnd(), EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION, (LPARAM)&fmt);
//set the selection
pHtmlView->m_ctlHtmlViewSource.SetSel(i,i+nLengthofString);
pHtmlView->m_ctlHtmlViewSource.HideSelection(FALSE,TRUE);
}
I would be thankful to some one who can help me out.
Ritesh
|
|
|
|
|
Hello everyone,
My question is about how many instances' copies are made when inserting new elements into map. Here is my code and questions.
1.
I think when not using pair, there will be one instance copied, from string instance named MikeName to the int key "1" related string instance in the map, and map maintains a separate indepenent copy of string instance from MikeName other than just making a reference to DavidName?
2.
And using pair will make one additional instance copy, from from string instance named MikeName to pair (pair will maintain a separate instance other than just making a reference), and from pair to string instance in the map.
#include <string>
#include <iostream>
#include <map>
#include <utility>
using namespace std;
int main()
{
string MikeName = "Mike";
string DavidName = "David";
map<int, string> Employees;
Employees[1] = MikeName;
pair<int, string> p(2, DavidName);
Employees.insert(p);
return 0;
}
thanks in advance,
George
|
|
|
|
|
George_George wrote: My question is about how many instances' copies are made when inserting new elements into map. Here is my code and questions.
You can simply test this by putting a simple custom class into a map that has a copy constructor and an assignment operator and keep a counter as a member.
Increment the counter in copy constructor/assignment operator. "Also don't forget to copy or assign the counter else you will lose the counter value." Print out this counter to check counter value. You can give an instance a unique name to differentiate between different instances. May be write a small test app!
Or else you can debug through and find.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|