NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Work in progress / Volume shadow copy client
« Last post by Vortex on Yesterday at 08:38:28 pm »
vscopy is a command-line tool to create volume shadow copies. Windows 7 and upwards are supported.

Code: [Select]
vscopy <volume_letter> <assigned_letter> <file_to_execute>
Example :

Code: [Select]
vscopy C: V: Backup.bat
Backup.bat :

Code: [Select]
copy V:\Data\*.doc D:\Backup /y
V: is the volume copy of C:  After the creation of the volume shadow copy, Backup.bat is executed to copy files in the folder C:\Data

Many thanks to TimoVJL for the conversion of the C++ code to Pelles C. Also, thanks to Frankie for his SDK for PellesC.
2
Beginner questions / Re: Is there any easier abroad to made gui in C?
« Last post by TimoVJL on October 16, 2018, 05:32:14 pm »
And if you get bored with WindowsX.h, check this:
https://forum.pellesc.de/index.php?topic=2486.0
and tune it for a your needs.
3
Beginner questions / Re: Is there any easier abroad to made gui in C?
« Last post by DMac on October 15, 2018, 05:27:32 am »
There are a number of tools that I like to use that make standard windows Gui programming fairly easy.

1) When I begin the project I'll use the "Windows Application" wizard and select the "dialog based program" option.  This will create some initial code including a dialog in the resource editor that I can modify in the dialog editor.

2) I use https://www.codeproject.com/Articles/4948/Message-Cracker-Wizard-for-Win-SDK-Developers to make the window procedure, message cracking macros, and message processing functions.  If I am writing a windows procedure for a dialog based application I'll change HANDLE_MSG to HANDLE_DLGMSG in the generated code.

3) If I want to handle button clicks I'll use the WM_COMMAND message cracker macro
Code: [Select]
HANDLE_DLGMSG(hwndDlg, WM_COMMAND, Main_OnCommand);
and then break out the events in the WM_COMMAND message processing function like so:
Code: [Select]
static VOID Main_OnCommand(HWND hwnd, INT id, HWND hwndCtl, UINT codeNotify)
{
    switch (id)
    {
        case CMD_OPEN:
            CmdOpen_Click(hwnd);
            break;
        case CMD_SAVE:
            CmdSave_Click(hwnd);
            break;
           //etc...

and so:
Code: [Select]
void CmdSave(HWND hwnd)
{
     // TODO: Save code here
}

These tools take a lot of guess work out of GUI coding and were a great help to me when I was just beginning.

4
Bug reports / V9.00.9 Missing timespec_get() for single thread.
« Last post by Abraham on October 14, 2018, 08:26:23 pm »
Fails with single thread
-std:C17 -Tx64-coff -arch:SSE2 -Ot -Ob1 -fp:precise -W2 -Zx

POLINK: error: Unresolved external symbol 'timespec_get'
POLINK: fatal error: 1 unresolved external(s).

It is okay with multi-thread either static -MT or dynamic -MD
-std:C17 -Tx64-coff -arch:SSE2 -MT -Ot -Ob1 -fp:precise -W2 -Zx
-std:C17 -Tx64-coff -arch:SSE2 -MD -Ot -Ob1 -fp:precise -W2 -Zx

The documentation does not mention that multi-threading is required.
5
Bug reports / Re: remainder function
« Last post by Pelle on October 14, 2018, 05:57:33 pm »
The result seems correct. The help file doesn't say much, it only echoes what the C standard says. If I find myself having a really great day (unlikely), I may improve the text for this function...
6
Yes, confirmed. I will see what I can do. The Microsoft web control I'm using is no great joy to work with...  :(
7
User contributions / Re: SGL - win32 made simple!
« Last post by cnoob on October 13, 2018, 04:51:21 pm »
Henri's code already portable because it's just a thin wrapper for WinAPI. Any compiler has mature enough WinAPI support could compile SGL.

This is what I've done to compile SGL under MinGW64 i686-sjlj 8.1.0 (notice: sjlj, dwarf can't throw exception on non-dwarf aware dll like of Windows):

First, replace _stdcall with __stdcall. Pelles compiles _stdcall just fine but MinGW doesn't. I #define _stdcall __stdcall.

Second, #pragma comment is not understood by MinGW so I've to check each pragma to know which lib SGL depends on, on MinGW there's something like -Wl import bla bla for auto import needed lib but I don't trust it. So far SGL needs: advapi32, gdi32, msimg32, gdiplus, shlwapi, opengl32, glu32 and comctl32.

Third, SGL seemed to support only Windows >= 7. On sgl_debug.c MinGW will throw error WM_GESTURE not defined. It's because MinGW still target Windows ver 0x502 (very old). You've to edit sdkddkver.h and _mingw.h to change all on the define of win ver and nt to of Win7 0x601 (my computer so far, I didn't try Win8, Win10...).

Now it happy compiles and provide libSGL.a (just like your .lib), libSGL.dll and libSGL.def.

All of the example recompiled with MinGW worked except sample_text will crash that I didn't know why. It's run ok with Pelles C's compiled version.
8
Beginner questions / Re: How to use libCello with Pelles C?
« Last post by cnoob on October 13, 2018, 04:33:49 pm »
Version 2.1.0 improved Cello can use native Win32 thread now (as the author claimed). This library sucks. It only works with MinGW64 i686-posix-dwarf 8.1.0 (the version I first tried) and none other version of even the same compiler (5.4.0, 6.3.0, 7.3.0 all failed). It seemed it only works fine with dwarf exception not sjlj. Despite compiled OK but when linking it's always show error (on CodeBlocks). I gave up on it and try c-vector on github (for MinGW). Very OK.

p/s: I didn't know Pelles C supports c11 threads.h, MinGW didn't so I think ...  ;D Pelles' threads.h works great. Problem solved  :D
9
Test / Database error in forum
« Last post by bitcoin on October 13, 2018, 03:21:58 pm »
I have some error



this not disturb me, but i mean , that it is bad. check fix database in admin panel.

10
Bug reports / Re: remainder function
« Last post by jack on October 12, 2018, 07:16:05 pm »
it may be that you have a misunderstanding of the function
from The GNU C Library documentation
Quote
Function: double remainder (double numerator, double denominator)
These functions are like fmod except that they round the internal quotient n to the nearest integer instead of towards zero to an integer. For example, remainder (6.5, 2.3) returns -0.4, which is 6.5 minus 6.9.

The absolute value of the result is less than or equal to half the absolute value of the denominator. The difference between fmod (numerator, denominator) and remainder (numerator, denominator) is always either denominator, minus denominator, or zero.

If denominator is zero, remainder signals a domain error.
Pages: [1] 2 3 ... 10