Click here to Skip to main content
15,925,255 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IntelliSense forgetting things? Pin
Nitron20-Dec-02 4:21
Nitron20-Dec-02 4:21 
GeneralRe: IntelliSense forgetting things? Pin
S O S20-Dec-02 5:03
S O S20-Dec-02 5:03 
AnswerRe: IntelliSense forgetting things? Pin
Gary R. Wheeler22-Dec-02 5:46
Gary R. Wheeler22-Dec-02 5:46 
GeneralPrinter Driver Pin
tanis20-Dec-02 3:05
tanis20-Dec-02 3:05 
GeneralRe: Printer Driver Pin
Michael P Butler20-Dec-02 3:14
Michael P Butler20-Dec-02 3:14 
GeneralRe: Printer Driver Pin
tanis20-Dec-02 3:21
tanis20-Dec-02 3:21 
GeneralRe: Printer Driver Pin
Gary R. Wheeler22-Dec-02 5:53
Gary R. Wheeler22-Dec-02 5:53 
GeneralCALLBACK function not being called Pin
king_of_the_world20-Dec-02 2:59
king_of_the_world20-Dec-02 2:59 
hello, i have a callback MouseProc function that's not being called, what's wrong? thanks
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam){
ofstream output1("debug.txt",ios::out);
output1.write("hello",strlen("hello"));
output1.close();
return -1;

}
HOOKPROC hookproc = (HOOKPROC)GetProcAddress(hInstance, "MouseProc");
SetWindowsHookEx(WH_MOUSE, hookproc,hInstance,GetCurrentThreadId());

the following is the main function in detail:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int Cmd) {

MSG msg;

// Setup and register the window class;

WNDCLASS wClass;
wClass.style =CS_HREDRAW|CS_VREDRAW;
wClass.lpfnWndProc =WindowProcedure; // callback-function;
wClass.cbClsExtra =0;
wClass.cbWndExtra =0;
wClass.hInstance =hInstance;
wClass.hIcon =LoadIcon(hInstance,IDI_APPLICATION);
wClass.hCursor =LoadCursor(NULL,IDC_ARROW);
wClass.hbrBackground =(HBRUSH)(COLOR_WINDOW+3);
wClass.lpszMenuName =NULL;
wClass.lpszClassName =WINDOWNAME;

RegisterClass(&wClass);


// Create the window and store the handle;

hWnd = CreateWindow(WINDOWNAME, // class name;
WINDOWNAME, // window name;
WS_OVERLAPPEDWINDOW, // window style;
CW_USEDEFAULT, CW_USEDEFAULT, // starting position (x,y);
320, 240, // width and height;
NULL, // parent handle;
NULL, // menu handle;
hInstance, // instance handle;
NULL); // other parameters;


// Check if window creation failed; otherwise show and update;

if(hWnd==NULL) return FALSE;
else {

ShowWindow (hWnd, Cmd);
UpdateWindow(hWnd);
//HWND prevWind=SetCapture(hWnd);
//cerr<<"previous window is "<
GeneralRe: CALLBACK function not being called Pin
Rage20-Dec-02 3:22
professionalRage20-Dec-02 3:22 
GeneralRe: CALLBACK function not being called Pin
king_of_the_world20-Dec-02 12:02
king_of_the_world20-Dec-02 12:02 
GeneralGetting Print Dialog colour settings and resetting DIB pallette Pin
Anonymous20-Dec-02 2:55
Anonymous20-Dec-02 2:55 
Generalifstream not found in <iostream> Pin
king_of_the_world20-Dec-02 2:34
king_of_the_world20-Dec-02 2:34 
GeneralRe: ifstream not found in <iostream> Pin
king_of_the_world20-Dec-02 2:36
king_of_the_world20-Dec-02 2:36 
GeneralRe: ifstream not found in <iostream> Pin
Rage20-Dec-02 2:54
professionalRage20-Dec-02 2:54 
GeneralRe: ifstream not found in <iostream> Pin
king_of_the_world20-Dec-02 3:01
king_of_the_world20-Dec-02 3:01 
GeneralRe: ifstream not found in <iostream> Pin
Tim Smith20-Dec-02 3:42
Tim Smith20-Dec-02 3:42 
GeneralRe: ifstream not found in <iostream> Pin
Jeff J20-Dec-02 10:28
Jeff J20-Dec-02 10:28 
GeneralLock an Object of CWnd (MFC) Pin
Alex H 198320-Dec-02 1:30
Alex H 198320-Dec-02 1:30 
GeneralRe: Lock an Object of CWnd (MFC) Pin
Joaquín M López Muñoz20-Dec-02 3:37
Joaquín M López Muñoz20-Dec-02 3:37 
Generaldialog app Pin
Raphael Kindt20-Dec-02 1:05
Raphael Kindt20-Dec-02 1:05 
GeneralRe: dialog app Pin
Rage20-Dec-02 1:26
professionalRage20-Dec-02 1:26 
GeneralRe: dialog app Pin
Raphael Kindt20-Dec-02 1:36
Raphael Kindt20-Dec-02 1:36 
GeneralRe: dialog app Pin
Rage20-Dec-02 2:18
professionalRage20-Dec-02 2:18 
GeneralRe: dialog app Pin
Raphael Kindt20-Dec-02 2:30
Raphael Kindt20-Dec-02 2:30 
GeneralGet info from DLL Pin
3EN20-Dec-02 1:01
suss3EN20-Dec-02 1:01 

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.