Click here to Skip to main content
15,915,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General??!!!! Problem with scrolling and big files in MFC Pin
Magnus28-Dec-99 8:52
Magnus28-Dec-99 8:52 
GeneralISupportErorrInfo Pin
Henk27-Dec-99 21:08
Henk27-Dec-99 21:08 
GeneralRE: ISupportErorrInfo Pin
Alex Gorev3-Jan-00 5:46
Alex Gorev3-Jan-00 5:46 
GeneralRegister Class in a Dialog Based Application Pin
Member 81025-Dec-99 3:53
Member 81025-Dec-99 3:53 
GeneralRE: Register Class in a Dialog Based Application Pin
Dmitriy3-Jan-00 4:51
Dmitriy3-Jan-00 4:51 
GeneralRE: RE: Register Class in a Dialog Based Application Pin
Member 8104-Jan-00 23:19
Member 8104-Jan-00 23:19 
GeneralRE: RE: RE: Register Class in a Dialog Based Application Pin
Tom Hunter5-Jan-00 1:28
Tom Hunter5-Jan-00 1:28 
GeneralRE: RE: RE: RE: Register Class in a Dialog Based Application Pin
Member 8106-Jan-00 1:55
Member 8106-Jan-00 1:55 
Hi Tom,

Thank You, That works really fine.

Alejandro Calvo

==================
The original message was:

Hi Alejandro,

Here's how to change the class name in a dialog-based MFC app. There are two things you have to do:
1) register the new class name in InitApplication;
and 2) use the same class name in your .rc dialog template. See below for an example taken from a working MFC app. Good luck!

In your CWinApp file:

BOOL CApp::InitApplication()
{
WNDCLASS wc;
wc.style = CS_DBLCLKS | CS_SAVEBITS | CS_BYTEALIGNWINDOW;
wc.lpfnWndProc = DefDlgProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = DLGWINDOWEXTRA;
wc.hInstance = AfxGetInstanceHandle();
wc.hIcon = LoadIcon(IDR_MAINFRAME);
wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_WINDOW + 1;
wc.lpszMenuName = NULL;
wc.lpszClassName = "MyClass";
::RegisterClass(&wc);
return CWinApp::InitApplication();
}


In your .rc file:

IDD_MY_DIALOG DIALOGEX 0, 0, 292, 167
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "My Excellent Dialog"
MENU IDR_MENU
CLASS "MyClass"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "", IDC_SHEET, "Static", SS_BLACKFRAME, 5,7,234,142
CONTROL "Go", IDC_PROCESS, "Button", BS_OWNERDRAW | WS_DISABLED |
WS_TABSTOP, 248,8,42,20
PUSHBUTTON " Use\nMRU File", IDC_USEMRUFILE, 248,32,42,20, BS_CENTER |
BS_MULTILINE | WS_DISABLED
PUSHBUTTON "Exit",IDC_EXIT,248,128,42,20
LTEXT "Ready", IDC_STATUSBAR, 5,153,284,12, SS_CENTERIMAGE
END


GeneralI need table convert color string to RGB in HTML Pin
Kobe24-Dec-99 7:31
Kobe24-Dec-99 7:31 
QuestionFont size problem ??? Pin
Kobe24-Dec-99 0:10
Kobe24-Dec-99 0:10 
AnswerRE: Font size problem ??? Pin
Alex Gorev3-Jan-00 4:57
Alex Gorev3-Jan-00 4:57 
AnswerRE: Font size problem ??? Pin
Andrei Zenkovitch3-Jan-00 8:15
Andrei Zenkovitch3-Jan-00 8:15 
AnswerRE: Font size problem ??? Pin
Tom Hunter5-Jan-00 1:38
Tom Hunter5-Jan-00 1:38 
GeneralRegisterWindowsMessage Pin
Member 351722-Dec-99 16:05
Member 351722-Dec-99 16:05 
GeneralRE: RegisterWindowsMessage Pin
Sadhu23-Dec-99 2:29
Sadhu23-Dec-99 2:29 
GeneralRE: RegisterWindowsMessage Pin
Mike Dunn24-Dec-99 5:12
Mike Dunn24-Dec-99 5:12 
GeneralWho had focus. Any high level suggestion would be helpful. Pin
Phil McGahan20-Dec-99 15:16
Phil McGahan20-Dec-99 15:16 
GeneralRE: Who had focus. Any high level suggestion would be helpful. Pin
Member 40421-Dec-99 12:33
Member 40421-Dec-99 12:33 
QuestionHow to send data with method POST in cgi ??? Pin
Kobe20-Dec-99 2:23
Kobe20-Dec-99 2:23 
AnswerRE: How to send data with method POST in cgi ??? Pin
Ghazi20-Dec-99 3:59
Ghazi20-Dec-99 3:59 
AnswerRE: How to send data with method POST in cgi ??? Pin
Ghazi20-Dec-99 4:07
Ghazi20-Dec-99 4:07 
GeneralRE: RE: How to send data with method POST in cgi ??? Pin
Kobe20-Dec-99 5:23
Kobe20-Dec-99 5:23 
AnswerRE: How to send data with method POST in cgi ??? Pin
RAJIV25-Dec-99 14:53
RAJIV25-Dec-99 14:53 
QuestionHow to know that file .gif is animated or not ??? Pin
Kobe20-Dec-99 1:46
Kobe20-Dec-99 1:46 
AnswerRE: How to know that file .gif is animated or not ??? Pin
Cristi Posea20-Dec-99 4:46
Cristi Posea20-Dec-99 4:46 

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.