Page 1 of 1

rc/res to source

Posted: Mon Jul 25, 2011 1:53 pm
by Otto
Is there a tool to convert a resource dialog to hardcoded- dbase style?
Thanks in advance
Otto

Re: rc/res to source

Posted: Mon Jul 25, 2011 4:04 pm
by nageswaragunupudi
\fwh\samples\rc2prg.prg

Re: rc/res to source

Posted: Tue Aug 02, 2011 5:51 am
by fp
I use ResEdit in this case: open the DLL- Res- or RC-File with ResEdit and click on "Datei / Quelltext anzeigen / c/c++-Quelltext" (I use the german version of ResEdit).

Re: rc/res to source

Posted: Tue Aug 02, 2011 8:07 am
by MdaSolution
but you can save the rc on @x,y ... ?

and how ?

I see only for a sample

// Generated by ResEdit 1.5.5
// Copyright (C) 2006-2010
// http://www.resedit.net

HINSTANCE hInst = GetModuleHandle(0);
WNDCLASSEX wcex;
ZeroMemory(&wcex, sizeof wcex);
wcex.cbSize = sizeof wcex;
wcex.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wcex.lpszMenuName = 0;


wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = DefWindowProc;
wcex.hInstance = hInst;
wcex.hIcon = LoadIcon(0, (LPCTSTR)IDI_APPLICATION);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.lpszClassName = WndClass00;
RegisterClassEx(&wcex);

HFONT hfont0 = CreateFont(-11, 0, 0, 0, 0, FALSE, FALSE, FALSE, 1, 0, 0, 0, 0, ("MS Sans Serif"));
HWND hwnd = CreateWindowEx(0, ("WndClass0"), ("Dialog"), WS_CAPTION | WS_VISIBLE | WS_GROUP | WS_POPUP | WS_SYSMENU, 0, 0, -29651874, 522, 0, 0, hInst, 0);
HWND hCtrl0_0 = CreateWindowEx(0, ("TxBrowse"), (""), 0x50010000, 15, 21, 545, 174, hwnd, (HMENU)700, hInst, 0);
SendMessage(hCtrl0_0, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_1 = CreateWindowEx(0, WC_BUTTON, (""), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 563, 114, 47, 81, hwnd, (HMENU)710, hInst, 0);
SendMessage(hCtrl0_1, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_2 = CreateWindowEx(0, WC_BUTTON, (""), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 611, 114, 47, 81, hwnd, (HMENU)715, hInst, 0);
SendMessage(hCtrl0_2, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_3 = CreateWindowEx(0, WC_EDIT, 0, WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL | ES_PASSWORD | ES_WANTRETURN, 107, 223, 549, 39, hwnd, (HMENU)550, hInst, 0);
SendMessage(hCtrl0_3, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_4 = CreateWindowEx(0, WC_BUTTON, ("Q"), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 14, 270, 63, 55, hwnd, (HMENU)500, hInst, 0);
SendMessage(hCtrl0_4, WM_SETFONT, (WPARAM)hfont0, FALSE);
HWND hCtrl0_5 = CreateWindowEx(0, WC_BUTTON, ("W"), WS_VISIBLE | WS_CHILD | WS_TABSTOP, 78, 270, 63, 55, hwnd, (HMENU)501, hInst, 0);
SendMessage(hCtrl0_5, WM_SETFONT, (WPARAM)hfont0, FALSE);

Re: rc/res to source

Posted: Tue Aug 02, 2011 8:34 am
by MdaSolution
And rc2prg not run ok because it not respect the right coordinates
On windows Seven we saw there is a leak memory and we tried to make all dialog on sources code for this problem and insert on rc only some bitmaps ans insert ona folder the other bitmaps.
the Exe is fast and not lose memory