[Newbie] Need help

A

arN

Hi !

I'm a Java developper and I need to write a tool in c++ for a platform
specific operation (I need to make a capture of an offscreen window).

I wrote this code in Python that works well when not called from my java
code. Unfortunatly, it fails when launched from java (don't know why) :

import win32api, win32con, sys

control = int(sys.argv[1])
gc = int(sys.argv[2])

win32api.SendMessage(control, win32con.WM_PAINT, gc, 0)
win32api.SendMessage(control, win32con.WM_PRINT, gc,
win32con.PRF_CHILDREN | win32con.PRF_CLIENT | win32con.PRF_OWNED)


Could someone help me translate it in C++. I tried, but it can't manage
to write a valid code (had problems to cast char to int for example).

TIA
 
V

Victor Bazarov

arN said:
I'm a Java developper and I need to write a tool in c++ for a platform
specific operation (I need to make a capture of an offscreen window).

I wrote this code in Python that works well when not called from my java
code. Unfortunatly, it fails when launched from java (don't know why) :

import win32api, win32con, sys

control = int(sys.argv[1])
gc = int(sys.argv[2])

win32api.SendMessage(control, win32con.WM_PAINT, gc, 0)
win32api.SendMessage(control, win32con.WM_PRINT, gc,
win32con.PRF_CHILDREN | win32con.PRF_CLIENT | win32con.PRF_OWNED)


Could someone help me translate it in C++. I tried, but it can't manage
to write a valid code (had problems to cast char to int for example).

Windows API questions/queries/requests are best posted to the Windows API
newsgroup: comp.os.ms-windows.programmer.win32

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top