Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with loading resources at runtime Pin
-Dy21-Jun-02 4:10
-Dy21-Jun-02 4:10 
GeneralRe: Problem with loading resources at runtime Pin
Atlantys21-Jun-02 12:48
Atlantys21-Jun-02 12:48 
GeneralOutlook Add-in Pin
20-Jun-02 4:16
suss20-Jun-02 4:16 
QuestionHow do i get the vertical and horizontal resolution of the screen? Pin
redeemer20-Jun-02 4:03
redeemer20-Jun-02 4:03 
AnswerRe: How do i get the vertical and horizontal resolution of the screen? Pin
Chris Losinger20-Jun-02 4:19
professionalChris Losinger20-Jun-02 4:19 
AnswerRe: How do i get the vertical and horizontal resolution of the screen? Pin
Niklas L20-Jun-02 4:19
Niklas L20-Jun-02 4:19 
GeneralRe: How do i get the vertical and horizontal resolution of the screen? Pin
Marc Richarme20-Jun-02 6:07
Marc Richarme20-Jun-02 6:07 
GeneralAny way to intercept WM_SIZING with SDI/MDI application Pin
aldeba20-Jun-02 2:59
aldeba20-Jun-02 2:59 
I need to restrict the resizing of the SDI application.
I tried the method found in
http://www.codeproject.com/useritems/mdibackgroundimage.asp
to hook on to WM_SIZING and it worked.
But i was wondering whether there was any other way, any msg i could overload?
tried all the PreTranslateMessage and ProcessMessageFilter message map, but it did'nt work.

This is a slightly modified one from winamp plugin.
very slightly. i just wanted

C#
WNDPROC pfnOldWndProc;

// new one

LRESULT CALLBACK pfnNewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam,LPARAM lParam)
{
	CRect rect;

	switch (uMsg)	{
	case WM_SIZING :
		if ((wParam==WMSZ_BOTTOMLEFT) || (wParam==WMSZ_BOTTOMRIGHT))
			wParam=WMSZ_BOTTOM;
		else if ((wParam==WMSZ_TOPLEFT) || (wParam==WMSZ_TOPRIGHT))
			wParam=WMSZ_TOP;
		GetWindowRect(hwnd,rect);
		((RECT*)lParam)->left= rect.left;
		((RECT*)lParam)->right = rect.right;
		break;
	}
	return CallWindowProc(pfnOldWndProc, hwnd, uMsg, wParam, lParam);

}


and in InitInstance()
C#
HWND hMain = GetActiveWindow();
pfnOldWndProc = (WNDPROC)GetWindowLong(hMain, GWL_WNDPROC);
SetWindowLong(hMain, GWL_WNDPROC, (long)pfnNewWndProc);

GeneralRe: Any way to intercept WM_SIZING with SDI/MDI application Pin
Christian Graus20-Jun-02 3:06
protectorChristian Graus20-Jun-02 3:06 
GeneralRe: Any way to intercept WM_SIZING with SDI/MDI application Pin
S.Maharajan20-Jun-02 3:26
S.Maharajan20-Jun-02 3:26 
GeneralMain Window handle Pin
vikramlinux20-Jun-02 2:48
vikramlinux20-Jun-02 2:48 
Generalapplication window handle. Pin
vikramlinux20-Jun-02 2:47
vikramlinux20-Jun-02 2:47 
GeneralAny documentation on how VC++ treats JPEG Pin
Sutanu20-Jun-02 1:42
Sutanu20-Jun-02 1:42 
GeneralRe: Any documentation on how VC++ treats JPEG Pin
Chris Losinger20-Jun-02 2:33
professionalChris Losinger20-Jun-02 2:33 
Questionwhy II can't use ActiveMoview (ocx) for playing mp3? Pin
white jungle20-Jun-02 1:30
white jungle20-Jun-02 1:30 
GeneralVB macros in VC++ Pin
20-Jun-02 1:30
suss20-Jun-02 1:30 
GeneralRe: VB macros in VC++ Pin
Niklas L20-Jun-02 1:38
Niklas L20-Jun-02 1:38 
QuestionHow can I get the amount of pixels horizontally scrolled by CRichEditCtrl? Pin
Miguel Fonseca20-Jun-02 1:19
Miguel Fonseca20-Jun-02 1:19 
GeneralMemory Question.... Pin
Christian Graus20-Jun-02 1:16
protectorChristian Graus20-Jun-02 1:16 
GeneralRe: Memory Question.... Pin
Niklas L20-Jun-02 1:30
Niklas L20-Jun-02 1:30 
GeneralRe: Memory Question.... Pin
Christian Graus20-Jun-02 1:38
protectorChristian Graus20-Jun-02 1:38 
GeneralRe: Memory Question.... Pin
Niklas L20-Jun-02 1:42
Niklas L20-Jun-02 1:42 
GeneralRe: Memory Question.... Pin
jbarton20-Jun-02 10:47
jbarton20-Jun-02 10:47 
GeneralIGPEInformation and IGroupPolicyObject Pin
Andreas Saurwein20-Jun-02 1:05
Andreas Saurwein20-Jun-02 1:05 
GeneralFtpGetFile Pin
Brian Azzopardi20-Jun-02 0:29
Brian Azzopardi20-Jun-02 0:29 

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.