/**** Private Profile stuff *****/ DWORD FAR PASCAL GetPrivateProfileLong(LPCSTR lpszSection, LPCSTR lpszEntry, DWORD DefaultValue, LPCSTR lpszFileName); Simular to GetPrivateProfileInt(), but uses longs instead of int BOOL FAR PASCAL GetPrivateProfileBool(LPCSTR lpszSection, LPCSTR lpszEntry, BOOL DefaultValue, LPCSTR lpszFileName); Get boolean value from profile. This function knows about yes/no/Y/N/0/1 BOOL FAR PASCAL WritePrivateProfileInt(LPCSTR lpszSection, LPCSTR lpszEntry, UINT Value, BOOL fSigned, LPCSTR lpszFileName); This function is missing in the Windows API BOOL FAR PASCAL WritePrivateProfileLong(LPCSTR lpszSection, LPCSTR lpszEntry, DWORD Value, BOOL fSigned, LPCSTR lpszFileName); Simular to WritePrivateProfileInt(), but uses long instead of int BOOL FAR PASCAL WritePrivateProfileBool(LPCSTR lpszSection, LPCSTR lpszEntry, BOOL Value, int Format, LPCSTR lpszFileName); format: 0=> 0/1; 1=>No/Yes; 2=>Y/N Otherwise it is just what you expect /**** Dialog controls <-> Profile extras *****/ void FAR PASCAL LoadCheckBoxFromProfile(HWND hWndDlg, int ID, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName, int Default); The int from the profile is used for checking the checkbox. void FAR PASCAL SaveCheckBoxToProfile(HWND hWndDlg, int ID, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName); void FAR PASCAL LoadRadioButtonFromProfile(HWND hWndDlg, int idFirstButton, int idLastButton, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName, int Default, int base); void FAR PASCAL SaveRadioButtonToProfile(HWND hWndDlg, int idFirstButton, int idLastButton, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName, int base); void FAR PASCAL LoadEditFieldFromProfile(HWND hWndDlg, int ID, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName, LPCSTR Default); A maximum of 128 characters can be loaded void FAR PASCAL SaveEditFieldToProfile(HWND hWndDlg, int ID, LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszFileName); A maximum of 256 characters can be saved /***** Window position <-> profile ********/ BOOL FAR PASCAL StoreWindowPos(LPCSTR lpszAppName, LPCSTR lpszKeyName, HWND hwnd); Stores the current window size, position and minimize/restore/maximize state in a profile. Returns success or not BOOL FAR PASCAL RestoreWindowPos(LPCSTR lpszAppName, LPCSTR lpszKeyName, HWND hwnd); Restores the window size, position and minimize/restore/maximize state from a profile. If the return value is TRUE the information was restored. If the return value is FALSE the information was not restored. /***** miscellanous ******/ LONG FAR PASCAL GetWindowStyle(HWND hwnd); Corresponds to GetWindowLong(hwnd,GWL_STYLE). If compiling with C++ this function is inlined. If compiling with standard C it is a true function. WNDPROC FAR PASCAL SubclassWindow(HWND hwnd, WNDPROC lpwndprocNew); Subclasses the window by replacing the window procedure by lpwndprocNew. Returns the old window procedure. The return value is NULL if an error occurs. BOOL FAR PASCAL CalcFrameRect(HWND hwnd, LPRECT lprect, BOOL isFrame); Calculates the window size and position, or the client size and position. hwnd The window to calculate the frame or the client area of lprect A pointer to a rectangle. This rectangle must be screen coordinates. If isFrame is true the rectangle is the window rectangle and the rectangle pointed to by this parameter will be replaced with the corresponding client rectangle. If isFrame is false the rectangle is the client rectangle and the rectangle pointed to by this parameter will be replaced with the corresponding window rectangle. isFrame If true the lprect points to a window rectangle otherwise lprect points to the window rectangle Example: Change the client area to 600x400 while keeping the position RECT r; GetClientRect(hwnd,&r); r.right = r.left+600; r.bottom = r.top+400; CalcFrameRect(hwnd,&r,FALSE); SetWindowPos(hwnd,NULL,r.left,r.top,r.right-r.left,r.bottom-r.top,SWP_NOACTIVATE|SWP_NOZORDER); BOOL FAR PASCAL DrawWindowBitmap(HDC hdc, HBITMAP hbm, const LPRECT lpcSrcRect, const LPPOINT lpcDstPoint); Draw the bitmap hbm in the DC hdc at the position lpDstPoint. If lpcSrcRect is NULL the entire bitmaps is drawn otherwise the area specified by lpcSrcRect is drawn. The return value is TRUE on success otherwise it is FALSE.