when we create the window, we can choose some styles. but i see 2 problems:
- how can i hide the border?(i have seen the msdn styles, but theres no const for that)
- how can i change the styles after create the window?
This article might be of interest to you. Codeproject.com has one of the largest repositories of free Windows code that you will find on the internet. You will find examples of almost anything you want to do there.
having test more and i found it.
when we create a window, we must choose what we need. theres some standard const's too ;)
when we need change it: we use the SetWindowLong() function very cool.
readers don't forget use GWL_STYLE for normal styles and GWL_EX_STYLE for EX styles;)
// Step 2: Creating the Window
hwnd = CreateWindowEx(
WS_EX_APPWINDOW, //see here
"The title of my window",
WS_OVERLAPPED|WS_POPUP , //see here
CW_USEDEFAULT, CW_USEDEFAULT, 500, 500,
NULL, NULL, hInstance, NULL);
explain to me what i'm confuse: the 1st and 4th arguments are for styles(they are both styles). can you explain better to me the diference?
and if i click 2 times(on task bar) the window isn't minimized.. it's a normal thing or i can activate that?
For detailed explanation of each argument you need to read this article. There are two functions -- CreateWindow() and CreateWindowEx(). If you compare the arguments of the two functions the only difference is the first argument, which are additional window styles not used in the first function.
i don't understand why not only 1 parameter for styles. but i have seen(i have tested now) they do a combination of the both styles(extend windows styles with windows styles). that's why i never get the borderless style ;)
hey i learned more than i thot today ;)
thanks for all
It's almost a waste of time learning win32 api because it has been supersedded by .NET Framework. Your time would be more well spent by learning Windows Forms using CLR/C++, C# and VB.NET languages, all which use .NET Framework functions. It wouldn't surprise me if win32 api was someday (in the next 10 years) obsolete and no longer supported.
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...