Answer Questions
na12 Odd ComboBox behavior
I've got a Combo-box control with the type set to "Drop List". When I run my program and click on it's button a small sliver of blue shows up underneath the control rather than a full dropdown list. I am running this code in VS: VC++ 2005 as a win32 project. This is imported code from an old Borland project and it seems that this is the only problem left to overcome. It worked fine, as is more or less, under Borland. Any suggestions I don't know if this is the right place to ask this or not, so if not, please direct me to the correct place. I attempted to include a manifest so that I could use CB_GETMINVISIBLE with no luck. Thanks A better place is the win32 dev newsgroups at http://msdn.microsoft.com/newsgrou ...Show All
Sean Hayes CHtmlView
Hi, How can i block images in CHtmlView.Thnx in advanceSudhakar Please see the section Controlling Download and Execution in http://msdn.microsoft.com/library/default.asp url=/workshop/browser/hosting/wbcustomization.asp ...Show All
Vins_Lond Randomly permute an array!
Hi there, I have to randomly permute an arry of data, more precisely, variable length coding (vlc) table using a key or password. Please explain with an example in C. Thank you. James Curran recently described the algorithm for shuffling an array. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=738697&SiteID=1 Or just doing an internet search for this will return hundreds of links to articles dealing with this topic. A permuted index (keyword-in-context) generator Check the above link. I don't know this is the right one you are looking!!! Please post this in the newsgroups http://msdn.microsoft.com/new ...Show All
Kirill Tropin error LNK2028: unresolved token (trying to attach an existing window)
Hi! I'm trying to use the FindWindow() function, but it doesn't seem to work properly. My whole program works just fine, but as soon as i add this piece of code, i get these weird compiler errors. code: static char * fWndSTATIC = "FLYFF" ; HWND fWindow = FindWindow(NULL, LPCWSTR(fWndSTATIC)); returning error when compiling: Error 1 error LNK2028: unresolved token (0A000013) "extern "C" struct HWND__ * __stdcall FindWindowW(wchar_t const *,wchar_t const *)" ( FindWindowW@@$$J18YGPAUHWND__@@PB_W0@Z ) referenced in function "private: void __clrcall FlyFFINCAPro::Form1::activateINCAToolStripMenuItem_Click(class System::Object ^,class System::EventArgs ^)" ( activateINCAToolStripMenuItem_Click@ ...Show All
Majd Yafi deleting a class
In the main menu we have a option, Project- add a class. Now how can we delete a class that we have add Thanks for your time in advance Ricardo 8a Delete the .h and .cpp files from the solution explorer and also delete the the file from the disk if required. Now you are done. Thank you Ricardo 8a ...Show All
su45937 OTP: Microsoft Visual C++ Runtime Library Error
Can't get any .doc files to open. Usually opens with WordPerfect10 which came preinstalled. I've reinstalled the WordPerfect10. I get a Microsoft Visual C++ Runtime Library Runtime Error! Program (path) abnormal program termination Also, can't get WordPad to stay open. I can type to it, but can't save to it or open any previous save files Microsoft Works will not open either. Yes, I've rebooted, reinstalled and run virus check(s). Any ideas Thanks Please contact the vendor of your software. This is a programmers forum and people would ask yu to show the code of the failing program. Contact support for Word Perfect. I asume a wrong DLL was installed. OTP ...Show All
pdDallas Slowdown with MSVC memory operations
After some line by line profiling of my code with a profiling tool, I noticed that the MSVC implementations of new, delete, memcpy, and memmove seems to slow down on a per-call basis the more they're called. My question is the following: is the only way to get rid of this bottleneck to override the default new/delete operators with my own custom implementation and possibly restructure my code or are there some compiler settings available in MSVC that I can try playing around with My code is basically a single-threaded RUDP-esque library, and it's memory-leak free, and the amount getting moved/allocated/copied is always less than or equal to 1030 or so bytes. Any help would be much appreciated ...Show All
XNA Rockstar How can I generate tab shaped buttons?
I am modifying a MFC based C++ application which I have migrated from VS6 to VS8. Several months ago I was surfing the Internet and came across a forum post somewhere (I can't remember where) that described oring together two button styles I recall (BS_PUSHBUTTON, etc.) which generated a button that looks like a tab with rounded corners on the top and flaired corners at the bottom. This apparently was an undocumented feature of VS. I, in fact, modified the dwStyle parameter of a button creation and was able to observe it generate this tab-like shape. I mentally filed away this interesting feature as possibly useful in the future -- big mistake as I forgot the details. I now have a project that needs exactly such a button shape and cannot r ...Show All
gra67 Problems with Char*'s and LPCWSTR need help
I am trying to use the openregistrykeyex or openregistrykey function from the windows.h include file and I have the following code HKEY hKey = NULL; char * temp = "String" ; int len = strlen(temp) +1; wchar_t *wText = new wchar_t [len]; if ( wText == 0) return 0; memset(wText,0,len); ::MultiByteToWideChar(CP_ACP, NULL, temp2.c_str(), -1, wText,len); const wchar_t * test = wText; //long tempResult = RegOpenKey(HKEY_LOCAL_MACHINE, test, &hKey); long tempResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, test,0, KEY_READ, &hKey); Neither work and I can't understand the cryptic error codes if someone could help me unravel the error codes error code = Error 1 error LNK2028: ...Show All
Ryan Hawkins Problems with loading BMP's using OpenGL
I'm working on a project for my graphics programming class and he supplied this example. Basically it's just loading 2 BMP's into the project then displaying the moon and earth. I can't get the code to work due to 2 errors. Here is the code supplied: // 16 - EarthMoonTexture.cpp : Multiple texture example with loader // David Babcock // CS370 // 11/1/06 #include "stdafx.h" #include <gl/glaux.h> #include <string> #include "glut.h" using namespace std; #define NO_TEXTURES 2 #define SUN 0 #define EARTH 1 // Define rotation angles GLfloat sun_ang = 0.0; GLfloat earth_orb = 0.0; GLfloat earth_ang = 0.0; GLfloat earth_dist = 5.0; // Texture indices GLuint text_idx[NO_TEXTURES]; // Planet objects GLUquadricObj *sun ...Show All
DaveDB Pointer access violation crash.
#include <iostream> #include <windows.h> #include <psapi.h> struct _file { char filePath[MAX_PATH]; }; typedef struct _MODULES { HANDLE mHandle; HMODULE hMods[1024]; DWORD procId; _file file[1024]; unsigned int nId; }MODULES,*PMODULES; using namespace std; bool GetProcModules(PMODULES mod[],DWORD ProcessIds[],unsigned int id); int main(int argc, char *argv[]) { DWORD processIds[1024]; DWORD bytesRet; if (!EnumProcesses(processIds,sizeof(processIds),&bytesRet)) { cerr << "EnumProcesses() failed\n"; system("pause"); return 1; } DWORD calcIds = bytesRet / sizeof(DWORD); PMODULES Modules[100]; for (unsigned int i = 0;i < calcIds;i++) { ...Show All
bill spinhoven Where do I put my .h and .c files?
Newbee to Visual C++ 2005. I have some algorithms I wrote for other win32 console applications. I'm pulling out my hair trying to use them in Visual C++. Basically I have a .h file which declares the functions that are in the .c files. These are simple functions, like calculating the area of a triangle and square! VC++ generates a lot of files, not sure where to #include "myfile.h" and #include"myfile.c", or I'd be happy just cutting and pasting the code right into one of the main files directly. I'v tried putting them everywhere, including the Form1.resX underneath this: // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are ch ...Show All
dariodario Ask Function problem?thanks
Ask Function problem thanks <<<<<<<<<<Class.h>>>>>>>>>> #pragma once class Class { public: int get_return(int a,int b,int (*compare)()); int Rxgmoral(int a,int b); void Fun(); }; <<<<<<<<<Class.Cpp>>>>>>>> #include "Stdafx.h" #include "Class.h" int Class::get_return(int a,int b,int(* compare)()) { return (compare(a,b)); } int Class::Rxgmoral(int a, int b) { return a+b; } void Class::Fun() { int a; a=get_return(1,2,&Rxgmoral); } error: e:\mystudio\project\test\test\class.cpp(6) : error C2197: 'int (__cdecl *)(void)' : too many arguments for call e:\mystudio\project\test\test\class.c ...Show All
AnthoDesigns Creating an Avi file
hello, I found some sample source code showing how to create an Avi file from a series of still images. What components, libraries, SKDs, must I download in order to compile and run functions such as CreateAvi() I'm running 2005 Express or VC 6.0. Thanks. yes, I see some info. thanks check out msdn http://msdn.microsoft.com/library/en-us/multimed/htm/_win32_video_for_windows.asp Kuphryn ...Show All
cpdeepak Network Programming
Hi guys, I have to work in Visual studio 6.0 . I am new to Visual C++ programming. I am working on a project that requires communication between PC and Microcontroller. I have to built a TCP/IP stack in microcontroller. I think my Microcontroller would be a server. I don't know what i have to do on PC side. Do i need to implement TCP/IP protocol on PC side as well OR I should work with STREAM SOCKETS OR DATAGRAM SOCKETS. What kinds of library packages should I use to achieve this. Winsock (windows socket 2), CSocket or other I found much information on the net but I don't know which method is gd for me. Bye yeh i know but i don't want to go on the wrong track. I want to know all pre requeties and ...Show All
