|
i'm having two dialog boxes and a formview..now i want t combine all these in a single view..that is the resultant application should contain the formview and one dialog bix at side of form view and another at the down so that if we want we can close those dialog boxes as in vc++ editor(msdev)..,
i thought to try with plug ins..,as for plug ins are concerned i'm not getting any clear material to know about it..shall i try with plug ins..,if so how...or any other method...
Please help me by ur suggestions..thanx n advance..
P.S:All the dialogboxes nd formview are seperate programs...
|
|
|
|
|
Hi,
why don't you try with a splitter window and 2 CFormViews? Or a DialogBox in NonModal message that you change the size and position in its OnInitDialog () with SetWindowPos () without caption and frame if you want (you can change this in resource editor or using WS_ styles and flags.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
hi nelek,
actually i've designed one dialog box with treeview,another with tab view,and formview is an editor as vc++ editor..
more or less i've to create vc++ lookalike editor...so if we want to close treeview we have to close it,so the other dialog box nd formview...
in splitter window v can't close seperate windows!!(isn't it?)
|
|
|
|
|
Hi mirraa,
actually you can close all the opened windows/dialogs in one touch. For example, in my app (MDI in VC++ 6) I have one CScrollView as MainView and up to 48 CFormViews for each element I want to introduce its parameters. When I close one SecondaryView I close it, and when I close the MainView I close ALL the others. I do this with:
BOOL CMyDoc::CanCloseFrame(CFrameWnd* pFrame)
{ int nError = 0;
CView* pFrmView = pFrame->GetActiveView ();
if (pFrmView->IsKindOf (RUNTIME_CLASS (CFormView)))
return TRUE;
POSITION pos = GetFirstViewPosition ();
while (pos)
{ CView* pView = GetNextView (pos);
if (pView->IsKindOf (RUNTIME_CLASS (CFormView)))
{ CFrameWnd* pTempFrame = pView->GetParentFrame ();
if (pTempFrame)
pTempFrame->DestroyWindow ();
}
}
return CDocument::CanCloseFrame(pFrame);
}
The only difference with the DialogBoxes is that you don't have this list for opened Views in Document. But you can also made it by yourself. Just create a CWnd* dlgArray [MAX] or hWnd dlgArray [MAX] and, in every DialogBox, take a pointer (or a handle, whatever you like more) to the opened DialogBox in the OnInitDialog. Afterwards you can close them as well with a call to DestroyWindow, CloseDialog or other functions like those.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
actually i couldn't understand ur logic..i need all the dialogbox and formview in a single appln as vc++ editor ,so that i can close them with mouse..my project is exactly like a vc++ editor...shall i use plug ins?if so how...?how 'll i combine three programs in a single program..since my dialog with tree view s a sep pgm,my tabview dialog is a seperate pgm nd form view is a sep pgm...please suggest me ...thanx n advance...
|
|
|
|
|
Then I would make it with a SDI application not with dialogs, and make a splitter window to add two views more. At left, one CTreeView derived to the "explorer", then a CSrollBar derived to work with and the third... it depends on what you want to make. The problem of using more views, is that you can not change to a new doc if you dont close all views, at least in my project. Because of that I'm using that function to close the "added" views first when I close the main view.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I'm new to programming and Visual C++ .NET 2003 Professional. Can you suggest a training reference/book/video/website/??? that would help me understand how to make use of this programmoing tool? The programming text by Deitel and Deitel that I use doesn't even cover the subject of how to make use of the debugger.
Thanking you in advance for your help and time.
|
|
|
|
|
You can set a break point in a function. While executing the application in debug mode(you can run the application by pressing F5 key) the application would run to the first breakpoint encountered. After that you can step into debugger for line by line debugging by pressing F10 to execute a statement.
You can also search for other debugging techniques that are scattered on the Web but I don't think you would find a point where you get to know all the tips and tricks under one topic.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
7.25 GB (7,792,175,104 bytes) is what windows says. -797759488 bytes is what findfile .GetLength() says what do i need to do to make it show as 7.25 gb?
|
|
|
|
|
|
no matter what i try i cant get it to work right files under 2 gb is right but anything bigger is wrong
|
|
|
|
|
Hi,
another option is to divide by 1024 as long as you don't have the format you want.
7,792,175,104 / 1024.0 = 7609546
7609546 / 1024.0 = 7431,197265625
7431,197265625 / 1024.0 = 7,2570285797119140625
and make a Round () or a Trunc ()
Ehmm, I suppose you have a type missing in your post of findfile.GetLength ()
797,759,488 --> 7977594880 / 1024.0 = 7790620
7790620 / 1024.0 = 7608,02734375
7608,02734375 / 1024.0 = 7,429714202880859375
Don't ask me about why the results are different :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
anything under 2 gb is right but if the file is bigger than that its wrong it shows a 12 gig file as 2.something gb
|
|
|
|
|
Mmmm, it maybe is because of the large... dunno
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I have a program working fine when active configuration is set to debug-I build it, then execute.
When I change the configuration to release, it compiles OK, but when I execute it the background of the dialog turns black, and buttons that displayed integers display nothing.
The buttons are set with
GetDlgItem(IDC_BUTTON14)->SetWindowText(newText)
Ideas? Thanks.
|
|
|
|
|
Compare your debug vs. release settings for both the compiler and linker.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm not experienced enough to totally understand what you mean, but I gave it a try.
I looked at PROJECT SETTINGS, and toggled between "Settings for Debug" and Settings for Release."
Under tab LINK, GENERATE DEBUG and LINK INCREMENTALLY are checked.
Under tab RELEASE, neither is checked.
I didn't know where to look to check the settings for COMPILER.
I did manage to solve the background color problem by setting the background in InitDalog, but the disappearing integers in the button text still have me stumped.
thanks.
|
|
|
|
|
Do you check that the variables have been initialized properly. A variable may have a different value in the release and in the debug build, causing the differing behaviour. And if you go back and see where the value of that variable is set, you will most probably find out that it isn't: You simply forgot to initialize that variable. The reason why the debug build seemed to work is that the debug version of the runtime library initializes dynamic memory and stack variables to known values (in order to track down memory allocation and overwrite errors), while the release version of the runtime library doesn't.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello
_AnShUmAn_ wrote: A variable may have a different value in the release and in the debug build, causing the differing behaviour
Well , to add to it I say you most probably have a code optimization problem in the section of code which looks suspecious to you . You may find the values of variables in release by classical AfxMessageBox(value) displays . I have come across a situation where in release mode a string = "systarg" was represented in stack as "g|a|sys|t" which resulted in change of code flow . I did the following to solve it
Try this
add the following pramas around the section of code which looks problamatic
#ifndef _DEBUG
#pragma optimize("", off)
#endif
..... your code which works fine in debug
#ifndef _DEBUG
#pragma optimize("", on) // désactivation de toutes les optimisations
#endif
redindian
|
|
|
|
|
Ok, first of all hello folks, I'm new here and I'm in a new challenge now that I hope someone will be able to help me.
I'm working on making a Keyboard Device Driver, but I'm completely new at this issue, but not so new about C language.
My goal is to make a device driver to automate an application. In this application I have to press 2 on the keyboard every, lets say, 3 seconds.
Why do a device driver for it? Because SendKeys stuff did not worked, and I liked the challenge.
But it's becoming more then a challenge since I could not find information about Keyboard Device Drivers, the best info so far came from Toby Opferman's Driver Development Part 1: Introduction to Drivers (http://www.codeproject.com/system/driverdev.asp).
So, does anyone have a link, or some piece of code that may help me?
Any info will be appreciated.
|
|
|
|
|
Hi there,
I am a very beginner so please be pacient .
I've tried to add an own Property to the Property Page of my ActiveX Control in VC++ 6.0. But I've got a Problem there with serializing it.
I added the Bold line in my Control's Ctrl Class.
void CButtonCtrl::DoPropExchange(CPropExchange* pPX)<br />
{<br />
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));<br />
COleControl::DoPropExchange(pPX);<br />
<br />
<br />
<br />
PX_Long( pPX, _T("DBID"), m_CTRL_DBID ); <br />
<br />
}
And the Class Wizard added the following bold lines in the PropPage Class:
void CButtonPropPage::DoDataExchange(CDataExchange* pDX)<br />
{<br />
DDP_Text(pDX, IDC_CAPTION_EDIT, m_PPG_Caption, _T("Caption") );<br />
DDX_Text(pDX, IDC_CAPTION_EDIT, m_PPG_Caption);<br />
DDP_Text(pDX, IDC_DBID_EDIT, m_PPG_DBID, _T("DBID") );<br />
DDX_Text(pDX, IDC_DBID_EDIT, m_PPG_DBID); <br />
<br />
DDP_PostProcessing(pDX);<br />
}
But every time I open the Property Page in the Test Container for ActiveX Controls, change the value of my Property, click on "Apply" and "OK" and open the Properties Page again, the Value I put in isn't there anymore.
Can you tell me, what I've done wrong or what I maybe forgot?
Do I have to do something in the Get/Set Methods?
Greetings TheInfernalCrow
-- modified at 19:08 Tuesday 15th May, 2007
|
|
|
|
|
I'm having difficulty playing .wav files in Vista. I'm currently using PlaySound(), which works in XP, but Vista does not. I've seen at least one other person with this problem elsewhere, but I can't seem to find a solution. I'm running VS C++ 2005. Thanks.
-- modified at 2:20 Wednesday 16th May, 2007
Perhaps a little clarification. When executing the PlaySound() function in XP (as part of a larger program) the sound gets played correctly. However, when this program is run in Vista, the sound does not get played.
|
|
|
|
|
I just used Vista to test an app that has an about box with sound effect via PlaySound() . It worked fine. Have you tried to play the wav file in WMP on Vista? Do you hear any sounds at all?
|
|
|
|
|
I've tried playing the sound in WMP and it worked properly. I'm getting the path from the registry and the path seems correct. PlaySound() actually returns 0 (error) when I try to don't pass in SND_ASYNC, but returns 1 (the sound was put into the sound queue) when SND_ASYNC is passed in. In each case, the sound does not play properly.
|
|
|
|