|
Nish is correct. I did not expect this from tox. He was honored as one of the most useful members of 2005. I do not understand what is his need to come down to this level. Tox, pls delete that post. Let them vote whatever they want. We know that you have something to contribute to this society.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Technobizz wrote: Paritosh Tripathi
B.Tech. (C.S.)
I have heard this name before..Anyways you can look for this article
CONTROL ARRAY[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
U have already got the answer to you questions
but u should start refering some good book's
and there is lots of stuff on codeproject to help u
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
I have a project that I have different configurations which compile different libraries for different versions. Is there a way to link the Version resource to my configuration?
I basically want configuration A to ahve version 7.2, configuration B to ahve version 7.02 etc.
Any ideas? I asked this questions awhile back I think and got the correct answer, and I completely forgot how to do it.
Thanks.
-C
|
|
|
|
|
Wheatbread wrote: I basically want configuration A to ahve version 7.2, configuration B to ahve version 7.02 etc.
You can specify different libraries for different configurations in the project settings.
|
|
|
|
|
I've done that. But when I compile it, I want the DLL that I create to have different version numbers depending on the configuration selected.
|
|
|
|
|
VisualC++ IDE: ResourceView -> Version -> Properties -> Condition ?
|
|
|
|
|
What version of the IDE are you using VC 6.0? VS 200? what?
In VC 6.0, you can specify different preprocessor definitions for each configuration in the project.
Move your version resource into the RC2 header file.
Inside there, use the preprocessor identifiers to filter the file or product version resource data.
|
|
|
|
|
I prepared (in Visual Studio 2003 + MFC) "Dialog Based" Application. Now, I have one dialog window where I want to add two book marks.
I have two objects:
class DlgPage1 : public CPropertyPage
// variable mPage1
class DlgPage2 : public CPropertyPage
// variable mPage2
In the resource window I have done two dialogs with properties:
Style = child
Border = thin
TitleBar = true
Disabled = true
In the OnInitDialog (main window) function I have code:
mPropertySheet = new CPropertySheet("Simple PropertySheet");
mPage1 = new DlgPage1();
mPage2 = new DlgPage2();
mPropertySheet->AddPage(mPage1);
mPropertySheet->AddPage(mPage2);
mPropertySheet->Create(this, WS_CHILD | WS_VISIBLE, 0);
mPropertySheet->ModifyStyleEx(0, WS_EX_CONTROLPARENT);
mPropertySheet->ModifyStyleEx(0, WS_TABSTOP);
mPropertySheet->ModifyStyleEx(0, WS_MAXIMIZE);
// now, I want to resize windows for almost maximum size
CRect rect;
GetClientRect(&rect);
int Width = rect.Width()-7;
int mHeight = rect.Height()-7;
mPropertySheet->SetWindowPos(NULL, 7, 7, mWidth, mHeight, SWP_NOZORDER);
================
The SetWindowPos doesn't do what I expect.
Why the windows doesn't resize?
It has the size - I designed in the Resource.
Regards
mwgomez/Poland
|
|
|
|
|
gomez_a wrote: It has the size - I designed in the Resource.
And this is exactely what you request by doing this:
CRect rect;
GetClientRect(&rect);
int Width = rect.Width()-7;
int mHeight = rect.Height()-7;
mPropertySheet->SetWindowPos(NULL, 7, 7, mWidth, mHeight, SWP_NOZORDER);
If you want to maximize your widows, use GetSystemMetrics to get the screen size, and use SetWindowPos to update your window size:
int cx,cy;
cx=GetSystemMetrics(SM_CXSCREEN);
cy=GetSystemMetrics(SM_CYSCREEN);
mPropertySheet->SetWindowPos(NULL, 7, 7, cx-7, cy-7, SWP_NOZORDER);
~RaGE();
|
|
|
|
|
I have the same effect like before...
Regards
mwgomez
|
|
|
|
|
Does mPropertySheet actually represent a dialog control? Normally in MFC you'll have an instance of a C++ class for a dialog control in the header of the dialog and DDX_Control in your DoDataExchange handler to associate the class with the control. i.e.:
class CMyDialog : public CDialog
{
CEdit m_EditControl;
};
void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT1, m_EditControl);
}
In your code it looks like you're just creating a CPropertySheet but I can't see where you're associating it with a control on your dialog.
Steve
|
|
|
|
|
I was based on the book:
"Visual C++ Bible" Richard C.Leinecker, Tom Archer.
There are samples how to create instance of the classes CPropertyPage, CPropertySheet. There is no associating with a Control and it works.
But there is also a sample - how to create this classes in existing Dialog.
I wrote it in my sample - and there is no right effect
(I think it will be a little problem, but I am interesting in solve it).
Regards
mwgomez
|
|
|
|
|
Hi,
I am not clear about your problem.
Any how, I'll tell you what I feel about this
If nFlags is nonzero in ModifyStyleEx, then the fuction calls the Win32 function SetWindowPos and redraw the window.
So please take a look into all the parameters in ModifyStyleEx function call.
better remove the function calls of ModifyStyleEx and use only SetWindowPos. Once after getting correct try to add the above three function calls of ModifyStyleEx on by one.
regards
Vallikumar A
|
|
|
|
|
It is my code:
// CSheet *sheet: class CSheet : public CPropertySheet
sheet = new CSheet("Sheet");
// CDlg1 and CDlg2 properties:
// style = child
// border = Thin
// Disabled = TRUE
//
//CDlg1 *pg1: class CDlg1 : public CPropertyPage
pg1 = new CDlg1();
//CDlg2 *pg2: class CDlg2 : public CPropertyPage
pg2 = new CDlg2();
sheet->AddPage(pg1);
sheet->AddPage(pg2);
sheet->Create(this, WS_CHILD | WS_VISIBLE, 0);
sheet->SetWindowPos(&CWnd::wndTopMost, 12, 12, 578, 578, SWP_NOZORDER);
sheet->ModifyStyleEx(0, WS_EX_CONTROLPARENT, SWP_NOZORDER);
sheet->ModifyStyleEx(0, WS_TABSTOP, SWP_NOACTIVATE);
But it still desn't work. Have I any mistake?
I thought - it is simple. I have an example from the book: "Visual C++ 6 Bible". (:
Regards
mwgomez
|
|
|
|
|
recently, I want some controls to reside in CFormView, and I want to hide the scroll bar of CFormView during program life, has someone any ideas to hide the scroll bar in CFormView? Thanks in advance.
|
|
|
|
|
|
Yes, the solution works in non-split mainframe, but my program layout of whole frame is like ' |- ' symbol(two panes, the right one contains top and bottom sub pane), and I tried your solution that can hide the horizontal scroll bar in CFormView(right-top subpane), not vertical scroll bar in CFormView and CTreeView(left pane). Any idea? plus, the solution for CTreeView,CEditView?
Thank you in advance!
|
|
|
|
|
|
Hi,
Could you please help me in writing a sample code for Zipping a individual files(say .doc) available in the given folder using C++ or MFC.
Input:
C:\Sample\Ex1.doc,....Exn.doc files available in "Sample" folder in any drive
Provide that u have to make use of already available "winzip.exe" available in the system.
OutPut:
C:\SampleOut\Ex1.zip,....Exn.zip
Thanks in advance
|
|
|
|
|
ShellExecute() on Winzip.exe, and read winzip.exe command line doc to know its waiting parameters for such an action...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Thanks for your reply
Could you please provide a sample code for this.
Thanks in advance
|
|
|
|
|
see here[^]
ShellExecute(NULL, "open", "C:\Program files\Winzip\winzip32.exe", "myfile.doc myoutput.zip", NULL, NULL);
this line is what i guess, but i'm not sure how the winzip command line works... read first how it waits for the parameter, and if it is winzip32.exe to call, etc...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
psbasha wrote: Could you please provide a sample code for this
yeap try this :-
http://www.codeproject.com/cpp/unzip.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks for your reply.
COuld you please send the link for the sample code for Zipping the files
|
|
|
|