I'm not sure if this topic's subject is appropriately named or not - hopefully I'll make some sense. :?
Is it possible to add syntax highlighting for user-defined typedefs, structs, defines, etc... without having to add them individually to the C++ keyword list?
For example, suppose you have the following code:
#define WIN32_LEAN_AND_MEAN
//////////////////////////////////////////////////////////////////////////////////////////
#include <windows.h>
//////////////////////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nShowCmd)
{
WNDCLASSEX wcx;
wcx.cbSize = sizeof(WNDCLASSEX);
wcx.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
wcx.lpfnWndProc = App::ToolWindow::CallBack;
wcx.cbClsExtra = 0;
wcx.cbWndExtra = 0;
wcx.hInstance = GetModuleHandle(NULL);
wcx.hIcon = NULL;
wcx.hCursor = NULL;
wcx.hbrBackground = (HBRUSH) GetSysColorBrush(COLOR_BTNFACE);
wcx.lpszMenuName = NULL;
wcx.lpszClassName = App::Version;
wcx.hIconSm = NULL;
if (RegisterClassEx(&wcx) == FALSE)
{
MessageBox(NULL, "AppWindow\n\nRegisterClassEx() failed...", "Error", MB_OK | MB_ICONEXCLAMATION);
return 0;
}
if (CreateWindowEx(NULL, wcx.lpszClassName, App::Title, WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP | WS_SIZEBOX | WS_SYSMENU | WS_VISIBLE, 10, 10, 400, 400, GetDesktopWindow(), NULL, wcx.hInstance, NULL) == NULL)
{
MessageBox(NULL, "AppWindow\n\nCreateWindowEx() failed...", "Error", MB_OK | MB_ICONEXCLAMATION);
return 0;
}
MSG msg;
while (msg.message != WM_QUIT)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) == 0)
{
WaitMessage();
}
else
{
DispatchMessage(&msg);
}
}
UnregisterClass(wcx.lpszClassName, wcx.hInstance);
return msg.wParam;
}
Would it be possible for C::B to recognize these:
1) typedefs such as
HINSTANCE,
LPSTR2) structs such as
WNDCLASSEX,
MSG2) defines such as
WIN32_LEAN_AND_MEAN,
CS_OWNDC,
CS_VREDRAW, etc...
and consider them keywords (to change color highlight) without having to add all of them individually to the C++ keyword set?