this question has answer here: how convert between big-endian , little-endian values in c++? 28 answers i've been looking around how convert big-endian little-endians. didn't find solve problem. seem there's many way can conversion. anyway following code works ok in big-endian system. how should write conversion function work on little-endian system well? this homework, since systems @ school running big-endian system. it's got curious , wanted make work on home computer also #include <iostream> #include <fstream> using namespace std; int main() { ifstream file; file.open("file.bin", ios::in | ios::binary); if(!file) cerr << "not able read" << endl; else { cout << "opened" << endl; int i_var; double d_var; while(!file.eof()) {...
how can draw wximage, or wxbitmap dc opacity? looks not possible standard dc or wxgraphicscontext. beginlayer/endlayer not yet implemented in wxgraphicscontext have been 1 solution. gdi+ doesn't seem support layers, non-trivial add this. the solution seems to programmatically alter alpha channel pixel-by-pixel? void yourcustomwindow::onpaint( wxpaintevent& event ) { wxpaintdc dc(this); wximage image( width, height ); image.initalpha(); unsigned char* imgdata = img.getdata(); unsigned char* imgalpha = img.getalpha(); // manipulate raw memory buffers populate // them whatever image like. // putting zeros everywhere create // transparent image. // done, not quite... // wxdc can draw wxbitmaps, not wximage, // 1 last step required // wxbitmap bmp( image ); dc.drawbitmap( bmp, 0, 0 ); }
i'm trying create application adheres following: no taskbar no console or form window can utilize console.writeline() . (i.e. if executes app command prompt write console.) the problem if create windows form (or wpf) application can have there no taskbar, console or window show up, console.writeline() nothing. if create console app, writes console, can't figure out how hide (and if did hide it, write command prompt window?)... how do this? just create standard console application. callers responsibility hide window caused program (from how run c# console application console hidden ): system.diagnostics.processstartinfo start = new system.diagnostics.processstartinfo(); start.filename = dir + @"\myprocesstostart.exe"; start.windowstyle = system.diagnostics.processwindowstyle.hidden;
Comments
Post a Comment