Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to minimize an application using CPropertySheet to the systray Pin
Jon Hulatt12-Feb-02 4:10
Jon Hulatt12-Feb-02 4:10 
AnswerRe: How to minimize an application using CPropertySheet to the systray Pin
Nish Nishant11-Feb-02 21:46
sitebuilderNish Nishant11-Feb-02 21:46 
GeneralRe: How to minimize an application using CPropertySheet to the systray Pin
12-Feb-02 0:54
suss12-Feb-02 0:54 
GeneralRe: How to minimize an application using CPropertySheet to the systray Pin
Kashif Manzoor12-Feb-02 1:12
Kashif Manzoor12-Feb-02 1:12 
GeneralRe: How to minimize an application using CPropertySheet to the systray Pin
12-Feb-02 2:04
suss12-Feb-02 2:04 
GeneralRe: How to minimize an application using CPropertySheet to the systray Pin
Kashif Manzoor12-Feb-02 1:20
Kashif Manzoor12-Feb-02 1:20 
QuestionHow to change CDialog class name? Pin
CKLam11-Feb-02 21:28
CKLam11-Feb-02 21:28 
AnswerRe: How to change CDialog class name? Pin
Christian Graus11-Feb-02 21:32
protectorChristian Graus11-Feb-02 21:32 
Add the following to your PrecreateWindow function:

// Remove 'Untitled' from caption
cs.style &= ~(LONG) FWS_ADDTOTITLE;

if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;

if (NULL == m_winClassName)
{
m_winClassName = RegisterSimilarClass("MyClassName", cs.lpszClass, IDR_MAINFRAME);

if (!m_winClassName)
return FALSE;
}

cs.lpszClass = m_winClassName;

and add the RegisterSimilarClass function as follows:

static LPCSTR RegisterSimilarClass(LPCSTR lpszNewClassName,
LPCSTR lpszOldClassName, UINT nIDResource)
{
// Get class info for old class.
//
HINSTANCE hInst = AfxGetInstanceHandle();
WNDCLASS wc;
if (!::GetClassInfo(hInst, lpszOldClassName, &wc)) {
TRACE("Can't find window class %s\n", lpszOldClassName);
return NULL;
}

// Register new class with same info, but different name and icon.
//
wc.lpszClassName = lpszNewClassName;
wc.hIcon = ::LoadIcon(hInst, MAKEINTRESOURCE(nIDResource));
if (!AfxRegisterClass(&wc)) {
TRACE("Unable to register window class%s\n", lpszNewClassName);
return NULL;
}
return lpszNewClassName;
}

Replace IDR_MAINFRAME with the ID of your dialog. This *should* work, I've done it in a doc/view app, and the code is off MSDN, it's by Paul De Lascia.



Christian

I have come to clean zee pooollll. - Michael Martin Dec 30, 2001

Picture the daffodil. And while you do that, I'll be over here going through your stuff.

GeneralRe: How to change CDialog class name? Pin
CKLam11-Feb-02 22:10
CKLam11-Feb-02 22:10 
AnswerRe: How to change CDialog class name? Pin
Joaquín M López Muñoz11-Feb-02 23:34
Joaquín M López Muñoz11-Feb-02 23:34 
GeneralRe: How to change CDialog class name? Pin
CKLam12-Feb-02 0:55
CKLam12-Feb-02 0:55 
GeneralModeless Dialogboxes Pin
Li Mu Bai11-Feb-02 21:21
Li Mu Bai11-Feb-02 21:21 
GeneralRe: Modeless Dialogboxes Pin
Christian Graus11-Feb-02 21:20
protectorChristian Graus11-Feb-02 21:20 
GeneralRe: Modeless Dialogboxes Pin
Joaquín M López Muñoz11-Feb-02 21:26
Joaquín M López Muñoz11-Feb-02 21:26 
GeneralRe: Modeless Dialogboxes Pin
Li Mu Bai11-Feb-02 21:30
Li Mu Bai11-Feb-02 21:30 
GeneralRe: Modeless Dialogboxes Pin
Christian Graus11-Feb-02 21:29
protectorChristian Graus11-Feb-02 21:29 
GeneralDatabase Pin
vin11-Feb-02 20:49
vin11-Feb-02 20:49 
GeneralRe: Database Pin
Mazdak11-Feb-02 21:07
Mazdak11-Feb-02 21:07 
GeneralRe: Database Pin
vin11-Feb-02 21:16
vin11-Feb-02 21:16 
GeneralCTreeView & CListView Pin
alex.barylski11-Feb-02 19:30
alex.barylski11-Feb-02 19:30 
GeneralRe: CTreeView & CListView Pin
Joaquín M López Muñoz11-Feb-02 21:48
Joaquín M López Muñoz11-Feb-02 21:48 
GeneralRe: CTreeView & CListView Pin
alex.barylski12-Feb-02 9:02
alex.barylski12-Feb-02 9:02 
GeneralManaged C++ Type Independant List Pin
Steve Severance11-Feb-02 19:12
Steve Severance11-Feb-02 19:12 
GeneralLooking for a vector graphics library... Pin
11-Feb-02 19:05
suss11-Feb-02 19:05 
GeneralRe: Looking for a vector graphics library... Pin
Rick York11-Feb-02 19:27
mveRick York11-Feb-02 19:27 

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.