Re: api call from c++

From: AirPete (x_at_x.x)
Date: 02/03/04


Date: Tue, 03 Feb 2004 01:35:05 GMT

You can do it like the following:

#include <windows.h>
#include <cstdio>
int main(void)
{
HWND hwnd = FindWindow(0, "asdf");
std::printf("%d", (int)hwnd);
return 0;
}

Please direct any addition questions to microsoft.public.dotnet.languages.vc

- Pete

"Defcon31" <stt_d31@hotmail.com> wrote in message
news:401ece00$0$777$ba620e4c@news.skynet.be...
> hello,
> as a VB programmer i'm used to make windows api calls by declare
statements.
> but can someone post a small piece of code about how you do that in C++ ?
> please post some code, not mfc, just a very simple console application
with
> an api call.
> thanks in advance
>
>



Relevant Pages

  • Re: Build Errors
    ... However this is the first time in all my examples that I had ... >> int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInnstance, ... >> LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM ...
    (microsoft.public.vc.language)
  • RE: MoveWindow not sending WM_SIZE on deeply nested windows
    ... > window whose size I've requested to change. ... > int find_window (HWND hwnd) { ... > void display_error { ...
    (microsoft.public.win32.programmer.ui)
  • Re: Windows API in VC++
    ... >I have look at the code reference, ... > HWND hWnd; ... 'ShellExecute' returns HINSTANCE, not an int. ...
    (microsoft.public.vc.language)
  • Re: Button with Bitmap Disabled problem
    ... LRESULT CALLBACK ButtonProc (HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM ... BOOL DitherBlt(HDC hDestDC, int x, int y, int nWidth, int nHeight, HDC ...
    (microsoft.public.win32.programmer.ui)
  • Re: Build Errors
    ... void Show (HWND hwnd, HDC hdc, int xText, int yText, int iMapMode, ... LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM ...
    (microsoft.public.vc.language)