Click here to Skip to main content
15,891,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Windows TCP Socket keepAliveTime Pin
Moak6-Oct-06 3:55
Moak6-Oct-06 3:55 
QuestionDetect and close all running applications? Pin
gydong2211-Jul-06 11:53
gydong2211-Jul-06 11:53 
AnswerRe: Detect and close all running applications? Pin
PJ Arends11-Jul-06 15:46
professionalPJ Arends11-Jul-06 15:46 
QuestionProblems with WFC library Pin
Star_dust11-Jul-06 11:27
Star_dust11-Jul-06 11:27 
AnswerRe: Problems with WFC library Pin
Justin Tay11-Jul-06 11:34
Justin Tay11-Jul-06 11:34 
GeneralRe: Problems with WFC library Pin
Star_dust11-Jul-06 11:50
Star_dust11-Jul-06 11:50 
GeneralRe: Problems with WFC library Pin
Justin Tay11-Jul-06 20:01
Justin Tay11-Jul-06 20:01 
QuestionHow to create a window with a thin border?! I can't believe this isn't working any more! [modified] Pin
Axonn Echysttas11-Jul-06 11:13
Axonn Echysttas11-Jul-06 11:13 
Hi everybody. Long time no messaging. I got an easy question. How can you make a window with a thin (2D) border? BECAUSE I DID THIS IN THE PAST! Less than 3 weeks ago! And now I can't do it any more. It's incredible! I'm totally frustrated! I tried combining so many flags that I think I went through all the possible combinations except the right one.

Take for example this simple way to create a window in a standard Win32 application. This shoud create that 2D window but it's still 3D!!! I remember that in the past when I removed that WS_THICKFRAME attribute, it looked 2D. But it isn't working any more. Aaaaaaaaargh!!!!!

<br />
LRESULT CALLBACK WindowEngine (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
	return DefWindowProc(hwnd, uMsg, wParam, lParam); //If there is no registered Smart Window found, calling default procedure.<br />
}<br />
<br />
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)<br />
{<br />
 	MSG Msg;<br />
	WNDCLASSEX wceData; //Used to create the Window Class.<br />
	HWND a;<br />
<br />
	wceData.cbSize = sizeof(wceData);<br />
	wceData.style = 0;<br />
	wceData.lpfnWndProc = WindowEngine;<br />
	wceData.cbClsExtra = NULL;<br />
	wceData.cbWndExtra = NULL;<br />
	wceData.hInstance = hInstance;<br />
	wceData.hIcon = NULL;<br />
	wceData.hCursor = LoadCursor(NULL, IDC_ARROW);<br />
	wceData.hbrBackground = NULL;<br />
	wceData.lpszMenuName = NULL;<br />
	wceData.lpszClassName = "testClass";<br />
	wceData.hIconSm = NULL;<br />
	RegisterClassEx(&wceData);<br />
<br />
	a = CreateWindowEx<br />
	(<br />
		NULL,<br />
		"testClass",<br />
		"Some title",<br />
		WS_OVERLAPPEDWINDOW &~ WS_THICKFRAME,<br />
		10,<br />
		10,<br />
		100,<br />
		200,<br />
		NULL,<br />
		NULL,<br />
		NULL,<br />
		NULL<br />
	);<br />
<br />
	ShowWindow(a, 1);<br />
<br />
	while(GetMessage(&Msg, NULL, 0, 0) > 0)<br />
	{<br />
		TranslateMessage(&Msg);<br />
		DispatchMessage(&Msg);<br />
	}<br />
	return 0;<br />
}<br />


-= E C H Y S T T A S =-
The Greater Mind Balance

Blending C++ with COM ^

-- modified at 17:14 Tuesday 11th July, 2006
GeneralRe: How to create a window with a thin border?! I can't believe this isn't working any more! Pin
User 171649211-Jul-06 13:19
professionalUser 171649211-Jul-06 13:19 
GeneralRe: How to create a window with a thin border?! I can't believe this isn't working any more! Pin
Axonn Echysttas11-Jul-06 20:09
Axonn Echysttas11-Jul-06 20:09 
QuestionUser Input revisted [modified] Pin
Harold_Wishes11-Jul-06 10:51
Harold_Wishes11-Jul-06 10:51 
AnswerRe: User Input revisted Pin
Zac Howland11-Jul-06 11:09
Zac Howland11-Jul-06 11:09 
GeneralRe: User Input revisted Pin
Harold_Wishes11-Jul-06 12:27
Harold_Wishes11-Jul-06 12:27 
GeneralRe: User Input revisted Pin
Zac Howland11-Jul-06 14:16
Zac Howland11-Jul-06 14:16 
AnswerRe: User Input revisted [modified] Pin
earl11-Jul-06 13:13
earl11-Jul-06 13:13 
GeneralRe: User Input revisted Pin
Zac Howland11-Jul-06 14:14
Zac Howland11-Jul-06 14:14 
QuestionHow to extract data from webbrowser controle in visual c++ 6? Pin
method00711-Jul-06 9:44
method00711-Jul-06 9:44 
AnswerRe: How to extract data from webbrowser controle in visual c++ 6? Pin
David Crow11-Jul-06 10:10
David Crow11-Jul-06 10:10 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
method00711-Jul-06 10:14
method00711-Jul-06 10:14 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
David Crow11-Jul-06 10:26
David Crow11-Jul-06 10:26 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
method00711-Jul-06 10:47
method00711-Jul-06 10:47 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
David Crow11-Jul-06 10:56
David Crow11-Jul-06 10:56 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? [modified] Pin
method00711-Jul-06 11:01
method00711-Jul-06 11:01 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
Maximilien11-Jul-06 16:04
Maximilien11-Jul-06 16:04 
GeneralRe: How to extract data from webbrowser controle in visual c++ 6? Pin
David Crow12-Jul-06 2:32
David Crow12-Jul-06 2:32 

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.