I was talking about a microsoft team implementation...i saw some resize helpers around here somewhere but none of them do what i need them to do. It's a bit frustrating 'cause when you're developing some huge application with complicated non gui processes, the last thing you want to focus on is layout. And don't talk to me about the Dialog editor that ships with the .net platform...not everything can be done by mouse clicks
I just started working on this, so any suggestions would be helpful. I have a program that transfers files to and from a CDMA cell-phone chip simulation board. Essentially, a cell phone connected to the PC via a USB cable. The files on the phone are displayed in a GUI, and the program itself transfers the files via programmer-defined packets. The GUI itself is a high-level layer on top of pre-existing firmware level application, which actually controls the phone with transmission/receive messages. I would like to make the GUI a drag and drop application, where the files in a given directory are listed in a listbox on a form, and to transfer files to/fro one can merely drag and drop files in and out of the list box to location designated in the PC. I have looked at implementing drag and drop for files on PC's with MFC, but it seems it's all done with the assumption that the files are all located in files on a PC or a PC-based network. The transfer process itself can take minutes for mp3 files. Does anyone have any thoughts on implementing a shell drag and drop process which will emulate the PC process but the actual transfer of data is done with the pre-existing firmware code.
I am working on a simple program that must load a bitmap and then resize the window that the bitmap is displayed in so that it is the exact size of the bitmap. The program appears to work fine, except for one small problem. When Windows redraws the window that has now been resized, the border on both the right hand side and the bottom do not get drawn. Also, it appears that the orignal "X" box that closes the program is still there. However, if I resize the window manually after the computer has redrwan the window, both borders appear and the old "X" box disappears. Anyone have any idea how I can go about fixing this problem?
SetWindowPos has a flag to indicate that the non-client area of the window needs updating. You can either use SetWindowPos to do the resize (if you are not already using SetWindowPos), or you can do something like the following just to force the frame to redraw:
// Put this after your call to MoveWindow or whatever
SetWindowPos( Your_HWND_Here, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_DRAWFRAME );
It's a hWnd for a window. I've tried to use SetWindowsHookEx and LoadLibrary, but they do not seem to do anything. I don't know if I am using them quite right or not, or either SetWindowHookEx is only used for mouse and keyboard hooking or what. Maybe hooking applications is too advance for SetWindowHookEx. I really dunno.
Yes, it have used it. But I used FindWindowEx instead. It retrieves the hWnd of a window based on the class name for that particular application. That is a piece of the puzzle but not the whole thing. Now, I'm trying to use that hWnd and SetWindowsHookEx to hook it to that particular window, but I'm having no luck.
Abu Mami's Easy Installer files that I downloaded DID NOT include any ".clw" or ".dsw" or ".dsp" files. can someone send them to me. Also, how are you to compile the Easy Installer or change some of the coding without being able to load it into the IDE (using VS 6.0)
A C++ programming language novice, but striving to learn
I need do open a "please wait" window in order to keep blocked my MFC application (i mean that the user can do nothing) until a time-expensive routine ends. Then i need to close this "please wait" window.
I need a modal dialog i suppose.
How can i do that ?
Should i launch the time-expensive routine from the modal dialog ?
All you need to do is create a new dialog window, open it before runnning your expensive routine and close it after. In my opinion, having a "please wait" and forcing your user to sit there twiddling there thumbs is bad programming. Why not use a thread instead?
Because the user knows he has to wait so long and he wants the results that can be shown only AFTER the computation in the routine.
( The routine i'm talkin' about is a multi-objective genetic algorithm that finds a pareto-front of
solution after searching the causative bodies of seismic/volcanic effetcs)
I have two addins installed in my Outlook 2003, both have their specific functionality, I would like to integrate the functionality of both thru global mouse hooks, here is my senerio
1) Lets say there is a button "abc" on toolbar "A" in outlook mail composing window
2) and there is a button "xyz" on toolbar "X" in the same mail composing window
3) on click of button "abc", I would like to generate click of button "xyz" first
4) and then resume back to the process of button "abc"
I am thinking of developing application using VC++ and creating global mouse hooks (may be there is some better approach), I know I can capture the mouse click but my questions are
1) how do I know that the click that was captured is for "abc" button....I think I'll have to determine if the click was for OUTLOOK main window and then determine which mail composing window the click was for, and then finally determine which toolbar/button was it for........but how do I do this all ? any ideas/pointers/suggestions
2) Once I know that the click was for button "abc" now second step is, how do I push a new click event in the windows queue for button "xyz" in toolbar "X"
Also one thing to note is, there may be multiple mail composing windows open but we got to work on the active one only which initiated the click event in question.
Actually my code goes like this: namespace Test_Application
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
/// Summary for Form1
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
public __gc class Form1 : public System::Windows::Forms::Form
static CCyUSBDevice *USBDevice = new CCyUSBDevice(EnumWindows((HANDLE)this::Form1::Handle));
How do you propose to deliver a handle of my "Test_Application" to the CCyUSBDevice constructor... which expects datatype HANDLE !?
This forum is for C++/MFC, I believe there is a managed C++ forum where you might have more luck getting an answer. Assuming HWNDs and HANDLEs have the same meaning in the two environments then, as I said, there is no meaningful conversion between the two. That said, I don't know much about managed C++.
hi all i m using the winsock api's for client server communication that works on the blocking mode not asyncronous.
but i m not successfully able to receive the strings it works with one receive call not the multiple calls,with multiple calls it brings wrong data.
Using the TCP protocol, packet boundaries are not preserved. That is, the number of calls, and number of bytes passed in a call, to send() is not mirrored in recv(). Instead, recv() gives you as many bytes as are currently buffered.
The sections names and their contents are only convention. Borland compilers use different names for example. You can also instruct the linker to merge sections. Code that relies on section names to find such things as the import and export table is wrong; that's what the data directory is for, it's like a table of contents.
The VirtualAddress is the RVA of where this section belongs when loaded into memory. RVA stands for Relative Virtual Address. It's of offset from the base address of the DLL to where the section is loaded. An absolute address can't be used as the DLL is not guaranteed to be loaded at a fixed location. The VirtualSize is how much memory is allocated for the section. This can be bigger then the actual size of the data in the section.
1. Seeing as it is "your" library, I would hope that you were fully aware how base-64 works?
2. depends on if the filename is in Unicode or not. Completely independent of the file-content.
3. It can't reliably.
First, when you have an error, explain what it is (instead of saying error lnk2019). That way, we don't need to google to find what the exact error is.
Also, when posting coed, use the code tag so that your code will look better.
Now, to your question, I see several problems: #ifdef MYDLL_EXPORTS
#define MYDLL_EXPORTS __declspec(dllexport)
#define MYDLL_EXPORTS __declspec(dllimport)
What are you trying to do here ? Why do you use the same symbol (MYDLL_EXPORTS) ? You need to have two compiler flags: one to specify if symbols need to be exported or imported and the second that will contain the export or import directive. Something like that: