Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to calculate the Bandwidth of our computer Pin
Selvam R2-Nov-04 2:56
professionalSelvam R2-Nov-04 2:56 
AnswerRe: How to calculate the Bandwidth of our computer Pin
ThatsAlok3-Nov-04 17:57
ThatsAlok3-Nov-04 17:57 
QuestionWhat is the defference about _T("abc") and "abc"? Pin
freehawk1-Nov-04 23:41
freehawk1-Nov-04 23:41 
AnswerRe: What is the defference about _T("abc") and "abc"? Pin
Pharago1-Nov-04 23:57
Pharago1-Nov-04 23:57 
AnswerRe: What is the defference about _T("abc") and "abc"? Pin
RChin2-Nov-04 0:13
RChin2-Nov-04 0:13 
GeneralCreating 16 color bitmap from DC Pin
Vinaya1-Nov-04 23:03
Vinaya1-Nov-04 23:03 
QuestionHow can I change a menu item when I click? Pin
lillah1-Nov-04 22:58
lillah1-Nov-04 22:58 
AnswerRe: How can I change a menu item when I click? [Modified] Pin
Antony M Kancidrowski2-Nov-04 1:32
Antony M Kancidrowski2-Nov-04 1:32 
GeneralactiveX Pin
hou_1261-Nov-04 22:48
hou_1261-Nov-04 22:48 
GeneralSystem tray colors Pin
Anonymous1-Nov-04 21:52
Anonymous1-Nov-04 21:52 
GeneralRe: System tray colors Pin
RChin1-Nov-04 22:19
RChin1-Nov-04 22:19 
GeneralRe: System tray colors Pin
Selvam R2-Nov-04 2:40
professionalSelvam R2-Nov-04 2:40 
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 

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.