Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: file to array Pin
Cedric Moonen25-Jul-06 2:43
Cedric Moonen25-Jul-06 2:43 
GeneralRe: file to array Pin
earl25-Jul-06 4:20
earl25-Jul-06 4:20 
AnswerRe: file to array Pin
Parthi_Appu25-Jul-06 2:25
Parthi_Appu25-Jul-06 2:25 
QuestionIs there a GetRedraw function or message? Pin
Paul Vickery25-Jul-06 0:33
professionalPaul Vickery25-Jul-06 0:33 
AnswerRe: Is there a GetRedraw function or message? Pin
Michael Dunn25-Jul-06 7:16
sitebuilderMichael Dunn25-Jul-06 7:16 
Questionassigningn your application to a protocol [modified] Pin
hell_admin25-Jul-06 0:29
hell_admin25-Jul-06 0:29 
AnswerRe: assigningn your application to a protocol Pin
David Crow25-Jul-06 3:03
David Crow25-Jul-06 3:03 
AnswerRe: assigningn your application to a protocol Pin
hell_admin26-Jul-06 3:02
hell_admin26-Jul-06 3:02 
You're not so far from the truth
here's result maybe someone needed:
bool SetMoniker()
{

CString url = _T("your protocol");
CString def = _T("URL:someproto"); //can change after URL:

TCHAR app_path[_MAX_PATH+1]=_T("\0");
GetModuleFileName(NULL,app_path,_MAX_PATH);

CString icon(app_path);
icon += _T(",0");
CString command(app_path);
command = _T("\"") + command + _T("\"");
command += _T(" \"%1\"");

HKEY key;
if (ERROR_SUCCESS == RegCreateKeyEx(HKEY_CLASSES_ROOT,_T("someproto"),0,0,REG_OPTION_NON_VOLATILE,KEY_WRITE,0,&key,0))
{
RegSetValueEx(key,_T("URL Protocol"),0,REG_SZ,(BYTE*)url.GetString(),(DWORD)( url.GetLength()*sizeof (TCHAR)) );
RegSetValueEx(key,NULL,0,REG_SZ,(BYTE*)def.GetString(),(DWORD)( def.GetLength()*sizeof (TCHAR)) );
HKEY icon_key;
if( ERROR_SUCCESS == RegCreateKeyEx(key,_T("DefaultIcon"),0,0,REG_OPTION_NON_VOLATILE,KEY_WRITE,0,&icon_key,0))
{
RegSetValueEx(icon_key,NULL,0,REG_SZ,(BYTE*)icon.GetString(),(DWORD)( icon.GetLength()*sizeof (TCHAR)) );
RegCloseKey(icon_key);
}

HKEY com;
if( ERROR_SUCCESS == RegCreateKeyEx(key,_T("shell\\open\\command"),0,0,REG_OPTION_NON_VOLATILE,KEY_WRITE,0,&com,0))
{
RegSetValueEx(com,NULL,0,REG_SZ,(BYTE*)command.GetString(),(DWORD)( command.GetLength()*sizeof (TCHAR)));
RegCloseKey(com);
}

RegCloseKey(key);
return true;
}
return false;
}
QuestionWMA To WAV Pin
yhl2ws24-Jul-06 23:53
yhl2ws24-Jul-06 23:53 
AnswerRe: WMA To WAV Pin
toxcct25-Jul-06 0:01
toxcct25-Jul-06 0:01 
GeneralRe: WMA To WAV Pin
ThatsAlok25-Jul-06 0:34
ThatsAlok25-Jul-06 0:34 
GeneralRe: WMA To WAV Pin
Hamid_RT25-Jul-06 2:35
Hamid_RT25-Jul-06 2:35 
GeneralRe: WMA To WAV Pin
toxcct25-Jul-06 2:40
toxcct25-Jul-06 2:40 
QuestionBlocking Pin
tanarnelinistit24-Jul-06 23:30
tanarnelinistit24-Jul-06 23:30 
AnswerRe: Blocking Pin
_AnsHUMAN_ 24-Jul-06 23:32
_AnsHUMAN_ 24-Jul-06 23:32 
GeneralRe: Blocking Pin
tanarnelinistit24-Jul-06 23:34
tanarnelinistit24-Jul-06 23:34 
GeneralRe: Blocking Pin
_AnsHUMAN_ 25-Jul-06 0:05
_AnsHUMAN_ 25-Jul-06 0:05 
AnswerRe: Blocking Pin
Eytukan25-Jul-06 0:30
Eytukan25-Jul-06 0:30 
GeneralRe: Blocking Pin
tanarnelinistit25-Jul-06 0:36
tanarnelinistit25-Jul-06 0:36 
GeneralRe: Blocking Pin
Eytukan25-Jul-06 1:05
Eytukan25-Jul-06 1:05 
QuestionRe: Blocking Pin
tanarnelinistit25-Jul-06 1:23
tanarnelinistit25-Jul-06 1:23 
AnswerRe: Blocking Pin
Eytukan25-Jul-06 1:28
Eytukan25-Jul-06 1:28 
QuestionRe: Blocking Pin
tanarnelinistit25-Jul-06 1:44
tanarnelinistit25-Jul-06 1:44 
AnswerRe: Blocking Pin
Eytukan25-Jul-06 3:44
Eytukan25-Jul-06 3:44 
GeneralRe: Blocking Pin
ThatsAlok25-Jul-06 1:26
ThatsAlok25-Jul-06 1:26 

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.