Alright, it is no blessing that it doesnt work!!!!
I hate having to constantly look up the members of structs and unions in MSDN or the web.
Call me lazy, but I am not. I like(d) the convenience of code completion. I have too much to memorize in college as it is.
Oh well. I will not give up! FORTE code completion works fine, DAMN YOU MICROSOFT!
heres the code example you wanted, Hammer:
Code:
#include<windows.h>
#include<winsock.h>
#include "resource.h"
SOCKADDR_IN myinfo;
LRESULT CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, int nShowCmd)
{
MSG msg;
HWND hWnd;
hWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MainDlg), NULL, (DLGPROC)DialogProc);
ShowWindow(hWnd, nShowCmd);
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
LRESULT CALLBACK DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
{
SendMessage(hWnd, WM_SETICON, ICON_SMALL, LPARAM(LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION))));
SendMessage(hWnd, WM_SETICON, ICON_BIG , LPARAM(LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION))));
return TRUE;
}
case WM_COMMAND:
{
switch(LOWORD(wParam)
{
case IDC_CLICK_OK:
{
//myinfo. does not work here!
return TRUE;
}
}
return FALSE;
}
case WM_DESTROY:
{
PostQuitMessage(0);
return TRUE;
}
case WM_CLOSE:
{
DestroyWindow(hWnd);
return TRUE;
}
}
return FALSE;
}
There ya are. I don't know what the deal is!!!! =(
spoon_