|
you copy the files into the directory your source files are created (into windows explorer).
then, you go into your workspace (workspace tab), and right click the project item -> add existing files to project... and choose the files you've just copied...
the header will appear in the header folder, and the c files in the source folder...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
can a dynamically created variable hold a const value? if so,how can that be declared?
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
i think you will need to wrap your value in a class ( or maybe a template of some sort ) with a overriden operator;
something like :
class myValue
{
public:
myValue( int value ) : m_Value( value ) {};
int getValue( return m_Value;};
private:
const int m_Value;
};
or after thinking about it, maybe something like :
const int* pInt = new int(3);
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
To create a const *, you can put const in two places,
const char *
char * const
You can do both. One says you can't change the memory address the pointer points to, the other says you cannot change it's contents.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
While we're on the subject, Christian, what is the difference between these two. (I always get them backwards!)
abc(CString& const );
def(CString const& );
|
|
|
|
|
Tom Archer wrote:
abc(CString& const );
This one is pointless. You can't declare a "const reference" because a reference is already const.
Tom Archer wrote:
def(CString const& );
This is a reference to a const CString.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
What does this one mean?
ghi(const CString&);
|
|
|
|
|
It too is a reference to a const CString . In other words, the following are equivalent, just different styles:
const CString &str;
CString const &str;
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi All,
This is an existing paragraph formatting for bullet
pf=GetParaFormatSelection();
pf.dwMask = PFM_NUMBERING | PFM_STARTINDENT;
pf.wNumbering = PFN_BULLET;
pf.dxStartIndent = 300;
SetParaFormat(pf)
Like this I would like to create own paragraph formatting.For example"<>".
Thanks,
|
|
|
|
|
I have the handlers and message maps as below.
Whenever a child window is visible the following hanldler and its update function is not invoked.
When the Child window is closed they are invoked..
Can anyone explain this behaviour.
ON_COMMAND(ID_VIEW_DRAWTOOLBAR, OnDrawToolBar)
ON_UPDATE_COMMAND_UI(ID_VIEW_DRAWTOOLBAR, OnUpdateDrawToolBar)
void CMainFrame::OnDrawToolBar()
{
if (m_bUICtrlBar)
{
m_bUICtrlBar = false;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
else
{
m_bUICtrlBar = true;
ShowControlBar(&m_UICtrlsBar, m_bUICtrlBar, false );
}
}
void CMainFrame::OnUpdateDrawToolBar(CCmdUI *pCmdUI)
{
if (m_UICtrlsBar.IsVisible())
m_bUICtrlBar = TRUE;
else
m_bUICtrlBar = FALSE;
if (m_bUICtrlBar)
{
pCmdUI->SetCheck(TRUE);
//AfxMessageBox("visible so check");
}
else
{
pCmdUI->SetCheck(FALSE);
//AfxMessageBox("Invisible so Uncheck");
}
}
laiju
|
|
|
|
|
hello!
i want to create check boxes on run time in the groupbox but i dont know how to do this plz tell me.and give detail procedure
|
|
|
|
|
Connect a variable to your groupbox: CButton m_Stat;
1-
CreateWindow("BUTTON","this is checkbox",WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX | WS_TABSTOP,20,10,200,20,m_Stat.m_hWnd,NULL,AfxGetApp()->m_hInstance,0);
-OR-
2-
You can also use CButton: Just make the CButton variable at class level.
static CButton b;
CRect rect;
rect.SetRect(20,20,200,40);
b.Create("Hello oo",WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_AUTOCHECKBOX,rect,&m_Stat,20);
If you need to use plain win32, then it is a bit different.
this is this.
|
|
|
|
|
but this create only single checkbox and i want to display single check box on each click event.means i want to display 1 checkbox then on next click event another next to previous.
|
|
|
|
|
well you did not say so on your initial post ...
but I still don't understand what you want to do ?
you want to create a new checkbox control each time the user clicks somewhere ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
ya actually i want to open no of files at same time and each time when i click on open file on file menu a check box would be created on each open file action as i would open another file the next check box would be opened on group box next to previous one.
hope u'll understand now
|
|
|
|
|
Create a CPtrArray m_ptrArray; variable in your header.
Then when you want to create the checkbox,
CButton* pButton;
pButton = new CButton;
...
Create the button using the code in reply above.
...
Then add it to the array like this:
m_ptrArray.Add(pButton);
Now your checkbox is created and added to the array for later usage.
When you need to access it, use:
CButton* pButton;
pButton = (CButton*)m_ptrArray.GetAt(iLocation);
where iLocation is the index of the button starting with 0...to m_ptrArray.GetSize();
this is this.
|
|
|
|
|
StretchBlt can be done for Bitmaps.
How do I do the same for ICONS.
I need to zoom an icon.
Any suggestions plz.
laiju
|
|
|
|
|
How about DrawIcon into a memory DC, then BitBlt from the mmemory DC to your destination DC?
|
|
|
|
|
StretchBlt can used with bitmaps to implement zooming.
How can I do the same for Icons to bring about its zooming effect
laiju
|
|
|
|
|
Hi all,
Since starting to use STL (mainly vectors), I've found that VC++6 (latest SP) is crashing more and more frequently when compiling, the more STL code I use. It then compiles OK if I restart the IDE. Is this a common problem? Any fixes?
TIA,
Steve.
|
|
|
|
|
never seen this, but instead of restarting the whole IDE, what about just rebuild all ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
The IDE itself locks up and has to be killed with the Task Manager.
|
|
|
|
|
Anyone knows how to set the description text for a Windows Service? (the text in the second column of the Services MMC window).
Tnx
|
|
|
|
|
If your program only runs on Windows 2000 or later, use ChangeServiceConfig2 with the SERVICE_CONFIG_DESCRIPTION if the service is already installed.
Otherwise, you will need to edit/add a registry entry under your service.
Hive = HKEY_LOCAL_MACHINE
Key = SYSTEM\CurrentControlSet\Services\<servicename>
Value = Description
Type = REG_SZ
Supply the text you want for the descripiton.
|
|
|
|
|