Click here to Skip to main content
15,899,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Converting Bitmaps to Toolbars Pin
Nelek31-May-12 13:22
protectorNelek31-May-12 13:22 
AnswerRe: Converting Bitmaps to Toolbars Pin
sdancer7531-May-12 20:18
sdancer7531-May-12 20:18 
GeneralRe: Converting Bitmaps to Toolbars Pin
Iain Clarke, Warrior Programmer3-Jun-12 1:46
Iain Clarke, Warrior Programmer3-Jun-12 1:46 
QuestionClonal Selection Classification Pin
incorrect member30-May-12 7:36
incorrect member30-May-12 7:36 
AnswerRe: Clonal Selection Classification Pin
Richard MacCutchan30-May-12 11:35
mveRichard MacCutchan30-May-12 11:35 
GeneralRe: Clonal Selection Classification Pin
enhzflep30-May-12 12:20
enhzflep30-May-12 12:20 
AnswerRe: Clonal Selection Classification Pin
Aescleal30-May-12 21:45
Aescleal30-May-12 21:45 
QuestionWin32 Forms properties/variables Pin
Brandon-X1200030-May-12 1:51
Brandon-X1200030-May-12 1:51 
Hello,

I'm creating this Windows Forms application (see code below):

#include <windows.h>

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = "SysFrzX_mGui";

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    wincl.hMaximize = false;
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
    
//    center_window(hwnd, width, height);

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           "",                  /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           500,                 /* The programs width */
           400,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;
}


/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}


I see things like hIcon and hCursor from wincl, what I want is, what is a list of those things (like the hIcon and hCursor). Similar to Visual Basic forms, where properties like Enabled, Visible, Text, Opacity, etc. And this massive code block is in the programming language C.
Simple Thanks and Regards,
Brandon T. H.

Been programming in Visual Basic for 4 years this point forward, and is very good at it (I can even create programs completely on code, without dragging those items from the toolbox). Programming C++ for 1 year so far and the same with C#.

Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

AnswerRe: Win32 Forms properties/variables Pin
enhzflep30-May-12 2:00
enhzflep30-May-12 2:00 
GeneralRe: Win32 Forms properties/variables Pin
Brandon-X1200030-May-12 3:02
Brandon-X1200030-May-12 3:02 
GeneralRe: Win32 Forms properties/variables Pin
enhzflep30-May-12 3:09
enhzflep30-May-12 3:09 
AnswerRe: Win32 Forms properties/variables Pin
Richard MacCutchan30-May-12 2:03
mveRichard MacCutchan30-May-12 2:03 
GeneralRe: Win32 Forms properties/variables Pin
Aescleal30-May-12 7:14
Aescleal30-May-12 7:14 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan30-May-12 7:19
mveRichard MacCutchan30-May-12 7:19 
GeneralRe: Win32 Forms properties/variables Pin
Aescleal30-May-12 8:51
Aescleal30-May-12 8:51 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan30-May-12 11:59
mveRichard MacCutchan30-May-12 11:59 
AnswerRe: Win32 Forms properties/variables Pin
jkirkerx30-May-12 10:55
professionaljkirkerx30-May-12 10:55 
GeneralRe: Win32 Forms properties/variables Pin
Brandon-X1200030-May-12 13:50
Brandon-X1200030-May-12 13:50 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan30-May-12 22:00
mveRichard MacCutchan30-May-12 22:00 
GeneralRe: Win32 Forms properties/variables Pin
jkirkerx31-May-12 6:52
professionaljkirkerx31-May-12 6:52 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan31-May-12 7:12
mveRichard MacCutchan31-May-12 7:12 
GeneralRe: Win32 Forms properties/variables Pin
jkirkerx31-May-12 12:36
professionaljkirkerx31-May-12 12:36 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan31-May-12 21:17
mveRichard MacCutchan31-May-12 21:17 
QuestionCombobox in win32 Pin
Rajeev.Goutham29-May-12 17:37
Rajeev.Goutham29-May-12 17:37 
AnswerRe: Combobox in win32 Pin
enhzflep29-May-12 20:01
enhzflep29-May-12 20:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.