Click here to Skip to main content
16,009,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get all MFC MDI child windows Pin
Mark Salsbery28-Sep-07 9:10
Mark Salsbery28-Sep-07 9:10 
GeneralRe: How to get all MFC MDI child windows Pin
Californian228-Sep-07 17:09
Californian228-Sep-07 17:09 
Questionerror LNK2001: unresolved external symbol _pinstX Pin
Calvin Streeting28-Sep-07 8:26
Calvin Streeting28-Sep-07 8:26 
AnswerRe: error LNK2001: unresolved external symbol _pinstX Pin
Karim Mribti28-Sep-07 8:38
Karim Mribti28-Sep-07 8:38 
GeneralRe: error LNK2001: unresolved external symbol _pinstX Pin
Calvin Streeting28-Sep-07 9:03
Calvin Streeting28-Sep-07 9:03 
GeneralRe: error LNK2001: unresolved external symbol _pinstX Pin
Calvin Streeting28-Sep-07 9:54
Calvin Streeting28-Sep-07 9:54 
AnswerRe: error LNK2001: unresolved external symbol _pinstX Pin
David Crow28-Sep-07 10:01
David Crow28-Sep-07 10:01 
QuestionregisterHotKey dont work Pin
jokop28-Sep-07 7:24
jokop28-Sep-07 7:24 
hi all
I want to add a hotkey (shortcut key) s.t. when pressing alt+control+shift+p it would do something
(start ms-word with my private diary I tell my self all sorts of thins there....shhhh...)
I tried to make this shortcut keys from a desktop icon but it seems that it stopped working after a few booting of my computer.

anyway I want to succeed in that method of hot key ive been tring to do a little in c++(no mfc) program to add a hotkey using registerhotkey and the message WM_HOTKEY:
but it dont work for me at all (it seems that the shortcut keys dont activate the message WM_HOTKEY)
any help?
thanks

(ive followed the directions in this article
http://www.codeproject.com/system/nishhotkeys01.asp[^][^]
)

here is the abreviated source code of the little program for a hotkey:

int WINAPI WinMain (...){
.
.
.
RegisterHotKey(hwnd, 100, MOD_ALT | MOD_SHIFT | MOD_CONTROL , 'p');
.
.
.
}

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){    
string execstr;
execstr = ("\"C:\\Program Files\\Microsoft Office\\Office10\\WINWORD.EXE\" \"C:\\Documents and Settings\\DELL\\My Documents\\diary.jjj\"");
switch (message)                  /* handle the messages */
    {
    	case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        case WM_HOTKEY:
            printf ("pressed hotkey");
            WinExec (execstr.c_str(),SW_SHOW);
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }
return 0;
}

AnswerRe: registerHotKey dont work Pin
David Crow28-Sep-07 7:45
David Crow28-Sep-07 7:45 
AnswerRe: registerHotKey dont work Pin
GauranG Shah28-Sep-07 17:56
GauranG Shah28-Sep-07 17:56 
GeneralRe: registerHotKey dont work Pin
jokop28-Sep-07 21:18
jokop28-Sep-07 21:18 
QuestionToolbar with two colums Pin
sharp_k28-Sep-07 7:02
sharp_k28-Sep-07 7:02 
AnswerRe: Toolbar with two colums Pin
Nathan Holt at EMOM28-Sep-07 7:13
Nathan Holt at EMOM28-Sep-07 7:13 
GeneralRe: Toolbar with two colums Pin
sharp_k28-Sep-07 10:53
sharp_k28-Sep-07 10:53 
GeneralRe: Toolbar with two colums Pin
Nathan Holt at EMOM28-Sep-07 11:01
Nathan Holt at EMOM28-Sep-07 11:01 
AnswerRe: Toolbar with two colums Pin
Mark Salsbery28-Sep-07 8:19
Mark Salsbery28-Sep-07 8:19 
GeneralRe: Toolbar with two colums Pin
sharp_k28-Sep-07 10:51
sharp_k28-Sep-07 10:51 
GeneralRe: Toolbar with two colums Pin
Mark Salsbery28-Sep-07 11:44
Mark Salsbery28-Sep-07 11:44 
GeneralRe: Toolbar with two colums Pin
sharp_k29-Sep-07 3:10
sharp_k29-Sep-07 3:10 
GeneralRe: Toolbar with two colums Pin
Mark Salsbery29-Sep-07 6:36
Mark Salsbery29-Sep-07 6:36 
GeneralRe: Toolbar with two colums Pin
sharp_k29-Sep-07 7:13
sharp_k29-Sep-07 7:13 
GeneralRe: Toolbar with two colums Pin
Mark Salsbery29-Sep-07 7:34
Mark Salsbery29-Sep-07 7:34 
GeneralRe: Toolbar with two colums Pin
sharp_k29-Sep-07 8:28
sharp_k29-Sep-07 8:28 
AnswerRe: Toolbar with two colums Pin
Anurag Gandhi28-Sep-07 22:26
professionalAnurag Gandhi28-Sep-07 22:26 
GeneralRe: Toolbar with two colums Pin
sharp_k29-Sep-07 3:13
sharp_k29-Sep-07 3:13 

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.