From feda879d82ecfe80ad3ff106e51a215d67a4495f Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Tue, 27 May 2008 05:38:58 +1200 Subject: [PATCH] Cleanup of code --- Release/help/images/odlg.gif | Bin 12194 -> 9154 bytes Release/help/images/ow.gif | Bin 8351 -> 6119 bytes Release/help/openwide.hhp | 13 ++- Release/openwide_submit.ssu | Bin 5069 -> 5047 bytes Release/readme.txt | 3 +- multi.ico | Bin 18510 -> 18462 bytes openwide.c | 253 +++++++++++++++++++++++++++++++----------- openwide.ppj | 173 ++++++++++++++--------------- openwide.rc | 19 +++- openwide_proto.h | 22 ++++ openwidedll.c | 256 +++++++++++++++++++++++++++++++------------ openwidedll.h | 23 ++++ openwidedll.ppj | 4 +- openwidedll.rc | 2 +- openwidedllres.h | 22 ++++ openwideres.h | 23 ++++ ow.ico | Bin 4710 -> 4698 bytes owDLLInc.h | 22 ++++ owDLLUtil.c | 22 ++++ owSharedUtil.c | 59 +++++++--- owSharedUtil.h | 22 ++++ owUtil.c | 26 ++++- owUtil.h | 22 ++++ psDlg.c | 24 +++- tbIcon-layers.ico | Bin 44374 -> 44292 bytes tray.ico | Bin 1406 -> 1404 bytes 26 files changed, 770 insertions(+), 240 deletions(-) rewrite Release/help/images/odlg.gif (100%) rewrite Release/help/images/ow.gif (100%) rewrite openwide.ppj (85%) diff --git a/Release/help/images/odlg.gif b/Release/help/images/odlg.gif dissimilarity index 100% index 23e37ee2ad7f9abfe24c53582b261830c6f801b6..1f45bf5ea1398aca0329c8888fede7f57e7b4f33 100755 GIT binary patch literal 9154 zcwPa*BR$+lNk%w1VKV|+0kZ%A=gw!JDY60r0!U1^K6kwu0lVk6 z9cx}Y_}+`mx`b$s<^XxM)j$~<` zXsWJk>%MRt2mxW=c&_h!@BhG{aEJrkj5ec^fFu%?fM}EnTsC>j95hQ!Qm@^okNfRz z%U&szsSZ1PR(2UY)}r6|d|L0e(|1-=ab!0Gz2n@j*pO$l9QB`mY0~3iZz*? zo}ZwhqN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Release/help/images/ow.gif b/Release/help/images/ow.gif dissimilarity index 100% index 325c64026d0d0128eda8b24829abbf0108b11db7..4b5ee8c2ff2225a2b2a4adf4c4d2981f0e26cf12 100755 GIT binary patch literal 6119 zcwPbL7Z~VANk%w1VORl>0ipl^)z;hT?e&L?o<&=^MuNyuDzeT100000A^8LV00000 zEC2ui09XN#0RRL42)f+}*y*TU5yZ>OQ2|!?;XsWJk>%MR-&vb3yc&_h!PYa}g zXhTK};T-z38(#&0dcOX!tu$pTqC?ynfGz z6ZU_8cYys#;=QU$0?q zZL_kqY<;-7y1RIbzKy`YzLkZX#>bnUK~PZ!&d&y`($l78v9Yw-w%gfqcXqtt;e_Oa z=EA}0=)=hEmNNp6@SRRV&CvMx)cgGXW!eC_$?`_9j<|z;2=y{2NYFZU5QRM|=8k|6 z3P9vl$Vfo{*^_(uLYC^c&qOL~+pw8Yc?+PoGX>{>Lr7CkIfsaFKHM3RV#S{q7aSOR zfC0y#5;%GURlu2m08fROcq-tTloTZcL@`;wB-g82wP3aKwQN`{DANiI$abK?nsE8> zoU1OAPfZPmD$uLosL-N+`^M{7kC}mGCQ3;4Ga#dKlR8{ATGz)~$Nrvt!m;t+$cGcBoO}uj z$6ikih+Z7J$?3&CcYgVHw78pjz?VynI+&!p$dJkw9Q*HU*o2qe9!0disH!8)CXa4> za{u7}VeyBYe`a8X-5AlKaoukR9;g|E3$_$mOy77%lX#?&r(r~^sixj+fGyxxULmp< z-vaj#r5k;sG}fGe)D=e{3;+H1oO92q@FH;g0cay-YH7FDXWfBjp z54;DTdi5DKm`CBWN$La3F40jwFPaza*kitpR4}M_MLkt5i^p0+yN8DR(B1J6acJb#i9sD}oQo80U5W z%%XtZbreRM$4sG$TB=Qqoc4>hO8)8Rhpq}5C_N-F9{c+-$Y6K46f;kkZMG{Bqb)JbY-=ZN*1LG^ zFEL@Sh9wht=dJhNeE01)2!;JE_~3*WZusE`KY{q-j5qH1<0F&{`Q(&WZn@z9fnToq z=A3sPx#FIOF8b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$(Csq@>y`c}cTnQj=oiWGB1! zNl;o%l%q6SDNTtpRHjm8t7IkBR%pgoN-~xTo8=f?$qEDPl9#>ouLDPX-d15RDwOss4R8Yzw#ATirLFL@#|SgTQ$;AVDzLe z9hu2&>eZ5o6{`XlY8qbC$_1F} zbCA>n23K$D)TSMktcykKxumvOlTB8!Ir*tWXZpvQ;8RcdeQ)>XkZ6t68; z$`-}ZF(~&`%-w`>GqzfwT6D9>4HtDyWnE2R7h~ETE_VmI1@B@DyrmLvCJ1Uz`QCHB z^`-CseeIjyatK$XnI+_54NI-|hU&eTcqZNuoZz`#w!g%6lmQMGVF^c=zghKffODZt z4R4sk9rkdC2@6IH-?Eh#CNU#TeBwu@SjDt-aErJ3Vi=Q>#WTiajcvS19Ou}RJLYkW z(febD`dG+AmT{3`d1NFTtiVgQu#%mut|mvhx z!>*waF*B?eb!e>4bMFm1vZGIJVoJg#jG=CcB`?#`7j{ zfwy(x<5su1eah}_sn)MUBbZc;r}B4uoaP=MdB_8<@c@f^Q{>imVB!65B;571o-NwN z?>!J^==|U}&$-BVUh+N>j8=4q-4$hUy=rfYoTQI9vZzqMP$#wxt) z_1bOA^UCkALY$^Ki9^T<9`L+F9m71=6uB9J@mvTV3X{mW7xU&tRg65@XJW0Xp9i44ArJaiwB8n{uT<)3 zwR+ckzV@3(eVrFf3*gJ`(!-CN?<@7^!WlvNgkyg51?TukCmHwC@71KOzhy{ge_7b) pzLXXHeQ|kT{Ex1F`JZfj^{=1(?RP)$p&x(w&!7JFkADyV06Xp#yCDDo diff --git a/Release/help/openwide.hhp b/Release/help/openwide.hhp index 3fbbc50..3ae505e 100755 --- a/Release/help/openwide.hhp +++ b/Release/help/openwide.hhp @@ -3,9 +3,16 @@ ; of the original project file. [OPTIONS] +Compatibility=1.1 or later Compiled file=openwide.chm -Default topic=openwide.htm Default Window=Main +Default topic=openwide.htm +Display compile progress=No +Language=0x409 English (United States) + +[WINDOWS] +Main="OpenWide Help",,,"openwide.htm","openwide.htm",,,,,0x2000,,0x4c,[0,0,600,600],0x100f0000,,,1,,,0 + [FILES] images\odlg.gif @@ -15,5 +22,5 @@ license.htm openwide.htm style.css -[WINDOWS] -Main="OpenWide Help",,,"openwide.htm","openwide.htm",,,,,0x2020,,0x4c,[0,0,600,600],0x100f0000,,,1,,0, +[INFOTYPES] + diff --git a/Release/openwide_submit.ssu b/Release/openwide_submit.ssu index fa56acec1725334466208cd958be67eb561aec11..6938015bc95ca01809887511f5cc06d5e0b7804b 100755 GIT binary patch delta 125 zcwPa00D}L`C$}e%Qjt?Rv5jj1v-ts*0ke<;lmU|^1@p5R21^37We6q#vy2In0kaQ1XisMiNNwsiJ z0#Rbz#vm1*Jl}z&1Fx|*uMq1Ymbvxpb>BR%aTwoW`e>#t{=qAH!J5mwvBCW3%Zg-m zd}dB~`e0=u@8sFM;Xork@s@&&Nawc#au)I*260jZn}OtW!T&(=nb0Ib-u(Nkle5lv SZegjctzykl;+@Nt2Q(6_cSHNwe}P{R@-vHD0q(HbxASK^#$&>Ou{Zp&U`O HN<#z%it{=B delta 253 zcwU<~f$`h~#tm-F9K5{O931K$93~fv$xO~*=HUbi^!07rv**C%kD?NrCo@a4G4b+F zUdLGnqI9@G)aF%OSu7x~2tSxRiNA^w#N`n*0&(pGU$TR^>XLEHyu52CpRf<(y3W8* z&%kgU#MN*J+iWHEmJujtJULL #include #include @@ -13,22 +35,44 @@ #include "openwide_proto.h" +// Command identifiers for the trayicon popup menu. enum TrayCommands { IDM_ABOUT = 100, IDM_SETTINGS, IDM_QUIT }; +// Window handles for the various windows HWND ghwMain = NULL, ghwPropSheet = NULL; + +// Global instance handle HINSTANCE ghInstance = NULL; -//HWND ghwListBox = NULL; +// Icon handles; these icons are used in a few places HICON ghIconLG = NULL, ghIconSm = NULL; +// This is a pointer shared data structure, containing all the useful info POWSharedData gPowData = NULL; + +// Handle to our shared memory area -- access to this is controlled by a mutex HANDLE ghSharedMem = NULL; + +// Mutex handle -- used to limit access to the shared memory area. HANDLE ghMutex = NULL; + +// Message id, from RegisterWindowMessage(...), which is used to notify closure of : TODO: find out! UINT giCloseMessage = 0; + + +/* + * Initialise the shared memory area + * + * initShareMem( mainWindowHandle ); + * + * @returns 1 on success, 0 on failure + */ int initSharedMem(HWND hwnd) { - int rVal = 0; + int rVal = 0; // return value + + // Create the mutex ghMutex = CreateMutex(NULL, TRUE, OW_MUTEX_NAME); if( !ghMutex ) return 0; @@ -38,7 +82,9 @@ int initSharedMem(HWND hwnd) ghMutex = NULL; return 0; }*/ - POWSharedData pRData = NULL; + + POWSharedData pRData = NULL; // Pointer to registry data + // try to read in saved settings from registry HKEY hk = regCreateKey(HKEY_CURRENT_USER, OW_REGKEY_NAME); if( hk ) @@ -52,53 +98,62 @@ int initSharedMem(HWND hwnd) // Create a file mapping object against the system virtual memory. // This will be used to share data between the application and instances of the dll. - ghSharedMem = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(OWSharedData), OW_SHARED_FILE_MAPPING); + ghSharedMem = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, + sizeof(OWSharedData), OW_SHARED_FILE_MAPPING); if(ghSharedMem) { - // map a view of the file + // map a view of the 'file' gPowData = (POWSharedData)MapViewOfFile(ghSharedMem, FILE_MAP_WRITE, 0,0,0); if( gPowData ) { // clear the shared mem ZeroMemory(gPowData, sizeof(OWSharedData)); - // if we succeeded in loading saved data, copy it back + // If we succeeded in loading saved data from the registry, + // then copy it to the shared memory area if( pRData ) CopyMemory(gPowData, pRData, sizeof(OWSharedData)); else - { - // initialise the memory to useful values. + { // Nothing loaded from registry, so + // initialise the memory to some useful default values. + + // Get screen dimensions int w,h; w = GetSystemMetrics(SM_CXSCREEN); h = GetSystemMetrics(SM_CYSCREEN); + + // Set the Open/Save dialog origin and width from the screen dimensions gPowData->ptOrg.x = w/2 - w/4; gPowData->ptOrg.y = (h - 2*h/3)/2; - gPowData->szDim.cx = w/2; - gPowData->szDim.cy = 2*h/3; - gPowData->iView = V_DETAILS; - gPowData->iFocus = F_DIRLIST; - gPowData->bShowIcon = 1; + gPowData->szDim.cx = w/2; // Screen width / 2 + gPowData->szDim.cy = 2*h/3; // 2/3 of screen height + gPowData->iView = V_DETAILS; // Use details view + gPowData->iFocus = F_DIRLIST; // Focus directory listing + gPowData->bShowIcon = 1; // Show the tray icon } - gPowData->hwListener = hwnd; - gPowData->bDisable = 0; - gPowData->refCount = 0; - giCloseMessage = gPowData->iCloseMsg = RegisterWindowMessage("Lingo.OpenWide.ProcessFinished.Message"); - rVal = 1; - } - } - - if( pRData ) + gPowData->hwListener = hwnd; // Listener window for trayicon events, etc. + gPowData->bDisable = 0; // Enable the hook! + gPowData->refCount = 0; // reference counting TODO: add explanation + giCloseMessage = gPowData->iCloseMsg + = RegisterWindowMessage("Lingo.OpenWide.ProcessFinished.Message"); + rVal = 1; // Return value to indicate success + } // if( gPowData ) + } // if( ghSharedMem ) + + if( pRData ) // free registry data free(pRData); - releaseMutex(); + releaseMutex(); // unlock Mutex, so shared memory area can be accessed. return rVal; -} +} // END of initSharedMem(...) +/* + * Free the shared memory area, once it is no longer in use. + */ void releaseSharedMem(void) { -// dbg("DLL: Waiting for mutex"); - if( ghMutex ) + if( ghMutex ) // Obtain a lock on the shared memory access mutex { DWORD dwRes = WaitForSingleObject(ghMutex, INFINITE); if(dwRes != WAIT_OBJECT_0) @@ -111,7 +166,7 @@ void releaseSharedMem(void) // dbg("DLL: Releasing file mapping"); if( ghSharedMem ) { - if( gPowData ); + if( gPowData ) { UnmapViewOfFile(gPowData); gPowData = NULL; @@ -120,7 +175,8 @@ void releaseSharedMem(void) ghSharedMem = NULL; } ReleaseMutex(ghMutex); -} +} // END of releaseSharedMem() + /* int doApply(HWND hwnd) { @@ -184,48 +240,72 @@ int doApply(HWND hwnd) } */ - +/* + * Determines if this application has a shortcut in the 'Start Menu->Startup' directory. + */ BOOL isStartupApp(HWND hwnd) { - static char szBuf[MAX_PATH+1]; + static char szBuf[MAX_PATH+1]; // path buffer + + // Retrieve path to windows Startup folder HRESULT hRes = SHGetFolderPath(hwnd, CSIDL_STARTUP, NULL, SHGFP_TYPE_CURRENT, szBuf); if( hRes == S_OK ) { - PathAppend(szBuf, "OpenWide.lnk"); - return fileExists(szBuf); + PathAppend(szBuf, "OpenWide.lnk"); // Append the name of the link :: TODO - this should be cleverer, perhaps. + return fileExists(szBuf); // Check the shortcut exists :: TODO: Check if it points to the right place, too? } return FALSE; } +/* + * Makes this program start with Windows, by creating a shortcut in the Windows Startup folder + * + * setStartupApp( parentWindowOfErrors, isStartupApp ) + * + * @param isStartupApp -- set to 1 to create the shortcut, 0 to remove it. + * @returns 1 on success, 0 on failure + */ int setStartupApp(HWND hwnd, BOOL bSet) { - char szBuf[MAX_PATH+1], szModule[MAX_PATH+1]; + char szBuf[MAX_PATH+1], szModule[MAX_PATH+1]; // some path buffers + // Empty the string buffers ZeroMemory(szBuf, sizeof(szBuf)/sizeof(char)); ZeroMemory(szModule, sizeof(szBuf)/sizeof(char)); + // Retrieve the path to this executable if( !GetModuleFileName(NULL, szModule, MAX_PATH) ) return 0; + + // Get the windows startup folder HRESULT hRes = SHGetFolderPath(hwnd, CSIDL_STARTUP, NULL, SHGFP_TYPE_CURRENT, szBuf); - if( hRes != S_OK || !PathAppend(szBuf, "OpenWide.lnk")) + if( hRes != S_OK || !PathAppend(szBuf, "OpenWide.lnk")) // Append link path to startup folder path as side-effect return 0; - if( bSet ) + if( bSet ) // Create the shortcut? { if( fileExists(szBuf) ) - hRes = delFile(hwnd, szBuf); - hRes = CreateLink(szModule, szBuf, "OpenWide - control Open&Save dialogs..."); + hRes = delFile(hwnd, szBuf); // Delete existing if found + hRes = CreateLink(szModule, szBuf, "OpenWide - control Open&Save dialogs..."); // Create new shortcut return hRes == S_OK; } - else + else // Delete the shortcut { return delFile(hwnd, szBuf); } -} +} // END of setStartupApp(...) + +/* + * Create an event-listener window, which will be used for communication between the + * app and DLL instances ??? TODO:: Check this!! + * + * NOTE: Looks like this is badly named, doesn't really do SFA with the listener win!!! @see createListenerWindow() + * @param hwnd -- parent window? + */ int initListener(HWND hwnd) { if(!initSharedMem(hwnd)) - return 0; + return 0; // Make sure the shared memory area is set up. BOOL bMinimize = FALSE, bIcon = TRUE; @@ -233,7 +313,7 @@ int initListener(HWND hwnd) if( !waitForMutex() ) return 0; - bMinimize = gPowData->bStartMin; + bMinimize = gPowData->bStartMin; // get the preferences from the shared memory bIcon = gPowData->bShowIcon; /// released shared data @@ -242,24 +322,33 @@ int initListener(HWND hwnd) if(bIcon) addTrayIcon(hwnd); + // Show property sheet only if the preferences specify it. if( bMinimize ) ghwPropSheet = NULL; else ghwPropSheet = showDlg(hwnd); + // Create the main event hook if( !setHook() ) { Warn( "Failed to set hook: %s", geterrmsg() ); return 0; } return 1; -} +} // END of initListener(...) + +/* + * Create, and show the popup menu for the trayicon + * + * @param hwnd -- window to receive WM_COMMAND messages. + */ void doTrayMenu(HWND hwnd) { - if( ghwPropSheet ) + if( ghwPropSheet ) // Show the property sheet window SetForegroundWindow(ghwPropSheet); + // Create the popup menu structure HMENU hm = CreatePopupMenu(); AppendMenu(hm, MF_STRING, IDM_ABOUT, "&About OpenWide..."); AppendMenu(hm, MF_GRAYED | MF_SEPARATOR, 0, NULL); @@ -269,26 +358,43 @@ void doTrayMenu(HWND hwnd) SetMenuDefaultItem(hm, IDM_SETTINGS, FALSE); POINT pt; - GetCursorPos(&pt); + GetCursorPos(&pt); // Find mouse location + + // Popup the menu TrackPopupMenu(hm, TPM_RIGHTBUTTON | TPM_BOTTOMALIGN | TPM_RIGHTALIGN, pt.x, pt.y, 0, hwnd, NULL); + + // Delete the menu structure again. DestroyMenu(hm); -} +} // END of doTrayMenu(...) +/** + * Display the main property sheet dialog + * + * @param hwnd -- parent window + */ void showSettingsDlg(HWND hwnd) { - if( ghwPropSheet ) + if( ghwPropSheet ) // un-hide it if it exists already. { ShowWindow(ghwPropSheet, SW_SHOWNORMAL); SetForegroundWindow(ghwPropSheet); } - else + else // create and show the dialog if it doesn't already exist ghwPropSheet = showDlg(hwnd); -} +} // END of showSettingsDlg(...) + +/* + * Quit the application, running cleanup tasks first. + * + * This is a high-level function which makes up part of the 'public' API of the program, + * at least, as far as it has such an clear designed concept :( + * + * TODO: Make sure the above statement is actually correct, and sort the functions into these sorts of categories somewhere. + */ void doQuit(void) -{ - if( ghwPropSheet ) + if( ghwPropSheet ) // don't quit with the settings dialog open { SetForegroundWindow(ghwPropSheet); Warn("Please close the settings dialog box before trying to quit"); @@ -297,19 +403,21 @@ void doQuit(void) //rmvHook(); if( waitForMutex() ) { -// dbg("Setting bDisable"); - gPowData->bDisable = TRUE; -// dbg("refCount is %d", gPowData->refCount); - if(gPowData->refCount == 0) + gPowData->bDisable = TRUE; // Tell hook not to subclass any more windows + + if(gPowData->refCount == 0) // if there are no more subclassed windows { -// dbg("Posting quit message"); - PostQuitMessage(0); + PostQuitMessage(0); // quit program } releaseMutex(); } remTrayIcon(ghwMain); } + +/* + * Listener window callback + */ LRESULT WINAPI CALLBACK wpListener(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { static UINT uTaskbarMsg=0; @@ -321,8 +429,10 @@ LRESULT WINAPI CALLBACK wpListener(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) Warn("OpenWide failed to initialize properly. Please report this bug:\r\nErr msg: %s", geterrmsg()); return -1; } - uTaskbarMsg = RegisterWindowMessage("TaskbarCreated"); + uTaskbarMsg = RegisterWindowMessage("TaskbarCreated"); // TODO:: WHAT IS THIS? break; + +// Handle trayicon menu commands case WM_COMMAND: switch(LOWORD(wp)) { @@ -337,6 +447,8 @@ LRESULT WINAPI CALLBACK wpListener(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) break; } break; + +// Handle trayicon interaction events case WM_TRAYICON: switch(lp) { @@ -386,10 +498,14 @@ LRESULT WINAPI CALLBACK wpListener(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) } +/* + * Callback for the placement window. This is the proxy window which can be + * resized and moved to set the desired Open/Save dialog dimensions. + */ BOOL WINAPI CALLBACK wpPlacement(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { static LPRECT pr = NULL; - static BOOL bXP; + static BOOL bXP; // Are we using WinXP ? -- Changes the minimum dialog dimensions. switch(msg) { case WM_INITDIALOG: @@ -399,6 +515,7 @@ BOOL WINAPI CALLBACK wpPlacement(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) bXP = isWinXP(); MoveWindow(hwnd, pr->left, pr->top, pr->right, pr->bottom, FALSE); break; + case WM_COMMAND: switch(LOWORD(wp)) { @@ -411,6 +528,8 @@ BOOL WINAPI CALLBACK wpPlacement(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) break; } break; + +// Used to limit the minimum dimensions while resizing case WM_GETMINMAXINFO: { MINMAXINFO * pmm = (MINMAXINFO *)lp; @@ -428,6 +547,7 @@ BOOL WINAPI CALLBACK wpPlacement(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) } } break; + case WM_CLOSE: EndDialog(hwnd, 0); break; @@ -437,16 +557,21 @@ BOOL WINAPI CALLBACK wpPlacement(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) return 1; } + +/* Create our trayicon */ int addTrayIcon(HWND hwnd) { return Add_TrayIcon( ghIconSm, "OpenWide\r\nRight-Click for menu...", hwnd, WM_TRAYICON, 0); } +/* Remove the trayicon! */ void remTrayIcon(HWND hwnd) { Rem_TrayIcon( hwnd, WM_TRAYICON, 0 ); } + +/* Creates the listener window */ HWND createListenerWindow(void) { static BOOL bRegd = FALSE; @@ -466,17 +591,20 @@ HWND createListenerWindow(void) WS_POPUP, 0,0, 1,1, NULL, NULL, ghInstance, NULL); } +// TODO: Remove this useless function! int createWin(void) { ghwMain = createListenerWindow(); return 1; } +// TODO: why the new naming convention ? int ow_init(void) { - HRESULT hRes = CoInitialize(NULL); + HRESULT hRes = CoInitialize(NULL); // Initialise COM -- for some reason I forget, we need to do this. if( hRes != S_OK && hRes != S_FALSE ) return 0; + // Load the icons from the .exe resource section ghIconSm = (HICON)LoadImage(ghInstance, MAKEINTRESOURCE(IDI_TRAY), IMAGE_ICON, 16,16, LR_SHARED | LR_VGACOLOR); ghIconLG = (HICON)LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_TRAY)); if( !createWin() ) @@ -498,16 +626,19 @@ void ow_shutdown(void) int WINAPI WinMain(HINSTANCE hi, HINSTANCE hiPrv, LPSTR fakeCmdLine, int iShow) { + // This Mutex is used to ensure that only one instance of this app can be running at a time. HANDLE hMutex = NULL; hMutex = CreateMutex(NULL, FALSE, "OpenWide_App_Mutex"); if( hMutex && GetLastError()==ERROR_ALREADY_EXISTS ) { + // This app is already loaded, so find its window and send it a message. CloseHandle(hMutex); HWND hw = FindWindowEx(NULL, NULL, "Lingo.OpenWide.Listener", "Lingo.OpenWide"); - if(hw) + if(hw) // Fake a double click on the trayicon -- to show the window. SendMessage(hw, WM_TRAYICON, 0, WM_LBUTTONDBLCLK); - return 0; + return 0; // Exit this instance of the app. } + ghInstance = hi; if( !ow_init() ) { diff --git a/openwide.ppj b/openwide.ppj dissimilarity index 85% index fb57e21..7ba99c0 100755 --- a/openwide.ppj +++ b/openwide.ppj @@ -1,86 +1,87 @@ -# -# PROJECT FILE generated by "Pelles C for Windows, version 3.00". -# NOTE! Manual changes of this file is done at your own risk. -# - -POC_PROJECT_VERSION = 1.00# -POC_PROJECT_TYPE = 0# -POC_PROJECT_PATH = .# -POC_PROJECT_ARGUMENTS = # -POC_PROJECT_WORKPATH = # -POC_PROJECT_EXECUTOR = # -CC = pocc.exe# -AS = ml.exe# -RC = porc.exe# -LINK = polink.exe# -CCFLAGS = -Tx86-coff -MT -Os -W1 -Gz -Ze -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0500 -DCOBJMACROS # -ASFLAGS = -W1 -Cu -c -nologo -coff# -RCFLAGS = # -LINKFLAGS = -subsystem:windows -machine:ix86 -release kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib openwidedll.lib shell32.lib ole32.lib shlwapi.lib uuid.lib# - -.SILENT: - - -# -# Build openwide.exe. -# -"$(POC_PROJECT_PATH)\openwide.exe": \ - "$(POC_PROJECT_PATH)\output\openwide.res" \ - "$(POC_PROJECT_PATH)\output\openwide.obj" \ - "$(POC_PROJECT_PATH)\output\psDlg.obj" \ - "$(POC_PROJECT_PATH)\output\owUtil.obj" \ - "$(POC_PROJECT_PATH)\output\owSharedUtil.obj" - $(LINK) $(LINKFLAGS) -out:"$@" $** - -# -# Build openwide.res. -# -"$(POC_PROJECT_PATH)\output\openwide.res": \ - "$(POC_PROJECT_PATH)\openwide.rc" \ - "$(POC_PROJECT_PATH)\openwideres.h" \ - "$(POC_PROJECT_PATH)\ow.ico" - $(RC) $(RCFLAGS) "$!" -Fo"$@" - -# -# Build openwide.obj. -# -"$(POC_PROJECT_PATH)\output\openwide.obj": \ - "$(POC_PROJECT_PATH)\openwide.c" \ - "$(POC_PROJECT_PATH)\openwidedll.h" \ - "$(POC_PROJECT_PATH)\openwideres.h" \ - "$(POC_PROJECT_PATH)\owutil.h" \ - "$(POC_PROJECT_PATH)\owSharedUtil.h" \ - "$(POC_PROJECT_PATH)\openwide_proto.h" - $(CC) $(CCFLAGS) "$!" -Fo"$@" - -# -# Build psDlg.obj. -# -"$(POC_PROJECT_PATH)\output\psDlg.obj": \ - "$(POC_PROJECT_PATH)\psDlg.c" \ - "$(POC_PROJECT_PATH)\openwidedll.h" \ - "$(POC_PROJECT_PATH)\openwideres.h" \ - "$(POC_PROJECT_PATH)\owutil.h" \ - "$(POC_PROJECT_PATH)\owSharedUtil.h" \ - "$(POC_PROJECT_PATH)\openwide_proto.h" - $(CC) $(CCFLAGS) "$!" -Fo"$@" - -# -# Build owUtil.obj. -# -"$(POC_PROJECT_PATH)\output\owUtil.obj": \ - "$(POC_PROJECT_PATH)\owUtil.c" \ - "$(POC_PROJECT_PATH)\openwidedll.h" \ - "$(POC_PROJECT_PATH)\openwideres.h" \ - "$(POC_PROJECT_PATH)\owutil.h" \ - "$(POC_PROJECT_PATH)\owSharedUtil.h" - $(CC) $(CCFLAGS) "$!" -Fo"$@" - -# -# Build owSharedUtil.obj. -# -"$(POC_PROJECT_PATH)\output\owSharedUtil.obj": \ - "$(POC_PROJECT_PATH)\owSharedUtil.c" \ - "$(POC_PROJECT_PATH)\openwidedll.h" \ - "$(POC_PROJECT_PATH)\owSharedUtil.h" - $(CC) $(CCFLAGS) "$!" -Fo"$@" +# +# PROJECT FILE generated by "Pelles C for Windows, version 4.00". +# WARNING! DO NOT EDIT THIS FILE. +# + +POC_PROJECT_VERSION = 4.00# +POC_PROJECT_TYPE = 0# +POC_PROJECT_ARGUMENTS = # +POC_PROJECT_WORKPATH = # +POC_PROJECT_EXECUTOR = # +CC = pocc.exe# +AS = ml.exe# +RC = porc.exe# +LINK = polink.exe# +CCFLAGS = -Tx86-coff -MD -Os -Ox -W1 -Gz -Ze -Go -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0500 -DCOBJMACROS # +ASFLAGS = -W3 -Cu -c -nologo -coff# +RCFLAGS = # +LINKFLAGS = -subsystem:windows -machine:ix86 -map -align:0x200 kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib openwidedll.lib shell32.lib ole32.lib shlwapi.lib uuid.lib# +LIB = c:\Program Files\MSVC++\lib;C:\Program Files\Microsoft SDK\lib;c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;C:\Program Files\CodeBlocks\lib;C:\Program Files\PellesC\Lib# + +.SILENT: + +# +# Build openwide.exe. +# +openwide.exe: \ + output\openwide.res \ + output\openwide.obj \ + output\psDlg.obj \ + output\owUtil.obj \ + output\owSharedUtil.obj + $(LINK) $(LINKFLAGS) -out:"$@" $** + +# +# Build openwide.res. +# +output\openwide.res: \ + openwide.rc \ + openwideres.h \ + ow.ico + $(RC) $(RCFLAGS) "$!" -Fo"$@" + +# +# Build openwide.obj. +# +output\openwide.obj: \ + openwide.c \ + openwidedll.h \ + openwideres.h \ + owutil.h \ + owSharedUtil.h \ + openwide_proto.h + $(CC) $(CCFLAGS) "$!" -Fo"$@" + +# +# Build psDlg.obj. +# +output\psDlg.obj: \ + psDlg.c \ + openwidedll.h \ + openwideres.h \ + owutil.h \ + owSharedUtil.h \ + openwide_proto.h + $(CC) $(CCFLAGS) "$!" -Fo"$@" + +# +# Build owUtil.obj. +# +output\owUtil.obj: \ + owUtil.c \ + openwidedll.h \ + openwideres.h \ + owutil.h \ + owSharedUtil.h + $(CC) $(CCFLAGS) "$!" -Fo"$@" + +# +# Build owSharedUtil.obj. +# +output\owSharedUtil.obj: \ + owSharedUtil.c \ + openwidedll.h \ + owSharedUtil.h + $(CC) $(CCFLAGS) "$!" -Fo"$@" + +.EXCLUDEDFILES: diff --git a/openwide.rc b/openwide.rc index 25b4c78..f1dc33d 100755 --- a/openwide.rc +++ b/openwide.rc @@ -17,7 +17,7 @@ BEGIN CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 6, 22, 45, 15 END -IDI_TRAY ICON "ow.ico" +IDI_TRAY ICON "icons\\ow.ico" IDD_OSDIALOGS DIALOGEX DISCARDABLE 0, 0, 212, 188 STYLE WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE @@ -79,5 +79,20 @@ BEGIN CONTROL "&Remove selected", IDB_RMVEX, "Button", WS_TABSTOP, 84, 124, 64, 14 END -IDI_TBICON ICON "tray.ico" +IDI_TBICON ICON "icons\\tray.ico" + +IDD_MENU DIALOGEX DISCARDABLE 0, 0, 212, 188 +STYLE WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE +CAPTION "Shortcut &Menu" +FONT 8, "MS Sans Serif", 0, 0, 1 +BEGIN + CONTROL "", 4012, "ListBox", LBS_SORT|LBS_NOINTEGRALHEIGHT|LBS_DISABLENOSCROLL|LBS_NOTIFY|WS_TABSTOP, 4, 28, 96, 124, WS_EX_TRANSPARENT + CONTROL "", 4005, "ToolbarWindow32", CCS_NORESIZE|CCS_NODIVIDER|TBSTYLE_FLAT|TBSTYLE_TOOLTIPS, 4, 8, 16, 16 + CONTROL "&Add", 4014, "Button", WS_TABSTOP, 112, 156, 97, 15 + CONTROL "", 4018, "ListBox", LBS_SORT|LBS_NOINTEGRALHEIGHT|LBS_NOTIFY|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 112, 68, 96, 84 + CONTROL "&Remove", 4023, "Button", WS_TABSTOP, 4, 156, 96, 15 + CONTROL "Items you can add to the menu", 4025, "Static", SS_LEFTNOWORDWRAP|WS_GROUP, 108, 56, 100, 8 + CONTROL "<- Click this icon to test the menu", 4026, "Static", WS_GROUP, 20, 8, 80, 16 + CONTROL "You can drag the items to the left to change the order that they appear in the menu.", 4027, "Static", WS_GROUP, 112, 8, 96, 28 +END diff --git a/openwide_proto.h b/openwide_proto.h index 0cc12bf..fb90f66 100755 --- a/openwide_proto.h +++ b/openwide_proto.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef LINGO_OPENWIDE_H #define LINGO_OPENWIDE_H diff --git a/openwidedll.c b/openwidedll.c index 759146e..46731b2 100755 --- a/openwidedll.c +++ b/openwidedll.c @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + /* --- The following code comes from c:\lcc\lib\wizard\dll.tpl. */ #include #include @@ -13,16 +35,28 @@ #include "owSharedUtil.h" +// DLL Instance handle HINSTANCE ghInst = NULL; + +// Handle to shared memory access locking mutex. HANDLE ghMutex = NULL; POWSharedData gpSharedMem = NULL; // pointer to shared mem +// Handle to filemapping for shared mem HANDLE ghMap = NULL; +// System hook handles HHOOK ghMsgHook = NULL, ghSysMsgHook = NULL; +// This cache is refreshed -- TODO: When? OWSharedData gOwShared; // stores copy of shared mem for access to non-pointer datas without extended blocking +/* Add an icon to the toolbar within the O&S Dialogs + * @param hwTB -- toolbar handle + * @param hIcn -- icon handle + * + * @returns -1 on error, or the index of the new icon within the imagelist. + */ int addIcon2TB(HWND hwTB, HICON hIcn) { HIMAGELIST hImgList = NULL; @@ -47,13 +81,23 @@ int addIcon2TB(HWND hwTB, HICON hIcn) return -1; } +/* + * Adds a new button to the toolbar : hwnd + * + * @param hwnd -- parent window of toolbar, ie. the O&S Dialog. + * + * @returns 1 -- TODO: this should return 0 on error, but doesn't appear to. + */ static int addTBButton(HWND hwnd) { + // Locate the toolbar handle. HWND hwTB = findChildWindow(hwnd, CID_TOOLBAR, TOOLBARCLASSNAME); + // Create toolbar button structure TBBUTTON tb = { 0 }; tb.iBitmap = VIEW_NETCONNECT; + // Load the toolbar icon, and add it to the imagelist, retaining the index. int idxNew = -1; HICON hIcn = (HICON)LoadImage(ghInst, MAKEINTRESOURCE(IDI_TBICON), IMAGE_ICON, 16, 16, 0); if (hIcn) @@ -62,13 +106,18 @@ static int addTBButton(HWND hwnd) DestroyIcon(hIcn); } if (idxNew >= 0) - tb.iBitmap = idxNew; - tb.idCommand = OW_TBUTTON_CMDID; + tb.iBitmap = idxNew; // set button image index + tb.idCommand = OW_TBUTTON_CMDID; // set command id -- @see openwidedll.h + // Set the button style flags tb.fsStyle = BTNS_AUTOSIZE | BTNS_BUTTON | BTNS_SHOWTEXT | BTNS_DROPDOWN; // BTNS_WHOLEDROPDOWN; + // Set the button state flags tb.fsState = TBSTATE_ENABLED; + // And give it a tooltip ? TODO: Check this tb.iString = (INT_PTR)"OpenWide by Lingo"; + // Add the button. SendMessage(hwTB, TB_ADDBUTTONS, 1, (LPARAM) & tb); + // Ensure that the toolbar window is large enough to show the new button. RECT r; int idxLast = SendMessage(hwTB, TB_BUTTONCOUNT, 0, 0) - 1; if (SendMessage(hwTB, TB_GETITEMRECT, idxLast, (LPARAM) & r)) @@ -79,23 +128,37 @@ static int addTBButton(HWND hwnd) SetWindowPos(hwTB, NULL, 0, 0, (r.right + 8) - rw.left, rw.bottom - rw.top + 1, SWP_NOMOVE | SWP_NOZORDER); } return 1; -} +} // END of addTBButton(...) +/* + * Show a drop-down menu from the toolbar button. + * + * @param hwnd -- O&S dialog + * @param hwTB -- toolbar handle + * @param uiItem -- id of toolbar item ? -- TODO: Check this. + */ static void dropMenu(HWND hwnd, HWND hwTB, UINT uiItem) { RECT r; + // Get the screen coords rectangle of the button SendMessage(hwTB, TB_GETRECT, uiItem, (LPARAM) & r); MapWindowPoints(hwTB, NULL, (LPPOINT) & r, 2); + // Set the area for the menu to avoid. ? :: TODO: see Platform SDK on TrackPopupMenuEx TPMPARAMS tpm = { 0 }; tpm.cbSize = sizeof(tpm); tpm.rcExclude = r; + // Create the menu structure. HMENU hm = CreatePopupMenu(); AppendMenu(hm, MF_STRING, OW_EXPLORE_CMDID, "&Locate current folder with Explorer..."); AppendMenu(hm, MF_STRING, OW_SHOWDESK_CMDID, "Show &Desktop [for Gabriel]..."); + AppendMenu(hm, MF_SEPARATOR | MF_DISABLED, 0, NULL); + AppendMenu(hm, MF_STRING, OW_ABOUT_CMDID, "&About OpenWide..."); SetMenuDefaultItem(hm, OW_SHOWDESK_CMDID, FALSE); /* +// * This section is todo with having Favourite directories, and is unfinished. +// AppendMenu(hm, MF_STRING, OW_ADDFAV_CMDID, "Add &Favourite"); SetMenuDefaultItem(hm, OW_ADDFAV_CMDID, FALSE); POWSharedData pow = lockSharedData(); @@ -132,12 +195,14 @@ static void dropMenu(HWND hwnd, HWND hwTB, UINT uiItem) unlockSharedData(pow); } */ - AppendMenu(hm, MF_SEPARATOR | MF_DISABLED, 0, NULL); - AppendMenu(hm, MF_STRING, OW_ABOUT_CMDID, "&About OpenWide..."); + // Display, track, then destroy the menu. TrackPopupMenuEx(hm, TPM_HORIZONTAL | TPM_RIGHTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, r.right, r.bottom, hwnd, &tpm); DestroyMenu(hm); -} +} // END of dropMenu(...) + + /* +// add a new 'place' into the Places bar. int addPlace(HWND hwnd, PFavLink plk) { HWND hwTB = GetDlgItem(hwnd, CID_PLACES); @@ -151,7 +216,10 @@ int addPlace(HWND hwnd, PFavLink plk) SendMessage(hwTB, TB_ADDBUTTONS, 1, (LPARAM) & tb); return 1; }*/ + /* +// Add a new favourite dir, first retrieving the path from the current view of the O&S dialog. +// *unfinished* int addFavourite(HWND hwnd) { //static char szBuf[2*MAX_PATH+1]; @@ -178,9 +246,16 @@ int addFavourite(HWND hwnd) return 0; } */ + +/* + * Given the handle to the O&S dialog, this does the magic to it, such as + * adding toolbar buttons, setting the focus and view mode, and adding items to + * the system menu. + * + * @returns 1, TODO:: There should be error indication, perhaps! + */ int openWide(HWND hwnd) { - dbg("DLL: openWide(%p)", hwnd); // set placement int w = gOwShared.szDim.cx; int h = gOwShared.szDim.cy; @@ -191,13 +266,14 @@ int openWide(HWND hwnd) // set view mode HWND hwDirCtl = GetDlgItem(hwnd, CID_DIRLISTPARENT); WORD vCmdID = viewToCmdID(gOwShared.iView); -// dbg("Sending message to set view, cmd id %d", vCmdID); + // set the view mode, by sending a fake command message. SendMessage(hwDirCtl, WM_COMMAND, MAKEWPARAM(vCmdID, 0), 0); + // set the focus! focusDlgItem(hwnd, gOwShared.iFocus); - // debug hook, to find menu cmd IDs #ifdef HOOK_SYSMSG + // debug hook, to find menu cmd IDs dbg("Hooking SYSMSG..."); ghSysMsgHook = SetWindowsHookEx( WH_SYSMSGFILTER, @@ -207,28 +283,30 @@ int openWide(HWND hwnd) ); dbg("Hooking returned %p", ghSysMsgHook); #endif + // Allow drag&drop onto window. Unfortunately this doesn't work for the + // directory list, as that is already set to accept drops, as a command to + // copy/move files. I would have to subclass this too, and that's rather + // more complicated. DragAcceptFiles(hwnd, TRUE); - //SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | WS_CAPTION | WS_SYSMENU); + // Insert item into the system menu (right-click on titlebar) HMENU hm = GetSystemMenu(hwnd, FALSE); AppendMenu(hm, MF_SEPARATOR | MF_DISABLED, 0, NULL); AppendMenu(hm, MF_STRING, OW_EXPLORE_CMDID, "&Locate current folder with Explorer..."); AppendMenu(hm, MF_STRING, OW_ABOUT_CMDID, "&About OpenWide..."); - addTBButton(hwnd); + addTBButton(hwnd); // add the toolbar button. /* +// Modify the dir-list view flags HWND hwShellCtl = GetDlgItem(hwnd, CID_DIRLISTPARENT); hwShellCtl = GetDlgItem(hwShellCtl, 1); ListView_SetExtendedListViewStyleEx(hwShellCtl, OW_LISTVIEW_STYLE, OW_LISTVIEW_STYLE ); - - HWND hwOv = createOverlayWindow(hwnd); - dbg("Created overlay window: %p", hwOv); - SetWindowPos(hwOv, HWND_TOP, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE); - SetActiveWindow(hwnd); - DragAcceptFiles(hwOv, TRUE);*/ +*/ return 1; -} +} // END openWide(...) + +/* Load the desktop folder into the dir list */ void showDesktop(HWND hwnd) { char * szDesk = GlobalAlloc(GPTR, MAX_PATH+1); @@ -246,17 +324,26 @@ void showDesktop(HWND hwnd) free(szOld); GlobalFree(szDesk); } -} +} // END showDesktop + +/* + * This is the callback for the subclassed O&S dialog window, and it handles + * all the extra functionality, passing along messages to the old callback + * function unless the behaviour is modified. + * + */ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { /* if( gbDbg ) { dbgWM(hwnd, msg, wp, lp); }*/ + + // retrieve a ptr to the extra information associated with the window. POWSubClassData pow = (POWSubClassData)GetProp(hwnd, OW_PROP_NAME); if( !pow ) - return DefWindowProc(hwnd, msg, wp, lp); + return DefWindowProc(hwnd, msg, wp, lp); // something's broken, so just allow default window function. static char buffer[MAX_PATH+1]; @@ -264,54 +351,51 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { case WM_INITDIALOG: { - dbg("DLL: INITDIALOG"); - LRESULT lRes = CallWindowProc(pow->wpOrig, hwnd, msg, wp, lp); - ShowWindow(hwnd, SW_HIDE); + // dbg("DLL: INITDIALOG"); + LRESULT lRes = CallWindowProc(pow->wpOrig, hwnd, msg, wp, lp); // call the old callback + ShowWindow(hwnd, SW_HIDE); // hide the window, until it's been magick-ed by openWide(...) return lRes; } break; + case WM_SHOWWINDOW: - if( wp && !pow->bSet ) + if( wp && !pow->bSet ) // catch the first SHOWWINDOW only, { pow->bSet = TRUE; openWide(hwnd); } break; - /*case WM_SIZE: - { - LRESULT lRes = CallWindowProc(pow->wpOrig, hwnd, msg, wp, lp); - int w = LOWORD(lp); - int h = HIWORD(lp); - MoveWindow( GetDlgItem(hwnd, CID_OVERLAY), 0,0, w,h, FALSE); - return lRes; - } - break;*/ - case WM_COMMAND: + + case WM_COMMAND: // handle custom toolbar button commands, etc. switch (LOWORD(wp)) { - case OW_ABOUT_CMDID: + case OW_ABOUT_CMDID: // about MessageBox(hwnd, "OpenWide is written by Luke Hudson. (c)2005", "About OpenWide", MB_OK); return 0; + // show desktop item, or click on button rather than + // dropdown (ie, defaults to show desktop menuitem) case OW_TBUTTON_CMDID: case OW_SHOWDESK_CMDID: showDesktop(hwnd); break; - case OW_EXPLORE_CMDID: + case OW_EXPLORE_CMDID: // Explore current dir in new Explorer window { + // Build a command line char *szParm = "/select,"; wsprintf(buffer, szParm); int len = strlen(szParm); LPARAM lpBuf = (LPARAM)buffer + (LPARAM)len; - dbg("CDM_GET..PATH, cbSize=%d, buffer = %p", MAX_PATH-len, lpBuf); + //dbg("CDM_GET..PATH, cbSize=%d, buffer = %p", MAX_PATH-len, lpBuf); len = SendMessage(hwnd, CDM_GETFOLDERPATH, MAX_PATH - len, lpBuf); //(LPARAM)(char *)((unsigned int)buffer + (unsigned int)len)); if (len) { - dbg("Getfolderpath returned len %d, path: \"%s\"",len, buffer); + // execute the command line ShellExecute(hwnd, NULL, "explorer.exe", buffer, NULL, SW_SHOWNORMAL); } - } + } // case return 0; /* +// Handling of favourites -- UNFININSHED case OW_ADDFAV_CMDID: doAddFave(hwnd); return 0; @@ -321,9 +405,10 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) getFavourite(hwnd, (int)LOWORD(wp)); } break;*/ - } + } // switch : command ids break; + // Handle notifications from the toolbar case WM_NOTIFY: { NMHDR *phdr = (NMHDR *)lp; @@ -344,6 +429,7 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) } break; + // handle notifications from the dir listview control case WM_PARENTNOTIFY: if( LOWORD(wp) == WM_CREATE) { @@ -355,13 +441,13 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) // dbg("Shell defview ctl created"); // subclass((HWND)lp, wpSubShellCtl, (LPARAM)hwnd); HWND hwLV = GetDlgItem((HWND)lp, 1); - DragAcceptFiles(hwLV, TRUE); if( hwLV ) { - if( GetWindowLong(hwLV, GWL_STYLE) & LVS_REPORT ) + if( GetWindowLong(hwLV, GWL_STYLE) & LVS_REPORT ) // if details view is in effect. { - //dbg("hwLV is in report mode -- setting extended style"); + // update style flags ListView_SetExtendedListViewStyleEx(hwLV, OW_LISTVIEW_STYLE, OW_LISTVIEW_STYLE ); + // Send Control+NumpadPlus to expand all the columns to fit contents INPUT in[4] = {0}; in[0].type = INPUT_KEYBOARD; in[0].ki.wVk = VK_CONTROL; @@ -378,10 +464,11 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) SetFocus(hwOld); } } - SetTimer(hwnd, 251177, 1, NULL); + //SetTimer(hwnd, 251177, 1, NULL); // set a timer, for what? TODO:: Check this } } break; +/// Deprecated -- I think? TODO: Check /* case WM_TIMER: if( wp == 251177 ) { @@ -399,7 +486,7 @@ LRESULT CALLBACK WINAPI wpSubMain(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) } break; s*/ - case WM_SYSCOMMAND: + case WM_SYSCOMMAND: // Handle system menu commands { int cmdId = wp & 0xFFF0; if( cmdId == OW_ABOUT_CMDID ) @@ -420,18 +507,7 @@ s*/ } } break; -/* case WM_NOTIFY: - { - NMHDR * phdr = (NMHDR *)lp; - HWND hwSV = GetDlgItem(hwnd, CID_DIRLISTPARENT); - hwSV = GetDlgItem(hwSV, CID_DIRLIST); - if( phdr->hwndFrom == hwSV ) - { - dbg("Got notify %d from listview", phdr->code); - } - } - break;*/ -/* case WM_NCPAINT: +/* case WM_NCPAINT: // handle painting of non-content area, ie. window titlebar and frame. { HDC hdc = GetWindowDC(hwnd); HBRUSH hbrOld; @@ -450,17 +526,17 @@ s*/ ReleaseDC(hwnd, hdc); } break;*/ - case WM_DROPFILES: + case WM_DROPFILES: // Handle files which are dragged&dropped onto window. { HANDLE hDrop = (HANDLE)wp; int nFiles = DragQueryFile(hDrop, (UINT)-1, NULL, 0); - //dbg("%d files dropped on main window %p", nFiles, hwnd); if( nFiles == 1 ) { if( DragQueryFile(hDrop, 0, buffer, MAX_PATH) ) { if( PathIsDirectory(buffer) ) { + // Set the view to dropped directory path. SetDlgItemText(hwnd, CID_FNAME, buffer); SendDlgItemMessage(hwnd, CID_FNAME, EM_SETSEL, -1, -1); SendDlgItemMessage(hwnd, CID_FNAME, EM_REPLACESEL, FALSE, (LPARAM)"\\"); @@ -481,22 +557,29 @@ s*/ if( openSharedMem() ) { //dbg("DLL: Opened shared memory"); - if( --gpSharedMem->refCount < 0 ) + if( --gpSharedMem->refCount < 0 ) // Update the count for number of users of subclass code gpSharedMem->refCount = 0; - //dbg("DLL: dec'd refCount to %d, posting msg %x to app window %p", gpSharedMem->refCount, gpSharedMem->iCloseMsg, gpSharedMem->hwListener); + //dbg("DLL: dec'd refCount to %d, posting msg %x to app window %p", gpSharedMem->refCount, + // gpSharedMem->iCloseMsg, gpSharedMem->hwListener); + + // Notify application that another O&S dialog has closed PostMessage( gpSharedMem->hwListener, gpSharedMem->iCloseMsg, 0,0); + // Release any hold on the shared memory. closeSharedMem(); - //dbg("DLL: Closed shared memory"); } + // Remove subclassing WNDPROC wpOrig = pow->wpOrig; unsubclass(hwnd); + // Call original WM_DESTROY return CallWindowProc(wpOrig, hwnd, msg, wp, lp); } break; } return CallWindowProc(pow->wpOrig, hwnd, msg, wp, lp); -} +} // END wpSubMain + +// Subclass the listview control -- TODO: I think this is un-needed LRESULT CALLBACK WINAPI wpSubShellCtl(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { POWSubClassData pow = (POWSubClassData)GetProp(hwnd, OW_PROP_NAME); @@ -523,8 +606,12 @@ LRESULT CALLBACK WINAPI wpSubShellCtl(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) break; } return CallWindowProc(pow->wpOrig, hwnd, msg, wp, lp); -} +} // END wpSubShellCtl + +/* Check whether this application has been excluded, ie, whether we should not + * mess with its O&S dialogs + */ static BOOL isExcluded(const char *szApp) { BOOL bEx = FALSE; @@ -538,6 +625,9 @@ static BOOL isExcluded(const char *szApp) } +/* + * Investigate the WM_CREATEPARAMS message + */ static void dbgCreateParams(LPVOID lpCreateParams) { UNALIGNED short * pcbData = (UNALIGNED short *)lpCreateParams; @@ -574,6 +664,10 @@ static void dbgCreateParams(LPVOID lpCreateParams) dbg("CreateParams is NULL (%p)", pcbData); } + +/* + * This is the main hook callback, which watches window creation, and + * subclasses those which appear (with luck, correctly) to be O&S dialogs */ static LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) { @@ -640,8 +734,11 @@ static LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) } // Call the next hook, if there is one return CallNextHookEx(ghMsgHook, nCode, wParam, lParam); -} +} // END CBTProc +/* + * Access to shared memory, and copy data to cache + */ int openSharedMem(void) { if( ghMap != NULL || gpSharedMem != NULL ) @@ -650,7 +747,7 @@ int openSharedMem(void) if(!waitForMutex()) return 0; - ghMap = OpenFileMapping(FILE_MAP_WRITE, TRUE, OW_SHARED_FILE_MAPPING); + ghMap = OpenFileMapping(FILE_MAP_WRITE, FALSE, OW_SHARED_FILE_MAPPING); if( ghMap ) { gpSharedMem = (POWSharedData)MapViewOfFile(ghMap, FILE_MAP_WRITE, 0,0, 0); @@ -663,8 +760,11 @@ int openSharedMem(void) closeSharedMem(); } return 0; -} +} // END openSharedMem +/* + * Release any access to shared memory we may hold. + */ void closeSharedMem(void) { if( gpSharedMem ) @@ -678,8 +778,15 @@ void closeSharedMem(void) ghMap = NULL; } releaseMutex(); -} +} // END closeSharedMem + +/* + * Simply refreshes our cache of the shared data. + * Use this as a preference to the open/close-SharedMem functions. + * + * @returns 1 if successful, 0 on error. + */ int getSharedData(void) { int rv = 0; @@ -692,6 +799,9 @@ int getSharedData(void) } +/* + * exported function to setup the CBT hook, which watches window creation. + */ int DLLEXPORT setHook(void) { if(ghMsgHook != NULL) @@ -719,6 +829,9 @@ int DLLEXPORT setHook(void) } +/* + * Exported function to remove the CBT hook. + */ int DLLEXPORT rmvHook(void) { if( !ghMsgHook ) @@ -742,6 +855,8 @@ int DLLEXPORT rmvHook(void) /* +// This callback handles SYSMSG hooks, which I have used to investigate the O&S dialog behaviour. +// static LRESULT CALLBACK SysMsgProc(int nCode, WPARAM wParam, LPARAM lParam) { HWND hwnd; @@ -797,6 +912,11 @@ static LRESULT CALLBACK SysMsgProc(int nCode, WPARAM wParam, LPARAM lParam) } */ + + +/* + * Main DLL entry point + */ BOOL DLLEXPORT WINAPI DLLPROC(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) diff --git a/openwidedll.h b/openwidedll.h index baadcb6..c8e78a0 100755 --- a/openwidedll.h +++ b/openwidedll.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef C__Data_Code_C_openwide_openwidedll_proto_h_H #define C__Data_Code_C_openwide_openwidedll_proto_h_H #pragma once @@ -6,6 +28,7 @@ #define DLLEXPORT __declspec(dllexport) +// Different view and focus options for the Open/Save dialogs enum ViewMode {V_LGICONS, V_SMICONS, V_LIST, V_DETAILS, V_THUMBS, V_TILES, V_MAX}; enum FocusMode {F_DIRLIST, F_FNAME, F_FTYPE, F_PLACES, F_LOOKIN, F_MAX}; diff --git a/openwidedll.ppj b/openwidedll.ppj index 9313018..fae61d9 100755 --- a/openwidedll.ppj +++ b/openwidedll.ppj @@ -8,12 +8,12 @@ POC_PROJECT_TYPE = 1# POC_PROJECT_PATH = .# POC_PROJECT_ARGUMENTS = # POC_PROJECT_WORKPATH = # -POC_PROJECT_EXECUTOR = # +POC_PROJECT_EXECUTOR = C:\code\C\openwide\openwide.exe# CC = pocc.exe# AS = ml.exe# RC = porc.exe# LINK = polink.exe# -CCFLAGS = -Tx86-coff -MT -Os -W2 -Gz -Ze -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0500 -DBUILDNO=1 -DDEBUG # +CCFLAGS = -Tx86-coff -MT -Os -W2 -Gz -Ze -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0500 -DBUILDNO=1 -DDEBUG # ASFLAGS = -W1 -Cu -c -nologo -coff# RCFLAGS = # LINKFLAGS = -subsystem:windows -machine:ix86 -dll kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib shell32.lib shlwapi.lib# diff --git a/openwidedll.rc b/openwidedll.rc index 30cc84b..d33d08a 100755 --- a/openwidedll.rc +++ b/openwidedll.rc @@ -7,5 +7,5 @@ LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_NZ -IDI_TBICON ICON "tray.ico" +IDI_TBICON ICON "icons\\tray.ico" diff --git a/openwidedllres.h b/openwidedllres.h index 49cd149..3821c98 100755 --- a/openwidedllres.h +++ b/openwidedllres.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + // INCLUDE FILE generated by "Pelles C for Windows, version 3.00". diff --git a/openwideres.h b/openwideres.h index 3bf6214..761cf23 100755 --- a/openwideres.h +++ b/openwideres.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + /* Weditres generated include file. Do NOT edit */ #define IDD_MAIN 1001 #define IDD_PLACEMENT 1002 @@ -30,3 +52,4 @@ #define IDB_ADDEX 4006 #define IDB_RMVEX 4007 #define IDI_TBICON 8002 +#define IDD_MENU 1007 diff --git a/ow.ico b/ow.ico index 06ab582e9c3440798ff8172bea86f483b105e54d..0ce6755df2863b38c1b1b432ab9f44bac2fc5076 100755 GIT binary patch delta 47 zcwPZ70MP&DB-$jf;sLYd0pbI*#|38rlQ0JwvrGp{1(TNyE|bO#A_o!@5+oxd6tnUS FbOpb-5D5SP delta 65 zcwW1u@=RsJBSt1(-p!8~A2BoXZa%`A4&qMMW|snqy0Uw*GV)ID=g|X_dwG<&c!h+7 QRFsu@MR+$q<0)YU0Bk diff --git a/owDLLInc.h b/owDLLInc.h index 1db3842..776e39d 100755 --- a/owDLLInc.h +++ b/owDLLInc.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef LINGO_OPENWIDE_INC_H #define LINGO_OPENWIDE_INC_H diff --git a/owDLLUtil.c b/owDLLUtil.c index 92e25d9..0a85740 100755 --- a/owDLLUtil.c +++ b/owDLLUtil.c @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #include #include #include diff --git a/owSharedUtil.c b/owSharedUtil.c index acfef81..aa2de69 100755 --- a/owSharedUtil.c +++ b/owSharedUtil.c @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #include #include #include @@ -10,8 +32,11 @@ //#include "openwideres.h" #include "owSharedUtil.h" -/* Copied on : Tue Jul 12 18:59:49 2005 */ -/** Function source : C:\Data\Code\C\openwide\owDLLUtil.c */ +/* + * Printf-style logging using OutputDebugString. + * This is best monitored using the free DbgMon program from Sysinternals. + * @see www.sysinternals.com + */ void dbg(char *szError, ...) { #ifdef DEBUG @@ -24,8 +49,9 @@ void dbg(char *szError, ...) #endif } -/* Copied on : Wed Jul 13 23:03:36 2005 */ -/** Function source : C:\Data\Code\C\Proto\gui.c */ +/* + * Get the text of control 'uID' from window 'hwnd' + */ char * getDlgItemText(HWND hwnd, UINT uID) { HWND hwCtl = GetDlgItem(hwnd, uID); @@ -45,8 +71,7 @@ char * getDlgItemText(HWND hwnd, UINT uID) } -/* Copied on : Tue Jul 12 18:59:04 2005 */ -/** Function source : C:\Data\Code\C\openwide\owDLLUtil.c */ +/* From MS sample code */ DWORD GetDllVersion(LPCTSTR lpszDllName) { HINSTANCE hinstDll; @@ -90,7 +115,8 @@ DWORD GetDllVersion(LPCTSTR lpszDllName) return dwVersion; } -/** Function source : C:\Data\Code\C\openwide\owDLLUtil.c */ + +/* Determines if winXP is running -- TODO: This may need checking for newer versions ? */ BOOL isWinXP(void) { return GetDllVersion("Shell32.dll") >= PACKVERSION(6,00); @@ -98,14 +124,15 @@ BOOL isWinXP(void) -/* Copied on : Tue Jul 12 19:00:01 2005 */ -/** Function source : C:\Data\Code\C\openwide\owUtil.c */ +/* Wrapper around RegCloseKey, used for consistency with the other reg* functions */ void regCloseKey(HKEY hk) { RegCloseKey(hk); } -/** Function source : C:\Data\Code\C\openwide\owUtil.c */ +/* Create the registry subkey 'szSubKey' under the key 'hkParent'. + * Note that hkParent can also be one of the HKEY_* constants, such as HKEY_CURRENT_USER + */ HKEY regCreateKey(HKEY hkParent, const char *szSubKey){ LONG res; HKEY hk; @@ -114,7 +141,7 @@ HKEY regCreateKey(HKEY hkParent, const char *szSubKey){ return ( res == ERROR_SUCCESS ) ? hk : NULL; } -/** Function source : C:\Data\Code\C\openwide\owUtil.c */ +/* Delete (recursively) the registry subkey 'szSubKey' under 'hkParent' */ int regDeleteKey(HKEY hkParent, const char *szSubKey) { DWORD rv; @@ -122,7 +149,13 @@ int regDeleteKey(HKEY hkParent, const char *szSubKey) return rv; } -/** Function source : C:\Data\Code\C\openwide\owUtil.c */ +/* Enumerate the values store within the registry key hkRoot, calling + * the callback function fp once for each value. + * + * The callback works as follows: + * + * TODO:: Fill this in ! + */ int regEnumValues(HKEY hkRoot, RegValEnumProc fp, LPVOID param) { DWORD ccBuf = regGetMaxValueNameLength(hkRoot, NULL); @@ -313,7 +346,7 @@ void Warn(char *szError, ...) char szBuff[256]; va_list vl; va_start(vl, szError); - _vsnprintf(szBuff, 256, szError, vl); // print error message to string + vsnprintf(szBuff, 256, szError, vl); // print error message to string OutputDebugString(szBuff); MessageBox(NULL, szBuff, "Error", MB_OK); // show message va_end(vl); diff --git a/owSharedUtil.h b/owSharedUtil.h index d23f1e8..f1a1634 100755 --- a/owSharedUtil.h +++ b/owSharedUtil.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef C__Data_Code_C_openwide_owSharedUtil_h #define C__Data_Code_C_openwide_owSharedUtil_h #pragma once diff --git a/owUtil.c b/owUtil.c index 8cb9e8a..904e1d8 100755 --- a/owUtil.c +++ b/owUtil.c @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #include #include #include @@ -11,6 +33,8 @@ #include "owutil.h" #include "owSharedUtil.h" + +/* Attempt to convert from dialog units (measures used in .rc files) to pixels onscreen */ int dlgUnits2Pix(HWND hwnd, int units, BOOL bHorz) { RECT r; @@ -34,7 +58,7 @@ void Error(char *szError, ...) char szBuff[256]; va_list vl; va_start(vl, szError); - _vsnprintf(szBuff, 256, szError, vl); // print error message to string + vsnprintf(szBuff, 256, szError, vl); // print error message to string OutputDebugString(szBuff); MessageBox(NULL, szBuff, "Error", MB_OK); // show message va_end(vl); diff --git a/owUtil.h b/owUtil.h index 31d2d76..4d0d273 100755 --- a/owUtil.h +++ b/owUtil.h @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef OW_UTIL_H #define OW_UTIL_H diff --git a/psDlg.c b/psDlg.c index e7f85d9..ff3d68c 100755 --- a/psDlg.c +++ b/psDlg.c @@ -1,3 +1,25 @@ +/* + * Openwide -- control Windows common dialog + * + * Copyright (c) 2000 Luke Hudson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #include #include #include "openwidedll.h" @@ -193,7 +215,7 @@ static int saveExcludes2Registry(HWND hwnd, UINT uID) HWND hwLB = GetDlgItem(hwnd, uID); if( !hwLB ) return 0; - static char szKey[32]; +// static char szKey[32]; regDeleteKey(HKEY_CURRENT_USER, OW_REGKEY_EXCLUDES_NAME); HKEY hk = regCreateKey(HKEY_CURRENT_USER, OW_REGKEY_EXCLUDES_NAME); if( hk ) diff --git a/tbIcon-layers.ico b/tbIcon-layers.ico index 40e1bf1831781df990b746eb2c8ea68e0a7def97..aad7b97030cb371c0c811e577a32b3c025a8b61f 100755 GIT binary patch delta 288 zcwW19i>c)n(}oGGT&8fac@Aq9%VrL)D8|jn+!2hE_wYn*7U!MJw0SjuB%9ieKg7Vz zc4F(eHosNaz-YbiF5mTEeAj*g=`(L{{NX3`E`5cl<=%Uj=juqu#&h~D_rZre zm%hR^a__y%bM+^(Q9v$G5FxU8w^AGn(6y54)<7~ueUAWdK#*{8xz@LTKm=s)PL|V< z0!mqEID!0FrSX