Archived

This topic is now archived and is closed to further replies.

moocow12

Window api question

Recommended Posts

Hey all, quick (hopefully) question. In vb I used to make a blank form (window) and create my own window (visual interface - kind of like Window''s) with different graphics. How should I go about this in c++? Should I make a window and bitblt my interface over the whole thing (windowbar, top-buttoms, etc)??? Or Is there a way to create a window without the window elements so I can blt over it with my own stuff?? I want this "window" to have rounded corners, also. In visual basic I could do this with an api call (i don''t remember which one, though) to set certain parts of a window transperent. Any ideas??? Thanks, Kevin

Share this post


Link to post
Share on other sites
Any API call that can be done from within VB can be done from within C++, and usually with less hassle. Find your old VB code and then look up the name of whatever API call you used in the help that comes with your compiler.

Share this post


Link to post
Share on other sites
I can''t tell from your post whether or not u know any Windows programming at all in C++. Assuming you know how to make a simple window, you just have a separate HWND for each button that you have. You use the CreateWindowEx function that you use in creating the window, but you have to call it with different parameters, like the handle to the main window for the fourth-to-last parameter (I think) and the flag SS_BUTTON or something in the ssecond pararmeter. There''s a little bit more, but i suggest u look it up in MSDN.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You have to return NULL in response to the window message WM_NCCALCSIZE in your window procedure. Then the whole window can be treated as the client area. This way Windows won''t draw any nonclient area. If you are using MFC there may be some differences, but I haven''t used MFC in years.

Share this post


Link to post
Share on other sites