i'm trying using the GNU compiler with command lines( using the ShellExecuteEx()). when i do: string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe"; run(FileName1,"-c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\""); the object file is created. these line creates the exe: run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o"); (tested) but the exe have some dependencies... so seen the Code Blocks: x86_64-w64-mingw32-g++.exe -Wall -g -std=c++14 -c C:\Users\Cambalinho\Documents\CB\testfolder\main.cpp -o obj\Debug\main.o x86_64-w64-mingw32-g++.exe -L"C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86" -o bin\Debug\testfolder.exe obj\Debug\main.o -static-libstdc++ -static-libgcc -fpermissive "..\..\..\..\..\Program Files\mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\lib\libgdi32.a" Output file is bin\Debug\testfolder.exe with size 2.92 MB Process terminated with status 0 (0 minute(s), 8 second(s)) 0 error(s), 0 warning(s) (0 minute(s), 8 second(s)) the "-static-libstdc++ -static-libgcc" adds the exe …

Member Avatar
Member Avatar
+0 forum 7

Hi, I am working on a personal vb.net project that will allow me to capture a full-sized image of a given web page. I've been working on this for a few of days and have not found a method that is 100% reliable. Here's what i have tried so far... [U]METHOD #1 - Using WebBrowser Control and CopyFromScreen[/U] Problem: Fails to capture the entire content of the page if part of it is off screen, obscured, or requires scrolling. [CODE] Private Sub btnCopyScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopyScreen.Click Const ScrollbarWidth = 18 ' Initialize a new …

Member Avatar
Member Avatar
+1 forum 10

Creating WinAPI windows and controls can be a pain and quite difficult/annoying at times. Most of the time, I find myself searching MSDN, DaniWeb, and StackOverflow. I hate having to use external libraries unless I absolutely have no other choice. Below contains code for creating WinAPI windows, Controls, Sub-Classing, and EventHandling for each control. There is a sample working code below this article and an image of what the sample code produces. There are only 4 files to include to your projects: Form.hpp -- Form.cpp Controls.hpp -- Controls.cpp The code for these files are as follows: Form.hpp: #ifndef FORM_HPP_INCLUDED #define …

Member Avatar
Member Avatar
+0 forum 5

Hi all, i read that the .net framework is a wrapper around the win32 api. can someone please clarify the following for me: 1.if .net is a wrapper around win32 api it means we are able to do everything with .net that we used to do with win32 api. then why we still need the p/invoke to the win32 api? (i understand that p/invoke can be used with other non windows api as well) 2.what are the limitations (in terms of programming) of .net compared to win32 api ?

Member Avatar
Member Avatar
+0 forum 1

I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is there anyway to remove the DOS prompt? I will include the code, so that you can see what I mean. #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int …

Member Avatar
Member Avatar
+1 forum 5

back again with another question. i created a simple window in WIN32 mode, but it's giving me a linker error that i cannot isolate. [CODE]#include <windows.h> #include <tchar.h> #include <stdio.h> //defined this for all processes HINSTANCE hInstance; LRESULT CALLBACK WinProc(HWND hWnd, UINT msg, LPARAM lParam, WPARAM wParam); //WndProc Prototype. always use this int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { WNDCLASSEX wc; //identifiers for the window ZeroMemory(&wc,sizeof(WNDCLASSEX)); // wc.cbClsExtra= NULL; //additional paramiters wc.cbSize= sizeof(WNDCLASSEX); //size of the window class wc.cbWndExtra= NULL; //aditional window paramiters wc.hbrBackground= (HBRUSH)COLOR_WINDOW; //background color of the window wc.hCursor= LoadCursor(NULL,IDC_ARROW); //window cursor wc.hIcon= NULL; …

Member Avatar
Member Avatar
+0 forum 6

Hi, This is my first project involving processes I am completely lost. I need to create 10 processes that run at the same time. I know that a process is a program in execution so I must write a program that executes 10 times. I used Win32 API to create a single process. How do I modify the CreateProcess function to create multiple processes and have them run at the same time? My code is in C++. I've been to several websites including Microsoft's website but they discuss the CreateProcess function only. I've been reading some of the posts on …

Member Avatar
Member Avatar
+0 forum 19

i have a code written in c++/Cli (CLR Console app) that uses .Net framework. it basically uploads a file to a ftp server. i wanna run it on computers that dont have .net framework. and are running windows xp or windows 7. can i somehow convert it into win32 console app code? or modify if in such a way that it can work wihout .net framework? i believe windows api functions can help me in that.. here is the code anyways [CODE] // workup.cpp : main project file. // test1.cpp : main project file. #include "stdafx.h" using namespace System; //--------------------------------------------------------------------------- …

Member Avatar
Member Avatar
+0 forum 4

I created python executable with py2exe. In my program, I use the pywin32 module. [U][B]Details of the SW's[/B][/U] OS Window 7 64 Bit Python 2.6 pywin32-214.win32-py2.6 when i created the exe its working fine on other system running Windows 7 but giving below error when running on Windows XP systems... [code] Traceback (most recent call last): File "program.py", line 11, in <module> File "win32com\__init__.pyc", line 5, in <module> File "win32api.pyc", line 12, in <module> File "win32api.pyc", line 10, in __load ImportError: DLL load failed: The specified procedure could not be found. [/code] kindly suggest me how to resolve the issue... …

Member Avatar
+0 forum 0

Hello All, I have a question on win32gui, how do I get the window ID corresponding to a window handle. I am able to get the window handle, class, caption using functions like "win32gui.GetWindowText", "win32gui.GetClassName" etc, but I can't find a function that returns the window ID for a particular handle. My second question is if by using some spy tool I get all the window ID's, is there a win32gui function which i can use to get the properties for that window ID like - caption, class etc.? Any help would be greately appreciated. Thanks & Regards

Member Avatar
+0 forum 0

Hi, I have a C++ program (built in Visual Studio 2010) and want to add a user interface to package it up. I've been reading around about windows forms and the win32 API, and found loads of tutorials showing how to create interfaces but I can't find any advice on linking everything together. Basically, what I want to know is what is the best way (it may not be windows forms or win32) for me to create a GUI if I already have a working program in VS? and can anyone recommend a tutorial/reference that explains how to use a …

Member Avatar
Member Avatar
+0 forum 4

I want to create a WIN32 API in C#. I was looking as to what would be the best option to create a new project for WIN32 API in C#. I saw that in C++ in Visual Studio, there is one option to create MFC Application but not in C#. I am not sure as to which would be good selection of project to create WIN32 API. Help would be appreciated. Thanks

Member Avatar
Member Avatar
+0 forum 1

Dear All, I am developing an app that will hook on to the ExtTextOutW and capture the text to be displayed on the screen and log it to a file. I am doing this on Windows XP and VC++ 2008. I have managed to do the above for a notepad app. I have used the Detour library and created a dll and and exported a function called Mine_ExtTextOutW which logs the string to a file and then calls the ExtTextOutW. The problem arises when I use the applications other than notepad for example Firefox. The hooking happens, ie my custom …

Member Avatar
+0 forum 0

Okay, this just makes me feel stupid. I'm pretty good at programming for the console so I figured I would try a Win32 program. Apparently I'm stupid because I cannot even compile hello world. Heres the code I copy and pasted. [CODE] #include <windows.h> int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "\tHello World!", "My first windows app", NULL); return 0; } [/CODE] I'm getting this error twice: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" Can anyone help me get this working? I already tried google.

Member Avatar
Member Avatar
+0 forum 5

Hi2all! What better use for working with databases in C + + and win32api? (static lib with source code, classes or simple source code, examples)

Member Avatar
Member Avatar
+0 forum 3

The question given like this using the CreateProcess () in the Win32 API. In this instance, you will need to specify a separate program to be invoked from CreateProcess(). It is this separate program that will run as a child process outputting the Fibonacci sequence. Perform necessary error checking to ensure that a non-negative number is passed on the command line. i have done like this .it doesn't show error message .when i tried to execute it exits automatically .please anyone help me ? [CODE] #include <sys/types.h> #include <windows.h> #define _WIN32_WINNT 0x0501 #include <stdio.h> int main() { STARTUPINFO si; PROCESS_INFORMATION …

Member Avatar
Member Avatar
+0 forum 5

The End.