Download Pelles C here: http://www.smorgasbordet.com/pellesc/
Quote from: John Z on December 03, 2025, 01:37:34 PMI see the need to add a few more options to my resizing effort. Before adding a second configuration array or methods, I would like to know if the 'extra data' inserted by the IDE dialog designer is accessible without subclassing, or is it only incorporated in a subclassed control?
To add more flexibility to the resizer Lib is the extra data available without subclassing?
Example:
CONTROL "VR-HN", 4002, "Button", WS_TABSTOP, 28, 28, 50, 14 { 0xC0DE, 0x0001, 0x0008 } ->{ Magic# , version, code }
I know none == 00, Resize == 10, Move == 11 (binary)
and Vertical is in upper bits XX-- while horizontal is in lower bits --XX
so 0x0008 means vertical is resize, horizonal is none i.e. 1000 (binary)
0x000F means vertical is move, and horizontal is move i.e. 1111
Is there a way to access this when it exists? Resize 'none, none' means there is no magic.![]()
John Z
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma comment(lib, "kernel32.lib")
#pragma comment(lib, "user32.lib")
void __cdecl mainCRTStartup(void)
{
char szTmp[100], szTmp2[100];
HANDLE hConWnd = GetConsoleWindow();
HANDLE hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
int nLen = wsprintf(szTmp, "hConWnd %ph\n", hConWnd);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
//FlashWindow(hConWnd, TRUE);
GetConsoleTitle(szTmp2, sizeof(szTmp2));
nLen = wsprintf(szTmp, "CTitle: %s\n", szTmp2);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
GetWindowText(hConWnd, szTmp2, sizeof(szTmp2)); // don't work in Windows 11
nLen = wsprintf(szTmp, "WTitle: %s\n", szTmp2);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
HWND hWnd = FindWindow(NULL, szTmp2);
nLen = wsprintf(szTmp, "hWnd %ph\n", hWnd);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
LONG_PTR lp = GetWindowLongPtr(hConWnd, GWLP_WNDPROC);
nLen = wsprintf(szTmp, "WndProc %ph\n", (void*)lp);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
lp = GetWindowLongPtr(hWnd, GWLP_WNDPROC);
nLen = wsprintf(szTmp, "WndProc %ph\n", (void*)lp);
WriteConsole(hConOut, szTmp, nLen, NULL, 0);
//PostMessage(hConWnd, WM_QUIT, 0, 0); // quit console and program stay running
//SendMessage(hConWnd, WM_QUIT, 0, 0); // do nothing
// stay running
MSG msg;
while(GetMessage(&msg, NULL, 0, 0)) // do nothing
//while(PeekMessage(&msg, NULL, 0, 0, 0)) // end program
{
//nLen = wsprintf("hwnd %ph\n", msg.hwnd);
//WriteConsole(hConOut, szTmp, nLen, NULL, 0);
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
ExitProcess(0);
}
Page created in 0.023 seconds with 11 queries.