Click here to Skip to main content
15,892,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: System tray colors Pin
ThatsAlok3-Nov-04 17:59
ThatsAlok3-Nov-04 17:59 
QuestionHow to define an array of the object in class Pin
Cramp1-Nov-04 21:48
Cramp1-Nov-04 21:48 
AnswerRe: How to define an array of the object in class Pin
Cedric Moonen1-Nov-04 21:55
Cedric Moonen1-Nov-04 21:55 
AnswerRe: How to define an array of the object in class Pin
Maximilien2-Nov-04 2:42
Maximilien2-Nov-04 2:42 
GeneralThumbnail view and Drag and Drop Pin
phieu1-Nov-04 21:36
phieu1-Nov-04 21:36 
GeneralRe: Thumbnail view and Drag and Drop Pin
Selvam R2-Nov-04 2:45
professionalSelvam R2-Nov-04 2:45 
GeneralEnable Combo Pin
balajeedurai1-Nov-04 21:17
balajeedurai1-Nov-04 21:17 
QuestionSDI Main Frame positioning? Pin
kriaz1-Nov-04 19:21
kriaz1-Nov-04 19:21 
I want my SDI application to have always the same size and position on screen.
Resizing and Moving is disabled by the code below; which is inserted in OnCreate of main frame

CMenu* pTopMenu = GetSystemMenu(FALSE);
if(pTopMenu != NULL)
{
pTopMenu -> RemoveMenu(SC_SIZE, MF_BYCOMMAND); //No ReSize
pTopMenu -> RemoveMenu(SC_MOVE, MF_BYCOMMAND); //No Move
}

for Resize and move above code works fine!


BUT for size let us look at PreCreatewindow of Mainframe


BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs

cs.style &= ~FWS_ADDTOTITLE;

cs.x = 0;
cs.y = 77;

cs.cx = 1000;
cs.cy = 500;



return TRUE;
}

the above code didn't work; if i change one value in the structure the other is automatically changed/ignored, gives unexpected positioning. May be some sort of aspect ratio problem which windows might be maintaining internally.

Another soloution is to use Move in the initinstance but i want to avoid it since it first shows main frame at the 0,0 position and then moves it to required postion, with a slight but observable delay.

Please help to solve the above problem.
QuestionHow to retrieve public folders list in an exchange server Pin
lavanm1-Nov-04 18:45
lavanm1-Nov-04 18:45 
QuestionHow to create Web Interface using MFC Program Pin
pubududilena1-Nov-04 18:16
pubududilena1-Nov-04 18:16 
AnswerRe: How to create Web Interface using MFC Program Pin
alex.barylski1-Nov-04 20:00
alex.barylski1-Nov-04 20:00 
AnswerRe: How to create Web Interface using MFC Program Pin
Michael P Butler1-Nov-04 23:54
Michael P Butler1-Nov-04 23:54 
GeneralGDIPlus cast *Image to Bitmap Pin
Nicholas Cardi1-Nov-04 17:12
Nicholas Cardi1-Nov-04 17:12 
Questionhow to get char (or) string from comport Pin
vc-programmer-1-Nov-04 16:43
vc-programmer-1-Nov-04 16:43 
AnswerRe: how to get char (or) string from comport Pin
jan larsen2-Nov-04 0:49
jan larsen2-Nov-04 0:49 
GeneralCreating an array of classes... Pin
viru_lent1-Nov-04 13:51
viru_lent1-Nov-04 13:51 
GeneralRe: Creating an array of classes... Pin
GDavy2-Nov-04 1:48
GDavy2-Nov-04 1:48 
GeneralRe: Creating an array of classes... Pin
viru_lent2-Nov-04 4:21
viru_lent2-Nov-04 4:21 
General? about wav files Pin
tom_dx1-Nov-04 13:42
tom_dx1-Nov-04 13:42 
GeneralRe: ? about wav files Pin
KRowe1-Nov-04 16:56
KRowe1-Nov-04 16:56 
GeneralGetting the size of a block of code Pin
Xzyx987X1-Nov-04 12:34
Xzyx987X1-Nov-04 12:34 
GeneralRe: Getting the size of a block of code Pin
Andrew Walker1-Nov-04 15:21
Andrew Walker1-Nov-04 15:21 
GeneralRe: Getting the size of a block of code Pin
Xzyx987X1-Nov-04 21:44
Xzyx987X1-Nov-04 21:44 
GeneralRe: Getting the size of a block of code Pin
jan larsen2-Nov-04 0:57
jan larsen2-Nov-04 0:57 
GeneralRe: Getting the size of a block of code Pin
Maximilien2-Nov-04 2:47
Maximilien2-Nov-04 2:47 

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.