|
|
I have a problem.
I have a dialog box and in this dialog box there is a button. If I click this button it will open a new dialog box.
This new dialog box has a progress bar. My problem is, how can I trigger this new dialog box so that the progress bar will work after the dialog box is shown (without any using of other control ie: button, radio button or what ever). I try most of the ( WM_ ) message handler but I still can't found it.
|
|
|
|
|
Check out the doccumentation on CProgressCtrl, specifically: SetRange32, SetStep and StepIt.
|
|
|
|
|
Hi,
thanks for reading this. I'm working on a project where I have a large amount of structured data to manage. Similar to file directories. I've got a root folder, subfolders and eventually documents.
How do I deal with it in my program in a manner, that allows effectivly saving the data to a file (or multiple files?). Imagine me writing an application that stores the entire folder/file structure of a given disk. Each item (disk, folder, file) has it's own properties which have to be stored as well.
Any tips and links greatly appreceated.
Matthias
|
|
|
|
|
here is the question:
input: a directory name
output: All the files in that directory AND its sub-directories.
(in C/C++)
|
|
|
|
|
Take a look at the help in the MSDN of the functions related to this of the listboxes and comboboxes:
>> Dir and DlgDirList
You'll see that this is very easy.
PD. I think it can be done with a treeCtrl too.
(at last I must advice you that I'm just a begginer that some time ago had the same problem, it worked for me, but it can not-be the best solution)
|
|
|
|
|
I don't know how you would do it using the standard C library, but in Win32 use FindFirstFile and FindNextFile in a recursive function
|
|
|
|
|
First of all let me remember you that I'm a novice and that surely will be more effective ways of doing this.
After that little note, here's the code that I commented you:
BOOL CNavegadorRefsDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CString csFullPath = "";
int iLength = 0;
csFullPath.Format("%s\\%s.%s",
this->m_csPath,
this->m_csWildCardName,
this->m_csWildCardExt);
iLength = csFullPath.GetLength();
this->DlgDirList(csFullPath.GetBuffer(iLength),
IDC_lbRefs,
NULL,
NULL
);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
As you can see the code is implemented in the OnInitDialog f(x), but it can be placed where you need it.
regards, and I expect this helps.
|
|
|
|
|
I have an existing app that has a main frame.
I also have a separate application that I turned into an
extension DLL and exported a wrapper class for the creating
hiding, showing and deleting of this new frame.
I want to pull up the 2nd app in the first app.
The 1st frame is created and at a later time I create the second
frame. During the creation of the second frame I replace the m_pMainWnd
member of the app class.
I noticed that the m_pMainWnd pointer doesn't automatically get swapped.
Thus some of the messages going to the first frame end up getting handled
in the second frame.
Should I use the OnSetFocus to swap the proper m_pMainWnd handler?
Or is there a much better way to try to do what I am doing?
Thanks and Regards
Kevin
|
|
|
|
|
Hi,
With all those Visual C++ gurus around here at CodeProject, what about
joining forces to create a set of extensible classes aimed at providing
state-of-the-art UI?
I'm thinking about something like CodeJock that provides Office-like UI, or Outlook-like UI or Visual Studio-like UI for MFC, but for WTL. This will make use of multiple inheritance to allow for the 'don't pay for what you don't use' approach.
I think WTL is the way to go but lacks some nice UI features. I personnaly want to get involved in this but I think this should be a collective effort.
Will such an idea encounter enough enthusiasts? Is is worth setting up something here at CodeProject of SourceForge?
Waiting for your feedback, guys...
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Looking for a good sample on sockets, I know nothing about sockets.
Want to create a Listener.exe (wait for data to be sent to the socket)
When data is received, process the data,,,ie display on screen.
What to create a Sender.exe (send data to the socket)....
Any ideas? Just a simple example to carry out the basics...get me on the road....
Don't want to use wizards...just simple console apps in Visual C++ 5.0
|
|
|
|
|
Hello,
I have a probleme to use Visual C++ ( 6 ): ( with MFC )
_to make a ComboBox for all drives
_to make a ListBox with directories
_to make a ListBox with files
thx for your help
|
|
|
|
|
how can i embed a propertysheet in a CToolBar derived class ?
raphael mor
|
|
|
|
|
I just accomplished this using several classes from the Dundas Ultimate Toolbox. Their docking window classes made it alot easier. But, I still needed to customize some of the code to get it to look right.
Good luck,
Frank
|
|
|
|
|
exactly...
hum...
is it that difficult ?
|
|
|
|
|
Could anybody please give me an example how to use CSocket ?
Well best thing is an example for downloading files via this CSocket class !
Using it like this doesnt work :
CSocket m_Socket;
m_Socket.Create();
m_Socket.Connect("www.codeproject.com",80);
well, and how can i check if its connected, or not ?!?!
help me, im quite new with visual c++
|
|
|
|
|
Could anybody please give me an example how to use CSocket ?
Well best thing is an example for downloading files via this CSocket class !
Using it like this doesnt work :
CSocket m_Socket;
m_Socket.Create();
m_Socket.Connect("www.codeproject.com",80);
well, and how can i check if its connected, or not ?!?!
help me, im quite new with visual c++
|
|
|
|
|
I have to open a sys file from Visual C++ Project.
Well,
it is easy in win95 to open a vxd as a file using CreateFile.
but i am having problem with Window NT sys file.
Does anyone help me loading the driver from there.
Is it must to load the driver or something else to do before opening it.
or is there any naming style that i m not following.
thanx in advance.
sajid
|
|
|
|
|
I have to open a sys file from Visual C++ Project.
Well,
it is easy in win95 to open a vxd as a file using CreateFile.
but i am having problem with Window NT sys file.
Does anyone help me loading the driver from there.
Is it must to load the driver or something else to do before opening it.
or is there any naming style that i m not following.
thanx in advance.
sajid
|
|
|
|
|
I install it on my machine (Win 2000 Pro), after that it got the error say devbied package cannot load because its internal version is mismatch from current version. Then no matter what I try, I cannot run VC++ again, even when I uninstall and install it again.
Anyone got the same problem? Could you tell me what is the best way to install it?
Thank you,
NTD
|
|
|
|
|
I tried to install the Windows CE Tools on my MSVS with SP4, the setup succeeds but my MSVS gets broken. I had to reinstall everything.
Maybe you did something similar?
Regards Armin
|
|
|
|
|
I'm working on a browser, but i've got a problem:
Before, when a user click on a link, my browser open a new IE window!!
I change the method OnNewWindow2() into:
void CWebControlBrowserView::OnNewWindow2(LPDISPATCH* ppDisp, BOOL* Cancel)
{
// Get a pointer to the application object
CWinApp* pApp = AfxGetApp();
CDocTemplate* pDocTemplate;
POSITION pos = pApp->GetFirstDocTemplatePosition();
pDocTemplate = pApp->GetNextDocTemplate(pos);
ASSERT(pDocTemplate);
CFrameWnd* pNewFrame = pDocTemplate->CreateNewFrame(GetDocument(), (CFrameWnd*)AfxGetMainWnd());
ASSERT(pNewFrame);
// Activate the frame and set its active view
pDocTemplate->InitialUpdateFrame(pNewFrame, GetDocument());
(...)
pWebControlBrowserView->SetRegisterAsBrowser(TRUE);
*ppDisp = pWebControlBrowserView->GetApplication();
}
Now my application creates a new instance when a user click on a link, but when the user clicks on a favorite (i create a new control) the page appears in the original window!! And when the user closes the original browser, all the others are closed too!
I don't understand!!
|
|
|
|
|
How to Pass Argument to WinMain Function
Advanced thanks
|
|
|
|
|
Hi all,
how can i resize my CEdit, (with GetRect & MoveWindow) automatically, when the Main CDialog will be resized??????
On the Main CDialog i want to scale the CEdit to 0,0 cause i dont want a thick border =p ___ How can i manage this??
Please help me!!
Thanx and bye b4ckup
|
|
|
|
|
Maybe I could help, but I can't clearly understand your need? Post some code lines here!
"Socrates is a man. All men are mortal.
Therefore Socrates is mortal."
-- Aristotle (syllogism)
Cheers
Masoud SamimiGo!
|
|
|
|