Click here to Skip to main content
16,006,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to change width of a combo box at run time Pin
Ștefan-Mihai MOGA21-Jun-08 4:23
professionalȘtefan-Mihai MOGA21-Jun-08 4:23 
QuestionCTreeCtrl image set issue Pin
Abyss20-Jun-08 22:16
Abyss20-Jun-08 22:16 
QuestionDecompressing NTFS Compressed RAW Data Pin
Member 147600120-Jun-08 20:30
Member 147600120-Jun-08 20:30 
QuestionAbout position of AfxMessageBox OK button Pin
Mushtaque Nizamani20-Jun-08 18:55
Mushtaque Nizamani20-Jun-08 18:55 
AnswerRe: About position of AfxMessageBox OK button Pin
zafersavas20-Jun-08 19:28
zafersavas20-Jun-08 19:28 
AnswerRe: About position of AfxMessageBox OK button Pin
Ștefan-Mihai MOGA21-Jun-08 10:43
professionalȘtefan-Mihai MOGA21-Jun-08 10:43 
GeneralDisable Minimize and Maximize Box Pin
cb0206120-Jun-08 16:49
cb0206120-Jun-08 16:49 
GeneralRe: Disable Minimize and Maximize Box Pin
Jagdish V. Bhimbha20-Jun-08 19:13
Jagdish V. Bhimbha20-Jun-08 19:13 
Hi,

The CWnd::OnCreate() method is used to create a window and it is usually meant to do this using its default configured features. Therefore, anything you want to display on the frame when the application displays, you can do so when creating the application. Therefore, the frame is typically used to create and display the toolbar(s), dialog bar(s), and status bar.

After the frame has been created, if you want to modified something on it, you can do so after it has been created but before it is displayed to the user. To do this, you can use the PreCreateWindow() method of the CWnd class.
Its syntax is:
virtual void PreCreateWindow(CREATESTRUCT& cs);

This method takes a reference to CREATESTRUCT class, modifies and returns it with the new characteristics. For example, you can use this method to remove the Minimize and the Maximize system buttons on the title bar as follows:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	cs.style &= ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX);
	return CFrameWnd::PreCreateWindow(cs);
}



Hope this help you..!

Good Luck..Rose | [Rose]

Rose | [Rose] Jagdish Bhimbha
S/W Developer Blush | :O

GeneralRe: Disable Minimize and Maximize Box Pin
cb0206122-Jun-08 14:54
cb0206122-Jun-08 14:54 
GeneralRe: Disable Minimize and Maximize Box Pin
Jagdish V. Bhimbha22-Jun-08 20:28
Jagdish V. Bhimbha22-Jun-08 20:28 
GeneralRe: Disable Minimize and Maximize Box Pin
Christian Kleinheinz26-Jan-09 12:26
Christian Kleinheinz26-Jan-09 12:26 
QuestionEditing boot.ini programatically Pin
Sameer Naik20-Jun-08 4:45
Sameer Naik20-Jun-08 4:45 
AnswerRe: Editing boot.ini programatically Pin
Randor 20-Jun-08 5:07
professional Randor 20-Jun-08 5:07 
AnswerRe: Editing boot.ini programatically [modified] Pin
Saurabh.Garg20-Jun-08 5:10
Saurabh.Garg20-Jun-08 5:10 
GeneralRe: Editing boot.ini programatically Pin
Sameer Naik20-Jun-08 19:41
Sameer Naik20-Jun-08 19:41 
GeneralRe: Editing boot.ini programatically Pin
Saurabh.Garg20-Jun-08 23:05
Saurabh.Garg20-Jun-08 23:05 
Questionhow to obtain data from other member function? Pin
gentleguy20-Jun-08 3:02
gentleguy20-Jun-08 3:02 
AnswerRe: how to obtain data from other member function? Pin
Cedric Moonen20-Jun-08 3:07
Cedric Moonen20-Jun-08 3:07 
GeneralRe: how to obtain data from other member function? Pin
gentleguy20-Jun-08 3:11
gentleguy20-Jun-08 3:11 
GeneralRe: how to obtain data from other member function? Pin
David Crow20-Jun-08 3:13
David Crow20-Jun-08 3:13 
GeneralRe: how to obtain data from other member function? Pin
gentleguy20-Jun-08 3:16
gentleguy20-Jun-08 3:16 
GeneralRe: how to obtain data from other member function? Pin
David Crow20-Jun-08 3:23
David Crow20-Jun-08 3:23 
GeneralRe: how to obtain data from other member function? Pin
Cedric Moonen20-Jun-08 3:16
Cedric Moonen20-Jun-08 3:16 
JokeRe: how to obtain data from other member function? Pin
Nelek20-Jun-08 4:05
protectorNelek20-Jun-08 4:05 
AnswerRe: how to obtain data from other member function? Pin
CPallini20-Jun-08 3:09
mveCPallini20-Jun-08 3:09 

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.