Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GetShortPathName() doesn't Pin
David Crow16-Aug-05 12:25
David Crow16-Aug-05 12:25 
GeneralRe: GetShortPathName() doesn't Pin
dandy7217-Aug-05 2:48
dandy7217-Aug-05 2:48 
GeneralRe: GetShortPathName() doesn't Pin
David Crow17-Aug-05 3:34
David Crow17-Aug-05 3:34 
GeneralRe: GetShortPathName() doesn't Pin
dandy7217-Aug-05 6:11
dandy7217-Aug-05 6:11 
GeneralRe: GetShortPathName() doesn't Pin
Graham Bradshaw16-Aug-05 12:41
Graham Bradshaw16-Aug-05 12:41 
GeneralCPU Intensive App Pin
LighthouseJ16-Aug-05 11:52
LighthouseJ16-Aug-05 11:52 
GeneralRe: CPU Intensive App Pin
David Crow16-Aug-05 12:26
David Crow16-Aug-05 12:26 
GeneralRe: CPU Intensive App Pin
LighthouseJ16-Aug-05 12:39
LighthouseJ16-Aug-05 12:39 
I tried to not put code on here because of it's size, but if it must be done. Here's all I wrote, it creates a simple white window.
#define WIN32_LEAN_AND_MEAN<br />
<br />
#include <windows.h><br />
#include <windowsx.h><br />
<br />
LRESULT CALLBACK MessageHandler (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {<br />
return DefWindowProc (hWnd, Msg, wParam, lParam);<br />
}<br />
<br />
ATOM InitializeWindowClass (HINSTANCE hInstance) {<br />
WNDCLASSEX wndClass;<br />
<br />
wndClass.cbSize = sizeof(WNDCLASSEX);<br />
wndClass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;<br />
wndClass.lpfnWndProc = MessageHandler;<br />
wndClass.cbClsExtra = 0;<br />
wndClass.cbWndExtra = 0;<br />
wndClass.hInstance = hInstance;<br />
wndClass.hIcon = LoadIcon (NULL, IDI_WINLOGO);<br />
wndClass.hCursor = LoadCursor (NULL, IDC_ARROW);<br />
wndClass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);<br />
wndClass.lpszMenuName = NULL;<br />
wndClass.lpszClassName = "Win32 Test";<br />
wndClass.hIconSm	= LoadIcon (NULL, IDI_WINLOGO);<br />
<br />
return RegisterClassEx(&wndClass);<br />
}<br />
<br />
HWND CreateRootWindow (HINSTANCE hInstance) {<br />
HWND hWnd = CreateWindowEx(NULL, <br />
"Win32 Test",<br />
"Sample Window",<br />
WS_POPUP | WS_VISIBLE,<br />
300, 300, 800, 600,<br />
NULL,<br />
NULL,<br />
hInstance,<br />
NULL);<br />
<br />
return hWnd;<br />
}<br />
<br />
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {<br />
LPMSG msg = NULL;<br />
<br />
// initialization stuff goes here<br />
InitializeWindowClass (hInstance);<br />
HWND hWnd = CreateRootWindow (hInstance);<br />
<br />
while (true) {<br />
// check the message queue<br />
if (PeekMessage(msg, NULL, 0, 0, PM_REMOVE)) {<br />
	TranslateMessage(msg);<br />
	DispatchMessage(msg);<br />
}<br />
<br />
// main program logic goes here<br />
}<br />

GeneralRe: CPU Intensive App Pin
Max Santos16-Aug-05 13:09
Max Santos16-Aug-05 13:09 
GeneralRe: CPU Intensive App Pin
LighthouseJ16-Aug-05 13:57
LighthouseJ16-Aug-05 13:57 
GeneralRe: CPU Intensive App Pin
pablo_mag16-Aug-05 13:59
pablo_mag16-Aug-05 13:59 
GeneralRe: CPU Intensive App Pin
LighthouseJ16-Aug-05 14:06
LighthouseJ16-Aug-05 14:06 
GeneralRe: CPU Intensive App Pin
David Crow17-Aug-05 2:28
David Crow17-Aug-05 2:28 
GeneralRe: CPU Intensive App Pin
Blake Miller17-Aug-05 4:29
Blake Miller17-Aug-05 4:29 
Generaldtd to xml Pin
picazo16-Aug-05 11:42
picazo16-Aug-05 11:42 
GeneralRe: dtd to xml Pin
David Crow16-Aug-05 11:49
David Crow16-Aug-05 11:49 
Generalstill need help Pin
picazo16-Aug-05 12:04
picazo16-Aug-05 12:04 
Generalerror in executing Pin
celllllllll16-Aug-05 11:33
celllllllll16-Aug-05 11:33 
GeneralRe: error in executing Pin
David Crow16-Aug-05 11:35
David Crow16-Aug-05 11:35 
GeneralRe: error in executing Pin
celllllllll16-Aug-05 11:41
celllllllll16-Aug-05 11:41 
GeneralRe: error in executing Pin
David Crow16-Aug-05 11:45
David Crow16-Aug-05 11:45 
GeneralRe: error in executing Pin
celllllllll16-Aug-05 12:08
celllllllll16-Aug-05 12:08 
GeneralRe: error in executing Pin
David Crow16-Aug-05 12:17
David Crow16-Aug-05 12:17 
GeneralRe: error in executing Pin
celllllllll16-Aug-05 12:35
celllllllll16-Aug-05 12:35 
GeneralRe: error in executing Pin
ThatsAlok16-Aug-05 19:41
ThatsAlok16-Aug-05 19:41 

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.