Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by LiquidBinary

  1. LiquidBinary

    persistent graphics

    Try returning 0 after WM_PAINT executes... LRESULT CALLBACK WndProc( HWND hWnd, UINT uMessage,WPARAM wParam,LPARAM lParam ) { PAINTSTRUCT ps; HDC hdc; switch( uMessage ) { case WM_PAINT: hdc=BeginPaint(hWnd,&ps); if ( bCopiaJanela )PintaCopiaJanela( hdc...
  2. LiquidBinary

    persistent graphics

    What do you mean by the window already exists? I take it that you did not create the window that you are painting to? The problem resides in the fact that the window only knows how to re-paint it's controls, background color etc...it has no idea what you want to re-paint...be it a bitmap or just...
  3. LiquidBinary

    Fetching IP address

    #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <iostream> #include <winsock2.h> #pragma comment( lib,&quot;wsock32.lib&quot; ) int GetIPAddress( LPCSTR lpHostName,LPSTR lpszIPAddress ); int GetLocalHostName( LPSTR lpszHostName ); int WinSock32CleanUp(); int WinSock32StartUp(); int...
  4. LiquidBinary

    What does build mean?

    When you compile a source file, you are merely creating an object file from the source...when you &quot;build&quot; your project, you are compiling all source files and linking them together to generate a binary. Mike L.G. mlg400@linuxmail.org
  5. LiquidBinary

    How can i find out the length of an array?

    If you are using an array of char's, sizeof() works just fine since it returns the # of bytes: char array[25]; std::cout << sizeof( array ) << std::endl; Mike L.G. mlg400@linuxmail.org
  6. LiquidBinary

    passing an integer variable from one C++ program to another

    One way to do this is to pass the # as an argument. Then the called program can convert the string argument into the actual #. //This would be your main program. The program to recieve the argument is named argsPass.exe : #include <iostream> #include <string> #include <cstdlib> int main()...
  7. LiquidBinary

    BST leafcount()?

    You could keep track right from the beginning, and increment a leaf count each time you add on a new node to the binary tree. Or you can recursively transverse each node incrementing a count value to obtain the # of nodes. Mike L.G. mlg400@linuxmail.org
  8. LiquidBinary

    First-time DLL

    Hello: DllMain() is used for any start up code that your .dll might need. You don't even have to define this function, as the compiler will provide a default version for you. Here is the protoype: BOOL WINAPI DllMain( HINSTANCE hInstance, ULONG What...
  9. LiquidBinary

    Displaying dialogs in different shapes

    #define WIN32_LEAN_AND_MEAN #include <windows.h> #define WIN_NAME &quot;CircleGUI&quot; #define WIN_X 220 #define WIN_Y 200 LRESULT CALLBACK WindowProc( HWND, UINT, WPARAM, LPARAM ); int WINAPI WinMain(...
  10. LiquidBinary

    how to create an array of pointers

    Not too sure what you are getting at, but I'll give it another go... #include <stdlib.h> #include <stdio.h> #include <string.h> #define ELEMS 5 #define ELEMS_X 20 int main( void ) { int i; char matrix[ELEMS][ELEMS_X]; char* aOfp[ELEMS]; char* aOfs[ELEMS]={...
  11. LiquidBinary

    how to create an array of pointers

    #include <stdio.h> #define ELEMS 5 int main( void ) { int i; char* aOfs[ELEMS]={ &quot;array&quot;, &quot;of&quot;, &quot;pointers&quot;, &quot;tek&quot...
  12. LiquidBinary

    Check &amp; Change display resolution

    #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <iostream> enum { RES_X=800, RES_Y=600, BPP =16 }; void DisplayVerify( LONG lResult ); int main() { DEVMODE dMode; LONG lResult; int x,y; x=GetSystemMetrics( SM_CXSCREEN...
  13. LiquidBinary

    I get these 2 errors when I try to include winuser.h

    Soas: You only need to #include <windows.h> Mike L.G. mlg400@linuxmail.org
  14. LiquidBinary

    double structures

    #include <iostream> #define MAX_ELEMS 10 struct SNumeric { long lNums[MAX_ELEMS]; }; struct SString { char cCar[MAX_ELEMS]; }; void outPut( const SNumeric&,int ); void outPut( const SString&,int ); int main() { SNumeric sn; SString ss; memset(...
  15. LiquidBinary

    Delete all subfolders and files of a given folder

    #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <shellapi.h> #include <iostream> int DeleteFolderStruct( LPSTR lpzRoot ) { SHFILEOPSTRUCT shellOp; shellOp.hwnd =NULL; shellOp.wFunc =FO_DELETE; shellOp.pFrom =lpzRoot; shellOp.pTo =NULL...

Part and Inventory Search

Back
Top