Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Enum structure variables!! Pin
Hamed Musavi24-Feb-06 5:25
Hamed Musavi24-Feb-06 5:25 
GeneralRe: Enum structure variables!! Pin
toxcct24-Feb-06 5:31
toxcct24-Feb-06 5:31 
GeneralRe: Enum structure variables!! Pin
Hamed Musavi24-Feb-06 5:35
Hamed Musavi24-Feb-06 5:35 
AnswerRe: Enum structure variables!! Pin
Maximilien24-Feb-06 5:15
Maximilien24-Feb-06 5:15 
AnswerRe: Enum structure variables!! Pin
ThatsAlok26-Feb-06 21:13
ThatsAlok26-Feb-06 21:13 
GeneralRe: Enum structure variables!! Pin
Hamed Musavi27-Feb-06 21:19
Hamed Musavi27-Feb-06 21:19 
QuestionCListCtrl Pin
Hamid_RT24-Feb-06 2:58
Hamid_RT24-Feb-06 2:58 
AnswerRe: CListCtrl Pin
David Crow24-Feb-06 3:03
David Crow24-Feb-06 3:03 
GeneralRe: CListCtrl Pin
Hamid_RT24-Feb-06 3:09
Hamid_RT24-Feb-06 3:09 
AnswerRe: CListCtrl Pin
James R. Twine24-Feb-06 3:09
James R. Twine24-Feb-06 3:09 
QuestionIOCP - when a socket is closed ? Pin
yani dzhurov24-Feb-06 2:41
yani dzhurov24-Feb-06 2:41 
AnswerRe: IOCP - when a socket is closed ? Pin
James R. Twine24-Feb-06 3:02
James R. Twine24-Feb-06 3:02 
GeneralRe: IOCP - when a socket is closed ? Pin
yani dzhurov24-Feb-06 3:39
yani dzhurov24-Feb-06 3:39 
GeneralRe: IOCP - when a socket is closed ? Pin
James R. Twine24-Feb-06 4:47
James R. Twine24-Feb-06 4:47 
GeneralRe: IOCP - when a socket is closed ? Pin
George Nistor1-Aug-09 22:11
George Nistor1-Aug-09 22:11 
QuestionResizing windows Pin
Waldermort24-Feb-06 2:30
Waldermort24-Feb-06 2:30 
AnswerRe: Resizing windows Pin
David Crow24-Feb-06 2:54
David Crow24-Feb-06 2:54 
waldermort wrote:
Why is MFC forced upon us?


It's not. That's what the developers themselves have chosen to use, hence the count of MFC examples likely outnumbers the count of Win32 examples.

I have an MFC example of this here. It uses GetClientRect(), GetWindowRect(), ScreenToClient(), OffsetRect(), and MoveWindow().

waldermort wrote:
GetWindowRect(hwnd,&rNewMain); // store the origional size // prevent resizing less than this


Call GetClientRect() in response to the WM_INITDIALOG message.

waldermort wrote:
// set the smallest size bool resize = false; if (width < minW) { resize = true; width = minW; } if (height < minH) { resize = true; height = minH; } if (resize) { SetWindowPos(hwnd,NULL,0,0,width,height,SWP_NOZORDER | SWP_NOMOVE); return; }


You'll also want to handle the WM_GETMINMAXINFO message. Here is where you'd take care of the dialog's minimum size.


"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

"There is no death, only a change of worlds." - Native American Proverb


GeneralRe: Resizing windows Pin
Waldermort24-Feb-06 3:47
Waldermort24-Feb-06 3:47 
GeneralRe: Resizing windows Pin
Blake Miller24-Feb-06 6:20
Blake Miller24-Feb-06 6:20 
AnswerRe: Resizing windows Pin
Waldermort24-Feb-06 5:01
Waldermort24-Feb-06 5:01 
GeneralRe: Resizing windows Pin
Blake Miller24-Feb-06 6:23
Blake Miller24-Feb-06 6:23 
GeneralRe: Resizing windows Pin
David Crow24-Feb-06 6:24
David Crow24-Feb-06 6:24 
Questionabout UNICODE Pin
HOW WHAT24-Feb-06 2:02
HOW WHAT24-Feb-06 2:02 
AnswerRe: about UNICODE Pin
toxcct24-Feb-06 2:15
toxcct24-Feb-06 2:15 
AnswerRe: about UNICODE Pin
PJ Arends24-Feb-06 2:35
professionalPJ Arends24-Feb-06 2:35 

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.