Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sidkraft

@sidkraft
About
Posts
16
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MFC Functions
    S sidkraft

    Functions exist, MoveTo(x,y) or LineTo(x,y) to draw or move to coordinate points in MFC. Are there also functions to MoveTo or LineTo in 3D? I.E. MoveTo(x,y,z) or LineTo(x,y,z)? Please let me know. :)

    Sid

    C / C++ / MFC c++ question

  • Visual Studio 2008
    S sidkraft

    I am currently runnung Visual Studio 6.0 with C++. I see that Visual Studio 2008 is available. My questions are: 1.) will it have a C++ compiler in it that I can continue programming in C++ 6.0? 2.) I am using SilverFrost Fortran that supposedly will interface in the .net invironment. Wiil this also work with Visul Studio 2008? Please let me know. Thanks, Sid Kraft

    Sid

    C / C++ / MFC csharp c++ visual-studio question

  • Variable Change
    S sidkraft

    Using Visual C++ 6.0, would like to detect anytime a variable value changes during execution, :) haven't yet discovered a way to do with the Microsoft Debug tool. Any ideas will be helpful. Thanks in advance, Sid Kraft.

    Sid

    Managed C++/CLI c++ debugging

  • C++ Month Function
    S sidkraft

    Have a C++ routine, need to get the current month value, any ideas? Sid Kraft:-D

    Sid

    C / C++ / MFC c++ question

  • C++ Variables
    S sidkraft

    ;)I have a main C++ Routine with an include file called MyMainFile.h. Have a number of global variables in the include file that I want to be visible to a subroutine that is called from the main C++ program. However, when I call the subroutine, and include the MyMainFile.h in the subroutine, none of the variable that are declared in the include file, MyMainFile.h, are available. The compiler designates them as undeclared variables?? Any ideas? Sid Kraft

    Sid

    C / C++ / MFC c++ question

  • CString
    S sidkraft

    C++ has several utilities to manipulate strings declared as char var;, i.e. strncpy(a,b,n); where a,b are strings, n is the number of characters, etc. However, when one declares a variable as a CString, and uses the same utility, the compiler says that it cannot convert the CString to a char variable. Are there other C++ or visual C++ 6.0 utilities to work with CString variables? Please provide help on this subject. Thanks, Sid Kraft

    Sid

    C / C++ / MFC c++ tools help question

  • Windows Vista Purchase
    S sidkraft

    Christian: Sorry, thought I was sending a question to the Windows Group, Sid Kraft;)

    Sid

    Visual Basic

  • Windows Vista Purchase
    S sidkraft

    Christian: I am using Visual C++ 6.0, not VB. Sid Kraft

    Sid

    Visual Basic

  • Windows Vista Purchase
    S sidkraft

    An article was printed about one week ago, week of Jan. 29, 2007, regarding purchase of Window:laugh:s Vista. The article stated that a user can purchase the Ultimate package for around $200. I am wondering how one goes about this. Please let me know at EMAIL given. Thanks, Sid Kraft

    Sid

    Visual Basic

  • Visual C++ App Wizard
    S sidkraft

    I am completely frustrated. I am running Microsoft Visual C++ vers 6.0 and have created an application using the Microsoft App Wizard file/new, MFC Wizard(exe) module. It generates all of the "skeleton" code that will support menues, dialogs, etc. I am using it as: a Single Document, no Document/View architechture support, no document support, no features, no project style, pretty much a default application. The App Wizard generates the workspace and when I compile and run, I get two link error lnk2001, unresolved external references for On_Cancel() and OnOK(). I have tried all resolutions but still get the errors. What am I doing wrong and how does one find out where the variable are and why they are unresolved references. Any suggestions will help. Thanks at sid_kraft@msn.com.

    Sid

    C / C++ / MFC c++ help com workspace

  • MFC Publications
    S sidkraft

    I program in Visual C++ 6.0 and use the MFC macros quite a bit. I am looking for a good publication that explaines each of the MFC functions, what the arguments are and how they work. Specifically, when using a function, how does one delete an object and re-instate it. If there is a good publication out there, I would appreciate a response on how to purchase or? Thanks in avance, Sid Kraft at sid_kraft@msn.com. Sid

    C / C++ / MFC c++ com tutorial question

  • color new
    S sidkraft

    I am trying to create a color fill that will change relative to a new value being input from the "OnHScroll" function. When I input a new value for the red color variable in the RGB function and re-display, the color never changes to the new value. See code segment below. How do I change? ... ... int a=0,b=190,c=230,x; CMainFrame::CMainFrame() { //Set color frame colorbar.CreateSolidBrush(RGB (a, b, c)); }; void CMainFrame::OnPaint() { CPaintDC dc(this); dc.TextOut (5,40,"Red Color Is:"); //Output color frame colorbar.DeleteObject(); colorbar.CreateSolidBrush(RGB(a,b,c)); dc.SelectObject(colorbar); CRect rc(100,150,150,200); dc.Rectangle (&rc); } void CMainFrame::OnHScroll(UINT nSBCode, UINT nPos, CWnd* pCtrl) { //Convert pointer to slider pointer CSliderCtrl *pSld; pSld = (CSliderCtrl*)pCtrl; //Get new position x = pSld->GetPos(); a = x; CString s; s.Format("%d",x); //Output value for red stcred.SetWindowText(s); } Note that: 1.) Initialize the colorbar to have values RGB(a,b,c) 2.) Variable "a" read in from the "OnHScroll" function and set to a new value. 3.) "OnPaint" deletes the old colorbar and re-creates with new "a" variable value, should display as output with the new color but doesn't, still displays as original a,b,c values. Please advise, Sid kraft sid_kraft@msn.com Thanks in advance, Sid Kraft. Sid

    C / C++ / MFC question com

  • color change
    S sidkraft

    I am trying to change colors using variables in the initialization of a RGB command. The following are the commands used in MFC/Visual C++ 6.0: int a = 200; int b = 180; int c = 125; CMainFrame::CMainFrame() { //Set color frame colorbar.CreateSolidBrush(RGB (a, b, c)); } void CMainFrame::OnPaint() { CPaintDC dc(this); CRect rc(100,150,150,200); a = 140; dc.FillSolidRect(&rc,RGB(a,b,c)); } No matter what I set a to, it always displays with the original value for color. Is there a way to change the RGB colors after initialization? Please let me know at sid_kraft@msn.com. Thanks in advance, Sid Kraft Sid

    C / C++ / MFC c++ com question

  • Color selection
    S sidkraft

    I am trying to initialize a "brush" in visual C++ and then call it back and changing the colors of RGB. My statments for initialization are: CFrame::CFrame() { ... ... ... colorbar.CreateSolidBrush(RGB(a,b,c)); ... ... } void CFrame::OnPaint() { CPaintDC dc(this); dc.TextOut (5,40,"Red Color Is:"); //Output color frame COLORREF(RGB(a,b,c)); a = x; CRect rc(100,150,150,200); dc.FillSolidRect(&rc,RGB(a,250,250)); } No matter what I try, the colors only get defined at initialize time and never change. Are there functions in MFC that allow one to change the colors after initialization and what are they? Please let me know at sid_kraft@msn.com. Thanks in advance, Sid Kraft Sid

    C / C++ / MFC c++ com question

  • MFC
    S sidkraft

    I am "drawing" shapes in the user area of display and want to erase all that I drew to-date. I set the variable ShapeKind to the type of curve, i.e. bezel, points or, if points, I set them all to zero and then issue "Invalidate". This erases the screen of any lines that I have drawn to-date. However, I was told to set ShapeKind but do not know how it is used or called within the "Invalidate" statement, any comments to Sid Kraft at sid_kraft@msn.com. Thanks:laugh: Sid

    C / C++ / MFC c++ com graphics help

  • Erase Window
    S sidkraft

    // MainFrame.cpp #include "MainFrame.h" #include // for __min() "2 underscores" #define ID_SB 210 // All child windows require an // identifier. Not used here. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) // message calls this function ON_WM_PAINT() // void OnPaint() ON_WM_LBUTTONDOWN() // void OnLButtonDown(...) ON_WM_RBUTTONDOWN() //Left Button Down Add************ ON_WM_SIZE() // void OnSize(...) ON_WM_CHAR() // void OnChar(...) END_MESSAGE_MAP() CMainFrame::CMainFrame() // Constructor { // Step 1: Register a window class if wish // Step 2: Create the window Create(NULL, "Ex06a_StatusBar & Shapes", WS_OVERLAPPEDWINDOW, CRect(0,0,360,250)); // Step 3: Create a status bar myStatusBar.Create (WS_CHILD | WS_VISIBLE, CRect(1,2, 1,2), this, ID_SB); int rtEdges[] = {45,140,250}; // Right edge of panes myStatusBar.SetParts (3,rtEdges); // Step 4: Create Pens, Brushes, Fonts, etc penReg.CreatePen (PS_SOLID, 10, RGB(0,0,255)); // Step 5: Initialize application variables nPts = 0; ShapeKind = 'L'; CenterWindow(); }; void CMainFrame::OnPaint() { CPaintDC dc (this); dc.TextOut (1,1,"Click left button repeatedly. Press L, B, P"); CString s; s.Format("# pts:%d", nPts); myStatusBar.SetText (s,0,0); s.Format ("Shape(L,B,P): %c", ShapeKind); myStatusBar.SetText(s,2,SBT_POPOUT); if (nPts <= 1) return; dc.SelectObject (&penReg); switch (ShapeKind) { case 'L': dc.Polyline (ShapePts, nPts); break; case 'P': dc.SelectStockObject(LTGRAY_BRUSH); dc.Polygon (ShapePts,nPts); break; case 'B': if ((nPts - 4) % 3 == 0) dc.PolyBezier(ShapePts,nPts); else { // use max legal # of pts int n = (nPts - 4)/3; int NPts = __min(n*3 + 4, nPts); dc.PolyBezier(ShapePts,NPts); // then draw polyline dc.SelectStockObject (BLACK_PEN); dc.Polyline (ShapePts,nPts); } break; default: break; } } void CMainFrame::OnLButtonDown (UINT nFlags, CPoint pt) { if (nPts >= 99) // array full return; else { ShapePts[nPts] = pt; nPts++; CString s; s.Format("Last pt:(%d, %d)",pt.x, pt.y); myStatusBar.SetText (s,1,SBT_NOBORDERS);

    C / C++ / MFC c++ data-structures
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups