Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetup Project Pin
Marcus Spitzmiller29-Nov-04 16:41
Marcus Spitzmiller29-Nov-04 16:41 
GeneralActiveX question, please help. Pin
Anonymous29-Nov-04 16:03
Anonymous29-Nov-04 16:03 
GeneralRe: ActiveX question, please help. Pin
El'Cachubrey29-Nov-04 20:32
El'Cachubrey29-Nov-04 20:32 
GeneralRe: ActiveX question, please help. Pin
Anonymous1-Dec-04 11:34
Anonymous1-Dec-04 11:34 
QuestionHow to enlarge Bitmap object Pin
lisoft29-Nov-04 15:43
lisoft29-Nov-04 15:43 
AnswerRe: How to enlarge Bitmap object Pin
ThatsAlok29-Nov-04 17:09
ThatsAlok29-Nov-04 17:09 
GeneralCreating custom control in dialog at run time Pin
bohrium29-Nov-04 15:42
bohrium29-Nov-04 15:42 
GeneralRe: Creating custom control in dialog at run time Pin
Iain Clarke, Warrior Programmer30-Nov-04 0:55
Iain Clarke, Warrior Programmer30-Nov-04 0:55 
One way is to place a text control (static) on your dialog. Give it a proper ID number,
and call
m_MyControl.SubclassWindow (this, IDC_XXXXX)<code>.<br />
<br />
Another possibility is...<br />
<br />
<pre>
class CMyDialog : public CDialog
{
    ....
    CMyControl    m_MyControl;
    ....
};

BOOL CMyDialog::OnInitDialog ()
{
    ....
    CWnd *pReplace = GetDlgItem (IDC_XXXX); // Get the placeholder window
    CRect rcReplace;
    pReplace->GetWindowRect (&rcReplace); // not client!
    ScreenToClient (&rcReplace); // Now convert coords to the dialogs coord system.
    m_MyControl.Create ( this, &rcReplace, WS_VISIBLE | WS_ETC, IDC_XXXX); // Exact params depend on the class.
    m_MyControl.SetWindowPos (pReplace, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE); // Put the new control
                                                                           // place in the Tab / Z order.
    pReplace->DestroyWindow ();  // Remove placeholder.
    ....
}
</pre><br />
<br />
You might want a bit of error checking in there too! (ie. what if you forgot to make a IDC_XXXX control),<br />
I normally use IDC_PLACEHOLDER, but the constant name is up to you.<br />
<br />
Good luck,<br />
<br />
Iain.

QuestionHow to get the File System Format Pin
ytod29-Nov-04 15:16
ytod29-Nov-04 15:16 
AnswerRe: How to get the File System Format Pin
ytod29-Nov-04 16:50
ytod29-Nov-04 16:50 
GeneralPlease HELPPP Pin
Chandara29-Nov-04 14:22
Chandara29-Nov-04 14:22 
GeneralRe: Please HELPPP Pin
lisoft29-Nov-04 15:52
lisoft29-Nov-04 15:52 
GeneralRe: Please HELPPP Pin
Chandara29-Nov-04 23:20
Chandara29-Nov-04 23:20 
GeneralRe: Please HELPPP Pin
lisoft30-Nov-04 0:25
lisoft30-Nov-04 0:25 
GeneralGreat:!! Pin
Chandara30-Nov-04 6:12
Chandara30-Nov-04 6:12 
GeneralEvent handling Pin
scandrew29-Nov-04 12:20
scandrew29-Nov-04 12:20 
GeneralRe: Event handling Pin
Rob Catterall30-Nov-04 1:48
Rob Catterall30-Nov-04 1:48 
GeneralRe: Event handling Pin
scandrew30-Nov-04 13:01
scandrew30-Nov-04 13:01 
GeneralCComboBox inactive items Pin
john john mackey29-Nov-04 12:19
john john mackey29-Nov-04 12:19 
GeneralRe: CComboBox inactive items Pin
Iain Clarke, Warrior Programmer29-Nov-04 23:40
Iain Clarke, Warrior Programmer29-Nov-04 23:40 
GeneralProblem tu use fmode function Pin
CHEICKNA TRAORE29-Nov-04 11:42
CHEICKNA TRAORE29-Nov-04 11:42 
QuestionHow to resize controls with flicker-free ? Pin
Cyrus Dang29-Nov-04 11:29
Cyrus Dang29-Nov-04 11:29 
AnswerRe: How to resize controls with flicker-free ? Pin
PJ Arends29-Nov-04 11:45
professionalPJ Arends29-Nov-04 11:45 
GeneralRe: How to resize controls with flicker-free ? Pin
Cyrus Dang29-Nov-04 11:52
Cyrus Dang29-Nov-04 11:52 
AnswerRe: How to resize controls with flicker-free ? Pin
Iain Clarke, Warrior Programmer30-Nov-04 0:16
Iain Clarke, Warrior Programmer30-Nov-04 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.