« first day (535 days earlier)      last day (4429 days later) » 

1:00 PM
I chose to say the same by taking your chat message as an example
9 mins ago, by sehe
@thecoshman Less. You are spending more time in that one chat message
@thecoshman I think ^^ was a bit more to the point
The Silence. It's Deafening
 
Ell
hmm it seems windows have a minimum size :L never knew :D
 
@Ell 1x1 pixel comes to mind, but custom bounds can be set. Very nice if you try running in 320x400 mode
 
Ell
@sehe I cant resize windows below 116 :L or something. I never noticed that until just now when i tried to set the window width to 2 with code
shows how useful that function is ;)
 
@Ell If you meant Windows has a minimum size: it is the ISO standard for ginormous
 
Ell
I mean windows as in forms containing controls etc. etc.
:L
 
1:10 PM
how do I ignore user input in a batch script?
 
@sehe he he he, went for coffee :P
 
I just want the script to run, and not ask for user input
 
you need to find the silent mode for each command
AFAIK, you can't just make a batch script not ask for user input
 
Ell
windows 7 doesn't have workspaces does it?
I can't seem to find them :O
 
@Ell nope
I think there are ways to get them
 
1:14 PM
@Ell what is it?
 
@Abyx it's like have more then one screen, and you can switch between which one is active at a time
 
multiple desktops?
 
a poor mans way of having multiple monitors
 
Ell
yeah
 
Ell
1:15 PM
but then you can do cool stuff with them like put them on a cube :D
 
@Ell I very much doubt you can do that in windows
@Abyx ah, for a minute then, I thought you where showing some secret hidden feature of windows
 
Ell
@thecoshman I dont really need that though. I only wanted it to move 4 windows out of my way (2 x mc server) but Ill have to cope with them just there
 
@Ell still, multiple monitors is nicer :P
 
@thecoshman it is sorta feature - the CreateDesktop function
 
meh, windows is for work
 
1:18 PM
suckage
 
Ell
I <3 linux mint
 
@TonyTheLion indeed, windows does suck
@Ell what GUI does mint use?
 
Ell
errrm what gui? It uses the gnome desktop with... muppet wm i think? or something?
I dont really know what you mean by what GUI. I may not be knowledgeable enough :L
gnome 3
 
@Ell by GUI I meant, the windowing system, so unity, Gnome2/3, KDE, etc.
 
@thecoshman BS
 
Ell
1:22 PM
it uses gnome 3 :)
 
@Abyx I didn't write it :P
 
Ell
is putting a window in fullscreen the job of windows or opengl?
 
there is one and only one reason to write in C++ - when some customers don't want to install .NET .
 
@Ell the windowing library
 
@Ell "windows". it's just a maximized window without titlebar
 
1:26 PM
@Abyx you chose C++ when, out of the options available, C++ is the one you would prefer to develop in
@Abyx false. 'fullscreen' != maximised and no border
 
You choose C++ when it's the best tool for the job. Same goes for any other language. (Except for Java, which is never the best tool for the job.)
 
@daknok_t if the customer says they want it done in Java, for what ever reason, C++ is not an option
 
Ell
@thecoshman I am writing a minimal windowing library :L
 
If the customer says they want it done in Java, the customer just wants to troll the developers.
 
@Ell may I refer you to libglskel
 
Ell
1:28 PM
@thecoshman why does fullscreen != maximised & no border?
 
@daknok_t but it will be done in Java
@Ell because they are not the same
 
Ell
what is the difference?
 
a window that is maximised with no border is the same as any other window
 
Ell
whereas a full screen window..?
 
a full screen program is not a window, it get's to take over the screen
ever notice why it takes games so long to tab out of some times?
 
1:30 PM
@thecoshman yep, program is not a window
 
That doesn't mean that it can't be a maximized, borderless window.
 
Ell
oh yeah
brb
 
those games are full screen. if you press f11 on your browser it goes 'fullscreen' but you can tab out instantly, because it is not truely full screen
 
@thecoshman it's because of screen resolution changing
 
@thecoshman if it takes over the entire screen, it's full screen.
 
1:31 PM
@Abyx AFAIk it will happen even if the resolutions match
also, when you make a window through win32, there is a distinction between full-screen and maximised with no borders
because they are not the same
 
@thecoshman then it's not because of "fullscreen"
 
> Of a window occupying all the available displayable surface of a screen.
 
A fullscreen image or video occupies the screen entirely. * A video display having an aspect ratio of 4:3 (opposed widescreen) * In film, the use of pan and scan, image cropping, or windowboxing to fit widescreen content into a display with aspect ratio of 4:3 * In computing, a window or frame which covers the full screen, often subverting the operating system's normal interface * On the TV screen, it says that "This film has been modified from its original version; it has been formatted to fit this screen."
 
It doesn't matter how full screenness is implemented (i.e. whether using a maximized, borderless window or not).
 
well, it may be not maximized, just have size of screen
 
1:34 PM
Games don't take long to tab out because they're full screen
 
see in paticular, "subverting the OS"
 
Ever tried alt+enter?
 
@daknok_t it does, they do not perform/behave the same
@rubenvb yes. though, it is not any special key combination. or am I missing your point
 
@thecoshman when something if full screen, it occupies the full screen. Implementing it differently doesn't make it not full screen.
The definition of "full screen" has nothing to do with how it is implemented.
 
@daknok_t your not listening to me. If you tell Windows to give you a full screen window it is not the same as getting a maximised border-less window. They look the same, but are not the same
 
1:36 PM
@thecoshman but they are both full screen. Windows may think it's not, but from a user's perspective, it is.
 
@thecoshman for me, it instantly makes a full screen app windowed.
 
@thecoshman "tell Windows to give you a full screen window" can you show a code?
 
There's a mismatch between a certain Windowing API (win32, X,...) and what people experience as full screen
 
^ that ^
 
if you look at what the op was asking you will see why I pointed out that when you ask windows for a full screen window, there are two ways to do it, and they are not the asme
 
1:38 PM
"putting the window full screen" is obviously the task of the windowing system (Win32, X...)
 
@rubenvb that is an application requesting the change, not the OS
@Abyx no I can not recite win32 code of the top of my head
 
either by making it large and borderless or "Win32 full-screen"
 
@thecoshman what "change"?
 
@thecoshman Heretic!
 
@Abyx from a 'normal' window to what looks to be full screen
 
1:40 PM
there is no SwitchToFullscreen API
 
"to what is full screen" FTFY
 
there is WS_POPUP with size of display
 
0
Q: C++ File Operations

SeelamsettyAs part of an assignment, I need to read data from binary file which consists of int, char datatypes of data. This binary file divided into records of each size 96 bytes. I am trying to reading this 96 bytes into char buffer and then trying to split them according to info I have. But I am getting...

 
@Abyx true. the application requests a new window (either fullscreen or maximised borderless) and switches to that
@daknok_t perhaps, but like I said, it may not be true full screen
 
@thecoshman what do you mean by "switches to that"?
there is no "switching"
 
1:42 PM
@Abyx it stops using the 'normal' window and starts using the window is has set up as 'fullscreen'
 
@thecoshman no it's not
 
as far as I'm aware, on Windows, the only way to get a true full-screen window is to request one through DirectX
the other windows simply happen to occupy the whole screen
 
you can launch a game in "fullscreen", then create another window with higher z-order and put it above that "fullscreen" window
 
that's not fullscreen, that's just "happens to occupy the whole screen"
 
oh dear...
screensaver is "fullscreen"?
 
1:45 PM
do you have access to the source code of screensavers?
 
but it's just a application which shows one big window
@DeadMG huh?
 
@Abyx they might be, they might just be maximised border-less
 
screensaver is a regular .exe
 
@Abyx All I'm saying is that unless you actually have the source code which shows a screensaver, then you can't know what it does
 
@Abyx and?
 
1:46 PM
@DeadMG I wrote some ten years ago
just google "how to create screensaver"
 
@Abyx that has not relation to what other screen savers do
 
@thecoshman ok, you can disassemble existing one
there will be CreateWindow(...., WS_POPUP, ... screenCX, screenCY...)
 
Abyx, not being mean or anything, but I guess you learned by 'Trail and Error' rather then reading some Book/documentation.
 
@Abyx I know that I am correct in saying that true full screen is not the same as a maximised border-less window. That is my original statement an, as far as win32 is concerned, it is true.
 
1:52 PM
@Ell that's unrelated? It changes something for a display device
 
@Ell ok... but what this flag actually does?
 
Ell
I dont know it was a guess :L put the display in fullscreen mode? then start rendering
idk
anyway im off to make flapjacks, be back later. Thanks for insight :) bye
 
@Abyx have you ever used win32?
nothing makes sense in win32, it is just cruel
 
any hoops, the long and the short of this is that for win32 there are two ways to go full screen. 'full-screen' where you take control of the screen, and 'maximised border-less' where you just exactly that, nothing special is going. Both look full screen to the user, but they are not the same
 
1:57 PM
then CDS_FULLSCREEN has nothing to do with fullscreen windows
 
@Abyx i've no idea what that flag is for
 
@thecoshman read post above
 
oh I see
tea
 
hello every1
im playing with the clipboard in visual studio, and everything seems fine, but when it comes to this line : SetClipboardData(CF_TEXT,clipBuffer); , VStudio triggers a breakpoint, and i can't paste the clipboard contents anywhere, any ideas why?
 
Theoretical apparatus of sequential logic consists of mathematical instruments of sequention and venjunction as well as of logic-algebraic equations on their basis.
 
2:14 PM
@coolbartek Not really, but you are breakpointing after that line, right?
 
yes, it seems i am changing something in the heap that doesn't belong to me
btw what is the difference between str.len and str.size?
 
nothing
we are talking about C++ strings, right?
 
yes
 
yeah, they're just aliases of eachother
 
and capacity return the size allocated for that string right?
 
2:17 PM
yeah
 
Heap block at 007599A0 modified at 007599F7 past requested size of 4f
Windows has triggered a breakpoint in program.exe.
that's the message im getting
 
stop doing that?
 
WinApi -> MFC -> ATL -> WinForms -> Silverlight-Stand-Alone -> WPF -> WinMetro
Fuck rapidly changing technologies. :'( . When I learn one, the next comes out.
 
You don't just do WPF for Windows 8?
 
why can't microsoft stick to improving one technology, instead of creating a dozen more?
OK, I know the answer to that. But still, it's annoying.
 
Ell
2:24 PM
@IntermediateHacker what is the answer to that?
 
WinForms suuuuuccckkkss
Also progress, technology improvement etc etc etc
 
oh man, lounge<c++> has been hijaked
 
By Micro-Aliens?
 
all sorts of mad shit that I care not to read, some crap about ATL and MFC
 
2:37 PM
WinMetro !~= WinApi
it's just another Embedded Windows thing
 
@rubenvb "not approximately equal to", so exactly the same, or nothing like?
 
@thecoshman not approximately equal to. So WinMetro is not comparable to WinApi wrt functionality
 
either way, I am sure it sucks to work with
 
wait, WinMetro is like WinApi?
> Metro-style apps are developed with the new Windows Runtime platform using various programming languages, including C++, Visual Basic, C#, and HTML/JavaScript.
Windows Runtime == " Kernel32.dll + User32.dll + GDI32.dll" ?
 
@IntermediateHacker it's like COM
 
2:42 PM
@Abyx oh. damn, not COM again. That thing gave me the creeps.
but it supports HTML/Javascript. this looks interesting.
 
WinMetro is the API you use on Windows Phone.
So think Android API, but in C# instead of Java
That's what I make of it
 
oh, I see. Then it may not be that bad.
 
There's a lot of stuff missing or inaccessible for a Metro app.
(vs a normal Desktop app)
 
will Windows 8 support the good ol' WinApi and it's various abstractions?
> New button combo for Ctrl + Alt + Del: The new option is to press Windows Key + Power.
^ perhaps the most useful addition yet. :D
 
@IntermediateHacker Nice for the 90% of keyboards that don't have a power key
 
Ell
2:49 PM
I don't have a power key :L
 
@IntermediateHacker obviously. Just not when writing WinMetro apps
 
Ell
hi guys :)
 
> Sounds like contracts written via e-mails are worth the bits that represent them. Sort of like verbal contracts are worth the paper they are written on. There is a lesson here somewhere.
> > Only the zeros bits.
WIN
 
@IntermediateHacker probably always will support it
 
Ell
Because I am writing a windowing library, I need a message loop, but if this is in the library, how will it work? Will it be run asynchronously? Or do I not use a message loop if i want it as a seperate library??
 
3:00 PM
@Ell what do you mean? are you wanting to put the loop that gets message from window in you library?
 
Ell
@thecoshman well I want to handle keypresses etc. and it needs a WndProc to work so I think so yes
 
@Ell IIRC you will pass windows a function pointer, it will call this function asynchronously
 
@thecoshman No, synchronously.
you have to expose a kind of ProcessInput function that will, internally, pump the message queue for messages
 
@DeadMG probably, what I mean is, it will interrupt (though I don't think it is a proper interrupt) you program so that you handler can handle it
@DeadMG I don't think he means the message loop
 
Ell
@thecoshman I thought every win32 programme needs a message loop?
 
3:03 PM
though it's been a while since I did win32... so I am probably confused about this :P
 
Ell
I was talking about the message loop :L
 
Windows does not expose any asynchronous callbacks, except explicitly noted, of which there are few and those are dedicated thread functionality
and the message loop is definitely synchronous
 
yeah, message loops is
 
They closed my question :(
It was a real question that made sense to my project :@
 
linky?
 
3:05 PM
can't remember the exact details, but I had some sort of function that handle some sort event handler... it had to be a C style function pointer, and I found some fancy method called thunking to allow me to pass a instance function
 
Ell
@DeadMG if I am writing a library, do I need a message loop? Or even a main() function?
 
if you're writing a library, you don't need main, but you do need a message loop
 
@Ell possibly. no
 
Ell
@DeadMG how do I have a message loop without a main? and wont that block the programme using the library?
is it the dllentry point thing?
 
wtf
main and the message loop have nothing at all to do with each other
 
3:06 PM
you probably should handle the message in you library, but it could be possible to do it with out the loop in your library
 
it's just common to put the message loopc ode in main
and yes, it will block the program using the library, it's a synchronous read (of an asynchronous queue)
 
a program that uses your library will have the main() and (after some set up) call you library's loop function
 
yes
you write a function which pumps the queue and acts on all the messages
then your users call it whenever they need to check for new input
 
well, it should pump all messages, but strictly speaking does not have to do anything with the messages at all, or even pump them
what most people would call, bad code
 
Ell
so I write a message loop function, which the user of the library calls?
 
3:09 PM
sounds right
a common practice is to leave it up to the user of library to write the loop
such as...
 
Ell
hmmm
 
main(){
  boolean run = true;
  while(run){
    myLibrary::pumpEvents();
    myProgramsMainCode();
  }
}
fucking code formatting OCD
 
btw, you don't need to write message pump if you use modal dialog
 
though you could have the user set a callback function, and then they can just call enterloop()
 
Ell
It just doesn't seem right the library user should know about the message loop
 
3:15 PM
main(){
  library::setLoopCode(myFunctionIwantRunEachTime);
  library::enterLoop(); // will stay here until program is finished (roughly speaking)
}
perhaps you would prefer that method
that is just one way to do this btw
 
@Ell They don't. They just know you have to poll. It's no surprise to any UI library user that you have to poll for input.
 
guys, I need to model a simple electric circuit in C++. Which data structures can i use? Linked Lists to implement a Graph structure?
 
@coder9 Linked lists are for a line of data, data the which can be put in some sort of order
You could use a LL to store the 'components' of the simulation, but each component will need to know what it is connected to.
you might want to consider a resister, only has two connections, one each that can only connect to one wire each (though it could be the same wire) but then the wires can be connected to many components
 
thecoshm: exactly! the problem is to have variable number of nodes connecting to a node. ex: Battery with many resistors in parallel :S
 
Ell
how about nodes with directed edges?
 
3:20 PM
things are very easy if everything's connected in series
 
@coder9 a battery is connected to just two wires, resistors are connect to just two wires. wires are connect to many things
 
Ell: can we have many outgoing pointers that way?
 
Ell
@coder9 each node could contain a std::vector<node*> maybe?
I don't know really
 
A resistors has a pointer to two wires. A wire has pointers to many 'component connections'
 
Probably std::vector<std::unique_ptr<node> > anymore, but yes
 
3:22 PM
thecoshm: yeap. good approach.
 
@CollinHockey except many things can have a pointer to the same wire, thus the pointer is not unique
 
@CollinHockey you think its efficient?
 
shared_ptr makes more sense, but I think this might be best with raw pointers
@coder9 efficiency was not part of your problem, why are you suddenly worrying about? Get a simulation first
 
@thecoshman ah you're right, I was only thinking of wires -> components,
 
raw pointers for the connections, unique_ptr's for the ownership
 
Ell
3:24 PM
They are only pointers for observation, not ownership so you wouldnt need unique_ptrs
yeah
what rubenvb said XD
 
it would probably help a lot of people if unique_ptr was called ownership_ptr
oh bus
 
Ell
hmm. Maybe I should have the first call to mywindow.show() start off the message loop
 
Hi HO
 
@Ell if you don't want to start with hidden window and show it later
 
Where would I go to recruit someone for a 1.5 day PHP Zen project?
 
3:28 PM
Wut
 
@RobinKnight anywhere but here
 
msu.edu/~rugis/articles/jr0401.pdf this article suggests using "Sparse matrices" :S
 
Ell
@Abyx well the windows are hidden by default
actually it would all have to be event driven anyway, so it wouldn't matter about the message loop blocking everything
 
Well should I simply write a question or what?
 
Ell
@RobinKnight you can't recruit people on SO (I don't think)
check the FAQ
 
3:33 PM
I am sure I saw something for it once
 
Ell
I don't think so
SO careers?
You cant have a private function in c++ namespace wise can you?
 
no
 
namespace wise?
 
Ell
as in
namespace Foo {
private:
static void Bar();
}
 
usually, people create a details namespace which is documented as implementation privates
 
3:37 PM
@thecoshman any help i can get from boost library to make things easy?
 
Ell
ahh kk
@coder9 I believe Boost has a graph class that might be helpful
it has algorithms like prims, disktra, etc.
 
@Ell thanks. will have a look
 
Ell
if I don't have any raw pointers or any kind of dynamically allocated resources I don't need a destructor do I?
 
you need a destructor if you need to perform an action at the end of your lifetime
dynamic resources is just one example
 
Ell
kk, I don't think I need one then :D
 
@RMartinhoFernandes Unfortunately a fictious story, despite many contrary reports on the web
 
page won't even load for me :P
 
sbi
@DeadMG If you think that was bad, you should know that, in the end, an admin and I spent 5 hours on this, and it didn't work. Fuck, they could have bought an Ultimate license easily for the money burned on this!
 
Ell
wow
 
sbi
And — guess what — buying an Ultimate license is exactly what will be done now. Sigh. I hate this company's credo to save money at all cost.
 

« first day (535 days earlier)      last day (4429 days later) »