To Top Page | Previous Page | Next Page
Open the .rc file you exported last time.
Start RisohEditor, select "Open..." from the "File" menu, move to the previously saved location and select the previously saved file.
If it loads correctly, the resource item is added to the tree view.
If you expand all tree views, you can see "RT_DIALOG (5)" → "1" → "Japanese (Japan) (1041)".
Double-click "Japanese (Japan) (1041)" to open "Edit Dialog".
Now add a STATIC control (label). Right-click the contents of "Edit Dialog" and select "Add Control...".
The following "Add Control" dialog opens.
Select "LTEXT" from "Predefined Controls".
The "window class name" will automatically become "STATIC". Please enter text of "Hello, Win32 resource" to "Caption" text box. The "caption" is the text that is displayed.
(Translation Note: "Win32リソースさんこんにちは" means "Hello, Win32 resource")
Then press the "OK" button. A label has been added to "Edit Dialog".
It seems to be a little small, so please adjust the position and size of this label with the mouse.
Save as before. If you are asked to confirm overwriting, click Yes.
Let's open the saved file "kessaku.rc" with a text editor.
You can see that the contents edited in the dialog are saved as a DIALOG statement.
The resource data created in this way can be used in the DialogBox API function of Win32API in C/C++ as follows after importing it as a .rc file into the project.
#include <windows.h> INT_PTR CALLBACK DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: EndDialog(hwnd, IDOK); break; case IDCANCEL: EndDialog(hwnd, IDCANCEL); break; } } return 0; } INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(1), NULL, DialogProc); return 0; }
Please use the MAKEINTRESOURCE macro because the resource item name is an integer "1".
Operation | Action for operation |
---|---|
Click a control | Select the control. |
Drag inside a control | Move the control. |
Drag the border of a control | Change the size of the control. |
Ctrl+Click the control | Select controls by toggling. |
Shift+Click the control | Select controls additionally. |
Surround the control by dragging the dialog | Select the controls within the range. |
Right click on the dialog | Display the command menu of the dialog. |
Right click on the control | Display the command menu of the control |
Ctrl+X | Cuts the selected control and copies it to internal memory. |
Ctrl+C | Copies the selected control to internal memory. |
Ctrl+V | Paste the copied control. |
Ctrl+D | Displays/hides the control index (ordinal number). |
Arrow Up | Move the selected control up a little. |
Arrow Down | Move the selected control down a little. |
Arrow Left | Move the selected control slightly to the left. |
Arrow Right | Move the selected control slightly to the right. |
Shift+Up | Slightly reduce the height of the control. |
Shift+Down | Extend the height of the control a little. |
Shift+Left | Make the width of the control a little smaller. |
Shift+Right | Extend the width of the control a little. |
Tab | Move to the next control. |
Shift+Tab | Move to the previous control. |
Ctrl+A | Select all controls. |
Del | Delete the selected controls. |
You can right-click to add controls and edit properties.
In RisohEditor, you can quickly operate multiple controls together.