User forums > Using Code::Blocks
Could Code::Blocks list the members of a struct or class?
norsd:
As I was using VC, for example, "WNDCLASSEX wincl" , if I enter "wincl." and VC will show me the member list,
but i cannot find that in CB.
Can any one who can help me?
I think i'm loving CB, but ,.....but ....... TvT
Ok, i found one thing, if the struct is defined by file which is one of the current project, CB can list the member,
but, when the struct is defined outside, such as "WNDCLASSEX" which is defeind in <windows.h> ,then, nothing happened!!
Thanks~
norsd:
Is there any one who can help me?
My CB can only list member which is defined in current file.
How could I remember the whole members of windows structs and functions!?
Hello? TvT~
MortenMacFly:
--- Quote from: norsd on October 13, 2008, 06:12:58 pm ---Is there any one who can help me?
--- End quote ---
Did you create a project or do you use single file compilation?
It it's the latter: Please create a project.
norsd:
Thank you for replying
My project : Projects ----> Win32 GUI Project -----> Frame based ------> Input Project Name ------> GNU GCC Complier
File : (only one) main.cpp
--- Code: ---LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "CodeBlocksWindowsApp";
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nCmdShow)
{
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);
...............................................................................
--- End code ---
Then, when I input "wincl." , nothing happened........>_<
MortenMacFly:
--- Quote from: norsd on October 14, 2008, 01:32:50 pm ---
--- Code: --- WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.
--- End code ---
Then, when I input "wincl." , nothing happened........>_<
--- End quote ---
In Windows WNDCLASSEX is either _WNDCLASSEXA or _WNDCLASSEXW, depending whether you do an ANSI or Unicode build of your application. CC works just fine if you try to code complete e.g. _WNDCLASSEXA which is defined in winuser.h (btw.).
To be honest: I have no idea how this works internally as you'll find nowhere in the header files the mapping of WNDCLASSEX. (I would have expected a typedef or similar embedded in an unicode/ansi #ifdef.)
Thus CC cannot find the token and won't work therefore.
Navigation
[0] Message Index
[#] Next page
Go to full version